The problem with hg is that running ‘hg status’ may trigger fsevents, which would normally have us call ‘hg status’ again. To avoid this, we check if there actually are changes compared to the last time we ran the SCM driver. This has some overhead, as we need to scan the disk to produce the fingerprint.
Additionally the throttling has been improved. Previously we would delay a status fetch if it had been less than 3 seconds since the last request, but during this “penalty wait” more requests could still be submitted (in case of disk activity) and would be queued for later execution — now such requests are dropped.
We didn’t actually use the file itself, only its parent directory, and there are several places we want SCM info for an untitled file’s project directory, so removing the need for a file simplifies things.
The problem is that we used to treat an empty status map as meaning we hadn’t yet requested status for this repository, however, now that we no longer need status for all files, we would have an empty status map for clean (svn) repositories, leading to needlessly requesting status updates all the time (and on main thread).
This can be used to make decisions about whether or not we should assign a virtual status to directories, prune them from a status display, or similar.
Subversion itself is roughly 30% faster if we do not ask for status of all files, the XML processing though is magnitudes faster, since it will only have to deal with a few records (in the general case) rather than a record per file (xsltproc seems to do around ~10,000 files per second on my Mac Pro, though I have no idea if it scales linearly).
The scm::status::versioned status has now been removed.
The upshot of this is that SCM drivers can leave out files that are “clean” from their status map, and TextMate will assume they have status “none” (clean). This cuts down on the amount of data that needs to be sent (and/or processed) by the SCM drivers.
For a repository with 7,767 files it takes 3.5 seconds for Python to convert a full file listing from XML to the simpler line-based format. Using xsltproc the same takes 0.74 seconds.
According to issue #340 TextMate “freeze for up to about 5 - 10 minutes” when doing svn status. Not sure how much this change helps on that, no doubt it’s an improvement.
This allows the SCM drivers to not report status for non-modified versioned files.
The problem was previously that if a driver didn’t report status for such files, having a file go from modified → clean wouldn’t always cause a refresh, since no change notification was generated for the path.
For the svn driver there is a 50% overhead by svn itself in reporting status for files without status, this overhead is likely magnified by the following XML step (where XML for all files in the working copy needs to be parsed).
This can still be fooled, as we do not read variables from TextMate’s user defaults, but I think this should solve majority of issues users are reporting.
This command would e.g. fail if the repository format is of a newer date (in which case the code expecting a result would do “out of bounds” access).
Rather than split on newline, split third element on colon, and then take second element of that result, we now parse the output into a map and look for the ‘URL’ key.
* Rewrote the Subversion SCM driver to use the svn executable
* Badges work just like Mercurial
* TM_SCM_BRANCH is set to the full repository URL for the working copy
See issue #273.
The fs::snapsot_t class creates a finger print of a folder. We used the source tree for testing, but if the source tree hosts the build directory, then the fingerprint will (likely) change, since we run simultaneous build jobs.
It now uses the Frameworks folder in the source tree, as it’s unlikely that someone would place their build directory in this location.
git commit fails when user.name and user.email aren't set. Unfortunately
using git commit --author='Test Test <test@example.com>' doesn't work.
This could happen in environments where pristine users are used to build
software.
This patch is public domain.
Previously this was under the OakSystem framework which depends on the io framework meaning that the io framework itself was unable to obtain a basic environment, which is necessary for next commit.