Sat, 28 Mar 2015 20:05:01 +0100 hgk: display obsolete changesets in darkgrey
Andrew Shadura <andrew@shadura.me> [Sat, 28 Mar 2015 20:05:01 +0100] rev 24513
hgk: display obsolete changesets in darkgrey
Sat, 28 Mar 2015 19:36:21 +0100 hgk: pass --hidden switch to hg subprocesses when needed
Andrew Shadura <andrew@shadura.me> [Sat, 28 Mar 2015 19:36:21 +0100] rev 24512
hgk: pass --hidden switch to hg subprocesses when needed
Sat, 28 Mar 2015 19:34:03 +0100 hgk: remove repetitious (and wrong) command syntax descriptions
Andrew Shadura <andrew@shadura.me> [Sat, 28 Mar 2015 19:34:03 +0100] rev 24511
hgk: remove repetitious (and wrong) command syntax descriptions
Sat, 28 Mar 2015 14:28:22 -0700 run-tests: separate newline normalization from replacements
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 14:28:22 -0700] rev 24510
run-tests: separate newline normalization from replacements Upcoming patches will change how the replacements system works to make it more flexible. To prepare for this, eliminate the one-off use of replacements to perform newline normalization on Windows.
Sat, 28 Mar 2015 14:12:57 -0700 run-tests: remove arguments from Test._runcommand
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 14:12:57 -0700] rev 24509
run-tests: remove arguments from Test._runcommand Now that runcommand is part of the Test class, arguments that were previously coming from Test attributes can now be switched to lookups inline.
Sat, 28 Mar 2015 14:08:25 -0700 run-tests: move run into Test class
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 14:08:25 -0700] rev 24508
run-tests: move run into Test class Future patches will change how replacements work. Since the logic in run() is strongly tied to the operation of individual tests and since there is potential to make the implementation simpler by giving the function access to Test attributes, move it into Test.
Sat, 28 Mar 2015 19:39:03 -0700 run-tests: wait for test threads after first error
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 19:39:03 -0700] rev 24507
run-tests: wait for test threads after first error The test runner has the ability to stop on first error. Tests are executed in new Python threads. The test runner starts new threads when it has capacity to do so. Before this patch, the "stop on first error" logic would return immediately from the "run tests" function, without waiting on test threads to complete. There was thus a race between the test runner thread doing cleanup work and the test thread performing activity. For example, the test thread could be in the middle of executing a test shell script and the test runner could remove the test's temporary directory. Depending on timing, this could result in any number of output from the test runner. This patch eliminates the race condition by having the test runner explicitly wait for test threads to complete before continuing. I discovered this issue as I modified the test harness in a subsequent patch and was reliably able to tickle the race condition.
Sat, 28 Mar 2015 00:21:30 -0700 run-tests: report code coverage from source directory
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 00:21:30 -0700] rev 24506
run-tests: report code coverage from source directory As part of testing code coverage output, I noticed some files were being reported twice: there was an entry for the file in the install location and for the file in the source tree. I'm not sure why this is. But it resulted in under-reporting of coverage data since some lines weren't getting covered in both locations. I also noticed that files in the source directory and outside the "mercurial" and "hgext" packages were getting included in the coverage report. Cosmetically, this seemed odd to me. It's not difficult to filter paths from the report. But I figure this data can be useful (we could start reporting run-tests.py coverage, for example). This patch switches the coverage API to report code coverage from the source directory. It registers a path alias so that data from the install location is merged into data from the source directory. We now get merged results for files that were being reported in multiple locations. Since code coverage reporting now relies on the profiled install now being in sync with the source tree, an additional check to disallow code coverage when --with-hg is specified has been added. This should have been present before, as --local was previously disallowed for the same reasons. Merging the paths raises our aggregate line coverage from ~60 to 81%.
Sat, 28 Mar 2015 00:47:58 -0700 run-tests: collect aggregate code coverage
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 00:47:58 -0700] rev 24505
run-tests: collect aggregate code coverage Before this patch, every Python process during a code coverage run was writing coverage data to the same file. I'm not sure if the coverage package even tries to obtain a lock on the file. But what I do know is there was some last write wins leading to loss of code coverage data, at least with -j > 1. This patch changes the code coverage mechanism to be multiple process safe. The mechanism for initializing code coverage via sitecustomize.py has been tweaked so each Python process will produce a separate coverage data file on disk. Unless two processes generate the same random value, there are no race conditions writing to the same file. At the end of the test run, we combine all written files into an aggregate report. On my machine, running the full test suite produces a little over 20,000 coverage files consuming ~350 MB. As you can imagine, it takes several seconds to load and merge these coverage files. But when it is done, you have an accurate picture of the aggregate code coverage for the entire test suite, which is ~60% line coverage.
Fri, 27 Mar 2015 23:17:19 -0700 run-tests: obtain code coverage via Python API
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 27 Mar 2015 23:17:19 -0700] rev 24504
run-tests: obtain code coverage via Python API Before, we were invoking the "coverage" program provided by the "coverage" module. This patch changes the code to go through the Python API. This makes the next patch a little bit easier to reason about. A side effect of this patch is that writing code coverage reports will be slightly faster, as we won't have to redundantly load coverage data.
Sat, 28 Mar 2015 12:58:44 -0700 commands.debugrevlog: report max chain length
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Mar 2015 12:58:44 -0700] rev 24503
commands.debugrevlog: report max chain length This is sometimes useful to know. Report it.
Fri, 27 Mar 2015 20:55:54 -0700 _lazymanifest: drop unnecessary call to sorted()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Mar 2015 20:55:54 -0700] rev 24502
_lazymanifest: drop unnecessary call to sorted() The entries returned from _lazymanifest.iterentries() are already sorted.
Sun, 29 Mar 2015 00:00:14 -0400 test-git-export: add globs the test runner wants on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Mar 2015 00:00:14 -0400] rev 24501
test-git-export: add globs the test runner wants on Windows The only difference for the first two was to add the globs, but the third line of output on Windows was '..\dir2\copy'. I'm not sure why 'copy' is output on Windows instead of '*'.
Sun, 29 Mar 2015 10:41:23 -0700 run-tests: explicitly handle unicode when writing xunit file
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 29 Mar 2015 10:41:23 -0700] rev 24500
run-tests: explicitly handle unicode when writing xunit file The xunit writer was passing a str to a minidom API. An implicit .decode('ascii') was performed somewhere, causing UnicodeDecodeError if test output contained non-ascii sequences. This patch converts test output to utf-8 before passing it to minidom. We use the "replace" strategy to ensure invalid utf-8 sequences get munged into �.
Sun, 29 Mar 2015 19:06:23 +0200 parsers.c: avoid implicit conversion loses integer warnings
André Sintzoff <andre.sintzoff@gmail.com> [Sun, 29 Mar 2015 19:06:23 +0200] rev 24499
parsers.c: avoid implicit conversion loses integer warnings These warnings are raised by Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) and were introduced in 539b3c7eea44
Sun, 29 Mar 2015 00:20:56 -0400 test-annotate: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 29 Mar 2015 00:20:56 -0400] rev 24498
test-annotate: conditionalize error output for Windows It seems better to leave the actual output in place instead of globbing everything but 'abort:', in case it starts aborting for other reasons. It isn't clear the purpose for reversing the file name position, but that originates in windows.posixfile.
Sat, 28 Mar 2015 23:57:16 -0400 test-diffstat: add a glob the test runner wants on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 28 Mar 2015 23:57:16 -0400] rev 24497
test-diffstat: add a glob the test runner wants on Windows The test gets a '~' status without it.
Tue, 24 Mar 2015 21:36:38 +0100 tests: add testing for diff.showfunc
Mathias De Maré <mathias.demare@gmail.com> [Tue, 24 Mar 2015 21:36:38 +0100] rev 24496
tests: add testing for diff.showfunc The diff.showfunc config knob did not have coverage before.
Mon, 30 Mar 2015 10:43:52 -0700 manifest: make manifest.intersectfiles() internal
Drew Gottlieb <drgott@google.com> [Mon, 30 Mar 2015 10:43:52 -0700] rev 24495
manifest: make manifest.intersectfiles() internal manifest.intersectfiles() is just a utility used by manifest.matches(), and a future commit removes intersectfiles for treemanifest for optimization purposes. This commit makes the intersectfiles methods on manifestdict and treemanifest internal, and converts its test to a more generic testMatches(), which has the exact same coverage.
Sat, 28 Mar 2015 11:19:34 +0100 win32: add comment about WinError
Adrian Buehlmann <adrian@cadifra.com> [Sat, 28 Mar 2015 11:19:34 +0100] rev 24494
win32: add comment about WinError Prevent reintroducing the bug that was added in e34106fa0dc3 (and fixed with a2285e2fc949).
Sat, 28 Mar 2015 20:22:03 +0900 templates: fix "log -q" output of phases style stable
Yuya Nishihara <yuya@tcha.org> [Sat, 28 Mar 2015 20:22:03 +0900] rev 24493
templates: fix "log -q" output of phases style It had the same problem as 6136704b975d, name conflicts of {node} keyword.
Fri, 27 Mar 2015 14:11:13 -0700 record_curses: fix ui bug for newly added file
Laurent Charignon <lcharignon@fb.com> [Fri, 27 Mar 2015 14:11:13 -0700] rev 24492
record_curses: fix ui bug for newly added file With record's curses interface toggling and untoggling a newly added file would lead to a confusing UI (the header was marked as partial and the hunks as unselected). Tested additionally using the curses interface with newly added, removed and modified files in a test repo.
Sat, 28 Mar 2015 00:08:26 -0500 import-checker: rotatecycle is actually the canonical cycle key
Matt Mackall <mpm@selenic.com> [Sat, 28 Mar 2015 00:08:26 -0500] rev 24491
import-checker: rotatecycle is actually the canonical cycle key So refactor to drop cyclekey().
Fri, 27 Mar 2015 23:52:23 -0500 import-checker: make search algorithm non-recursive breadth-first
Matt Mackall <mpm@selenic.com> [Fri, 27 Mar 2015 23:52:23 -0500] rev 24490
import-checker: make search algorithm non-recursive breadth-first Breadth-first allows finding the shortest cycle including the starting module. This lets us terminate our search early when we've discovered shorter paths already. This gives a tremendous speed-up to the cycle-finding portion of the test, dropping total runtime from 39s to 3s.
Fri, 27 Mar 2015 19:27:19 -0500 import-checker: drop set() from cyclekey()
Matt Mackall <mpm@selenic.com> [Fri, 27 Mar 2015 19:27:19 -0500] rev 24489
import-checker: drop set() from cyclekey()
Fri, 27 Mar 2015 19:25:40 -0500 import-checker: drop duplicate element from cycle
Matt Mackall <mpm@selenic.com> [Fri, 27 Mar 2015 19:25:40 -0500] rev 24488
import-checker: drop duplicate element from cycle This will allow optimizing cyclekey creation
Fri, 27 Mar 2015 18:50:39 -0500 import-checker: fix rotatecycle
Matt Mackall <mpm@selenic.com> [Fri, 27 Mar 2015 18:50:39 -0500] rev 24487
import-checker: fix rotatecycle It was duplicating the last element sometimes.
Fri, 27 Mar 2015 01:03:06 -0700 dirs.addpath: rework algorithm to search forward
Siddharth Agarwal <sid0@fb.com> [Fri, 27 Mar 2015 01:03:06 -0700] rev 24486
dirs.addpath: rework algorithm to search forward This improves performance because it uses strchr rather than a loop. For LLVM/clang version "Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)" on OS X, for a repo with over 200,000 files, this improves perfdirs from 0.248 seconds to 0.230 (7.3%) For gcc 4.4.6 on Linux, for a test repo with over 500,000 files, this improves perfdirs from 0.704 seconds to 0.658 (6.5%).
Sat, 14 Mar 2015 17:40:47 +0900 changeset_printer: use changectx to get status tuple
Yuya Nishihara <yuya@tcha.org> [Sat, 14 Mar 2015 17:40:47 +0900] rev 24485
changeset_printer: use changectx to get status tuple log.parents() can't handle wdir() revision. Because repo.status() creates ctx objects, there would be no benefit to get parent node from changelog.
Sat, 14 Mar 2015 17:23:51 +0900 changeset_printer: replace _meaningful_parentrevs() by changeset_templater's
Yuya Nishihara <yuya@tcha.org> [Sat, 14 Mar 2015 17:23:51 +0900] rev 24484
changeset_printer: replace _meaningful_parentrevs() by changeset_templater's Because changeset_printer needs pctx object anyway, there would be no benefit to avoid creation of pctx in _meaningful_parentrevs().
Sat, 14 Mar 2015 17:19:04 +0900 changeset_printer: use context objects consistently to show parents
Yuya Nishihara <yuya@tcha.org> [Sat, 14 Mar 2015 17:19:04 +0900] rev 24483
changeset_printer: use context objects consistently to show parents This prepares for merging changeset_printer._maningful_parentrevs() with changeset_templater's.
Thu, 26 Mar 2015 23:56:18 +0900 children: don't pass filectx to displayer
Yuya Nishihara <yuya@tcha.org> [Thu, 26 Mar 2015 23:56:18 +0900] rev 24482
children: don't pass filectx to displayer displayer doesn't want a fctx but a ctx. It failed with -Tdefault template. Traceback (most recent call last): ... File "mercurial/templatekw.py", line 212, in showbookmarks bookmarks = args['ctx'].bookmarks() AttributeError: 'filectx' object has no attribute 'bookmarks'
Fri, 27 Mar 2015 15:13:21 -0500 verify: add a note about a paleo-bug
Matt Mackall <mpm@selenic.com> [Fri, 27 Mar 2015 15:13:21 -0500] rev 24481
verify: add a note about a paleo-bug In the very early days of hg, it was possible to commit /dev/null because our patch importer was too simple. Repos from this era may still exist, add a note about why we ignore this name.
Fri, 27 Mar 2015 13:51:21 -0500 cmdutil: remove some excess vertical whitespace
Matt Mackall <mpm@selenic.com> [Fri, 27 Mar 2015 13:51:21 -0500] rev 24480
cmdutil: remove some excess vertical whitespace
Fri, 27 Mar 2015 13:48:51 -0500 revert: move calculation of targetsubs earlier
Matt Mackall <mpm@selenic.com> [Fri, 27 Mar 2015 13:48:51 -0500] rev 24479
revert: move calculation of targetsubs earlier
Wed, 25 Mar 2015 15:53:30 -0700 shelve: add interactive mode
Laurent Charignon <lcharignon@fb.com> [Wed, 25 Mar 2015 15:53:30 -0700] rev 24478
shelve: add interactive mode This allows us to shelve selectively part of the changes of the workdir
Wed, 25 Mar 2015 15:52:28 -0700 shelve: add interactive mode command line option
Laurent Charignon <lcharignon@fb.com> [Wed, 25 Mar 2015 15:52:28 -0700] rev 24477
shelve: add interactive mode command line option
Wed, 25 Mar 2015 15:51:57 -0700 record: change return value of recording code
Laurent Charignon <lcharignon@fb.com> [Wed, 25 Mar 2015 15:51:57 -0700] rev 24476
record: change return value of recording code It makes it easier to include interactive mode to more commands that require to get a reference to the newly created node
Wed, 25 Mar 2015 14:01:14 -0700 revert: fix --interactive on local modification (issue4576)
Laurent Charignon <lcharignon@fb.com> [Wed, 25 Mar 2015 14:01:14 -0700] rev 24475
revert: fix --interactive on local modification (issue4576) We were moving files during the backup phase and it was incompatible with the way record/crecord is working
Wed, 25 Mar 2015 13:55:35 +0900 largefiles: remove useless overrideupdate
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 25 Mar 2015 13:55:35 +0900] rev 24474
largefiles: remove useless overrideupdate Now, "overrideupdate()" wrapping "hg update" is useless, because "workingctx.dirty() and raising Abort" in "hg update" was replaced by "cmdutil.bailifchanged()" in the previous patch, and the latter can detect changes of largefiles in the working directory.
Wed, 25 Mar 2015 13:55:35 +0900 update: replace workingctx.dirty and raising Abort by cmdutil.bailifchanged
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 25 Mar 2015 13:55:35 +0900] rev 24473
update: replace workingctx.dirty and raising Abort by cmdutil.bailifchanged This patch makes wrapping "commands.update()" by largefiles extension useless, because "cmdutil.bailifchanged()" can detect changes of largefiles in the working directory. This patch also changes test-update-branches.t, because "cmdutil.bailifchanged()" shows more detailed information about dirty-ness of the working directory than "workingctx.dirty()".
Wed, 25 Mar 2015 13:55:35 +0900 cmdutil: allow bailifchanged to ignore merging in progress
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 25 Mar 2015 13:55:35 +0900] rev 24472
cmdutil: allow bailifchanged to ignore merging in progress In "commands.update()", "cmdutil.bailifchanged()" isn't used for "abort if the working directory is dirty", because it forcibly examines about merging in progress. "workingctx.dirty()" used in "commands.update()" can't detect changes of largefiles in the working directory without "repo.lfstatus = True" wrapping. This is only reason of "commands.update()" wrapping by largefiles extension. On the other hand, "cmdutil.bailifchanged()" already wrapped by largefiles extension can detect changes of largefiles. This patch is a preparations for replacing "workingctx.dirty()" and raising Abort in "commands.update()" by "cmdutil.bailifchanged()". It can remove redundant "commands.update()" wrapping.
Wed, 25 Mar 2015 13:55:35 +0900 subrepo: add bailifchanged to centralize raising Abort if subrepo is dirty
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 25 Mar 2015 13:55:35 +0900] rev 24471
subrepo: add bailifchanged to centralize raising Abort if subrepo is dirty This patch also centralizes composing dirty reason message like "uncommitted changes in subrepository 'xxxx'".
Wed, 25 Mar 2015 13:55:32 +0900 subrepo: add dirtyreason to centralize composing dirty reason message
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 25 Mar 2015 13:55:32 +0900] rev 24470
subrepo: add dirtyreason to centralize composing dirty reason message This patch newly adds "dirtyreason()" to centralize composing dirty reason message like "uncommitted changes in subrepository 'xxxx'". There are 3 similar messages below, and this patch is a part of preparations for unifying them into (1), too. 1. uncommitted changes in subrepository 'XXXX' 2. uncommitted changes in subrepository XXXX 3. uncommitted changes in subrepo XXXX This patch chooses adding new method "dirtyreason()" instead of making "dirty()" return "reason string", because: - some of existing "dirty()" implementation is too complicated to do so simply, and - ill-mannered 3rd party subrepo classes, of which "dirty()" doesn't return "reason string", cause meaningless message (even though it is rare case)
Wed, 25 Mar 2015 16:40:37 -0700 record_curses: add test for newly added files
Laurent Charignon <lcharignon@fb.com> [Wed, 25 Mar 2015 16:40:37 -0700] rev 24469
record_curses: add test for newly added files We have a UI bug where toggling a newly added file twice in the curses interface didn't mark it as selected. This test checks that the underlying logic is working as expected, the next patch of the series fixes the UI bug.
Wed, 25 Mar 2015 17:18:48 -0700 test-manifest.py: don't test .text() with present node suffix
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Mar 2015 17:18:48 -0700] rev 24468
test-manifest.py: don't test .text() with present node suffix When m.text() is called after setting a nodeid with a suffix (such as '+'), manifestdict uses the suffix-less nodeid for the text, while treemanifest includes the suffix. It would perhaps make most sense to raise an exception so the bug is found, but since the two implementations behave differently, let's just not test the behavior for now.
Thu, 26 Mar 2015 09:42:21 -0700 treemanifest: drop 22nd byte for consistency with manifestdict
Martin von Zweigbergk <martinvonz@google.com> [Thu, 26 Mar 2015 09:42:21 -0700] rev 24467
treemanifest: drop 22nd byte for consistency with manifestdict When assigning a 22-byte hash to a nodeid in a manifest, manifestdict drops the 22nd byte, while treemanifest keeps it. Let's make treemanifest drop the 22nd byte as well.
Wed, 25 Mar 2015 14:13:46 -0700 test-manifest.py: rewrite tests in terms of manifestdict
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Mar 2015 14:13:46 -0700] rev 24466
test-manifest.py: rewrite tests in terms of manifestdict By rewriting test-manifest.py in terms of manifestdict instead of _lazymanifest, the tests can be run on treemanifests too. There are still a few tests that fail on treemanifests. They will be addressed in the next few patches.
Wed, 25 Mar 2015 14:21:34 -0700 test-manifest.py: separate out test for double-free after copy()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Mar 2015 14:21:34 -0700] rev 24465
test-manifest.py: separate out test for double-free after copy() The test that we don't double-free anything after creating a copy is currently mixed with the __setitem__ test. Let's separate them.
Wed, 25 Mar 2015 22:20:44 -0400 revert: evaluate subrepos to revert against the working directory
Matt Harbison <matt_harbison@yahoo.com> [Wed, 25 Mar 2015 22:20:44 -0400] rev 24464
revert: evaluate subrepos to revert against the working directory Reverting to a revision where the subrepo didn't exist will now abort, and matching subrepos against the working directory is consistent with how filesets are evaluated since 5b85a5bc5bbb.
Wed, 25 Mar 2015 21:54:47 -0400 revert: handle subrepos missing in the given --rev
Matt Harbison <matt_harbison@yahoo.com> [Wed, 25 Mar 2015 21:54:47 -0400] rev 24463
revert: handle subrepos missing in the given --rev The list of subrepos to revert is currently based on the given --rev, so there is currently no way for this to fail. Using the --rev context is wrong though, because if the subrepo doesn't exist in --rev, it is skipped, so it won't be changed. This change makes it so that the revert aborts, which is what happens if a plain file is reverted to -1. Finding matches based on --rev is also inconsistent with evaluating files against the working directory (5b85a5bc5bbb). This change is made now, so as to not cause breakage when the context is switched in an upcoming patch.
Wed, 25 Mar 2015 16:21:58 -0700 osutil: mark end of string with null char, not 0
Siddharth Agarwal <sid0@fb.com> [Wed, 25 Mar 2015 16:21:58 -0700] rev 24462
osutil: mark end of string with null char, not 0 Noticed this while working on other stuff in the area.
Wed, 25 Mar 2015 15:55:31 -0700 osutil: use getdirentriesattr on OS X if possible
Siddharth Agarwal <sid0@fb.com> [Wed, 25 Mar 2015 15:55:31 -0700] rev 24461
osutil: use getdirentriesattr on OS X if possible This is a significant win for large repositories on OS X, especially with a cold cache. Unfortunately we need to keep the lstat-based implementation around for two reasons: - Not all filesystems support this call. - There's an edge case in which it's best to fall back to avoid a retry loop. More about this in the comments. The below tests are all performed on a Mac with an SSD running OS X 10.9, on a repository with over 200k files. The results are best of 5 with simulated best-effort conditions. The gains with a hot cache are pretty impressive: 'hg status' goes from 5.18 seconds to 3.79 seconds. However, a repository that large will probably already be using something like hgwatchman [1], which helps much more (for this repo, 'hg status' with hgwatchman is approximately 1 second). Where this really helps is when the cache is cold [2]: hg status goes from 31.0 seconds to 9.66. See http://lists.apple.com/archives/filesystem-dev/2014/Dec/msg00002.html for some more discussion about this function. This is based on a patch by Sean Farley <sean@farley.io>. [1] https://bitbucket.org/facebook/hgwatchman [2] There appears to be no easy way to clear the file cache (aka "vnodes") on OS X short of rebooting. purge(8) purportedly does that but in my testing had little effect. The workaround I came up with was to assume that vnode eviction was LRU, make sure the kern.maxvnodes sysctl is smaller than the size of the repository, then make sure we'd always miss the cache by running 'hg status' in another clone of the repository before running it in the test repository.
Wed, 25 Mar 2015 16:43:29 -0700 osutil._listdir: rename to _listdir_stat
Siddharth Agarwal <sid0@fb.com> [Wed, 25 Mar 2015 16:43:29 -0700] rev 24460
osutil._listdir: rename to _listdir_stat In upcoming patches we'll add another implementation of listdir on OS X. That implementation will have to fall back to this one under some circumstances, though. We'll make _listdir be able to detect those circumstances and use the right function as appropriate.
Mon, 16 Mar 2015 17:11:25 +0900 revset: optimize "x & fullreposet" case
Yuya Nishihara <yuya@tcha.org> [Mon, 16 Mar 2015 17:11:25 +0900] rev 24459
revset: optimize "x & fullreposet" case If self is a smartset and other is a fullreposet, nothing should be necessary. A small win for trivial query in mozilla-central repo: revset #0: (0:100000) 0) wall 0.017211 comb 0.020000 user 0.020000 sys 0.000000 (best of 163) 1) wall 0.001324 comb 0.000000 user 0.000000 sys 0.000000 (best of 2160)
Mon, 16 Mar 2015 18:36:53 +0900 debugrevspec: show nesting structure of smartsets if verbose
Yuya Nishihara <yuya@tcha.org> [Mon, 16 Mar 2015 18:36:53 +0900] rev 24458
debugrevspec: show nesting structure of smartsets if verbose This shows how smartsets are constructed from the query. It will be somewhat useful to track problems such as stack overflow.
Mon, 16 Mar 2015 18:15:06 +0900 revset: add __repr__ to all smartset classes
Yuya Nishihara <yuya@tcha.org> [Mon, 16 Mar 2015 18:15:06 +0900] rev 24457
revset: add __repr__ to all smartset classes This is sometimes useful for debugging.
Wed, 18 Mar 2015 20:40:02 -0700 status: add relative directory help text (issue3835)
Yung-Jin (Joey) Hu <yungjinhu@gmail.com> [Wed, 18 Mar 2015 20:40:02 -0700] rev 24456
status: add relative directory help text (issue3835) Previously, it was difficult to find out how to display the status of files relative to your current working directory. This patch adds that knowledge to the help text.
Wed, 25 Mar 2015 11:55:15 -0700 diff: rename --relative option to --root
Sean Farley <sean@farley.io> [Wed, 25 Mar 2015 11:55:15 -0700] rev 24455
diff: rename --relative option to --root The diff output format is unable to express files outside the directory so it makes sense to name this option --root instead of --relative.
Wed, 25 Mar 2015 15:58:31 -0400 revlog: make converting from inline to non-line work after a strip
Mike Edgar <adgar@google.com> [Wed, 25 Mar 2015 15:58:31 -0400] rev 24454
revlog: make converting from inline to non-line work after a strip The checkinlinesize function, which converts inline revlogs to non-inline, uses the current transaction's "data" field to determine how to update the transaction after the conversion. This change works around the missing data field, which is not in the transaction after a strip.
Tue, 24 Mar 2015 12:52:53 -0700 check-code: in C code, prevent space before closing parenthesis
Laurent Charignon <lcharignon@fb.com> [Tue, 24 Mar 2015 12:52:53 -0700] rev 24453
check-code: in C code, prevent space before closing parenthesis
Sat, 17 Jan 2015 12:39:44 +0900 match: remove unused assignment of ctx
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Jan 2015 12:39:44 +0900] rev 24452
match: remove unused assignment of ctx ctx is consumed in __init__ to build match patterns and never used after that.
Sat, 17 Jan 2015 14:22:21 +0900 revert: comment that filesets are always evaluated against workingctx
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Jan 2015 14:22:21 +0900] rev 24451
revert: comment that filesets are always evaluated against workingctx
Tue, 24 Mar 2015 15:47:57 -0700 revert: take fast path also when not reverting to '.'
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Mar 2015 15:47:57 -0700] rev 24450
revert: take fast path also when not reverting to '.' This speeds up 'hg revert -r .^ --all --dry-run' on the Mozilla repo from 4.081s to 0.826s. Note that 'hg revert -r .^ .' does not get any faster, since '.' does not make match.always() True. I can't think of a reason it would break anything, and if it does, it's clearly not covered by tests.
Tue, 24 Mar 2015 13:56:51 -0700 revert: define 'wctx' a little earlier and use it more
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Mar 2015 13:56:51 -0700] rev 24449
revert: define 'wctx' a little earlier and use it more
Wed, 29 Oct 2014 08:43:39 -0700 match: add isexact() method to hide internals
Martin von Zweigbergk <martinvonz@google.com> [Wed, 29 Oct 2014 08:43:39 -0700] rev 24448
match: add isexact() method to hide internals Comparing a function reference seems bad.
Wed, 19 Nov 2014 15:56:58 -0800 matcher: make e.g. 'relpath:.' lead to fast paths
Martin von Zweigbergk <martinvonz@google.com> [Wed, 19 Nov 2014 15:56:58 -0800] rev 24447
matcher: make e.g. 'relpath:.' lead to fast paths Several commands take the fast path when match.always() is true. However, when the user passes "." on the command line, that results in a matcher for which match.always() == False. Let's make it so such matchers return True, and have an empty list of .files(). This makes e.g. "hg log ." as fast as "hg log" and "hg revert ." as fast as "hg revert --all" (when run from repo root).
Wed, 25 Mar 2015 14:56:54 -0400 revset: add the 'subrepo' symbol
Matt Harbison <matt_harbison@yahoo.com> [Wed, 25 Mar 2015 14:56:54 -0400] rev 24446
revset: add the 'subrepo' symbol This returns the csets where matching subrepos have changed with respect to the containing repo's first parent. The second parent shouldn't matter, because it is either syncing up to the first parent (i.e. it hasn't changed from the current branch's POV), or the merge changed it with respect to the first parent (which already adds it to the set). There's already a 'subrepo' fileset, but it is prefixed with 'set:', so there should be no ambiguity (in code anyway). The only test I see for it is to revert subrepos named by a glob pattern (in test-subrepo.t, line 58). Since it doesn't return a tracked file, neither 'log "set:subrepo()"' nor 'files "set:subrepo()"' print anything. Therefore, it seems useful to have a revset that will return something for log (and can be added to a revsetalias to be chained with 'file' revsets.) It might be nice to be able to filter for added, modified and removed separately, but add/remove should be rare. It might also be nice to be able to do a 'contains' check, in addition to this mutated check. Maybe it is possible to get those with the existing 'adds', 'contains', 'modifies' and 'removes' by teaching them to chase explicit paths into subrepos. I'm not sure if this should be added to the 'modifies adds removes' line in revset.optimize() (since it is doing an AMR check on .hgsubstate), or if it is OK to put into 'safesymbols' (things like 'file' are on the list, and that takes a regex, among other patterns).
Tue, 24 Mar 2015 20:28:39 -0700 tags: improve documentation
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 24 Mar 2015 20:28:39 -0700] rev 24445
tags: improve documentation The documentation for tags.py was making comprehension difficult. This patch rewrites most of the comments in the file to make it easier for mere mortals to understand what's going on.
Fri, 20 Mar 2015 11:14:27 -0700 phase: default to C implementation for phase computation
Laurent Charignon <lcharignon@fb.com> [Fri, 20 Mar 2015 11:14:27 -0700] rev 24444
phase: default to C implementation for phase computation
Tue, 24 Mar 2015 11:00:09 -0700 phase: compute phases in C
Laurent Charignon <lcharignon@fb.com> [Tue, 24 Mar 2015 11:00:09 -0700] rev 24443
phase: compute phases in C Previously, the phase computation would grow much slower as the oldest draft commit in the repository grew older (which is very common in repos with evolve on) and the number of commits increase. By rewriting the computation in C we can speed it up from 700ms to 7ms on a large repository whose oldest draft commit is a year old.
Wed, 25 Mar 2015 14:16:10 -0500 manifest: move C bool polyfill into util.h
Matt Mackall <mpm@selenic.com> [Wed, 25 Mar 2015 14:16:10 -0500] rev 24442
manifest: move C bool polyfill into util.h
Wed, 25 Mar 2015 14:13:11 -0500 manifest: use util.h to get Py_ssize_t
Matt Mackall <mpm@selenic.com> [Wed, 25 Mar 2015 14:13:11 -0500] rev 24441
manifest: use util.h to get Py_ssize_t
Fri, 13 Mar 2015 18:28:11 -0400 clone: add progress support to hardlink clones (issue3059)
Augie Fackler <augie@google.com> [Fri, 13 Mar 2015 18:28:11 -0400] rev 24440
clone: add progress support to hardlink clones (issue3059)
Thu, 19 Mar 2015 10:24:22 -0400 util: add progress callback support to copyfiles
Augie Fackler <augie@google.com> [Thu, 19 Mar 2015 10:24:22 -0400] rev 24439
util: add progress callback support to copyfiles
Mon, 23 Mar 2015 23:04:51 -0700 revert: evaluate filesets against working directory (issue4497)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Mar 2015 23:04:51 -0700] rev 24438
revert: evaluate filesets against working directory (issue4497) As the failing revert tests in test-fileset-generated.t show, Revert currently creates one matcher for matching files in the working copy and another matcher for matching files in the target revision. The two matchers are created with different contexts, which means filesets are evaluated differently. Then the union of the sets of files matching the matchers in the two contexts are reverted. It doesn't seem to make sense to use two different matchers; only the context they're applied to should be different. It seems very likely that the user wants the filesets to be evaluated against the working directory, which the tests test-fileset-generated.t also assume, so let's make it so. I willingly admit that the largefiles code was modified by trial and error (according to tests).
Tue, 24 Mar 2015 10:27:56 -0700 largefiles: extract and reuse 'standin' variable in overriderevert()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Mar 2015 10:27:56 -0700] rev 24437
largefiles: extract and reuse 'standin' variable in overriderevert()
Fri, 20 Mar 2015 10:05:31 -0700 largefiles: override cmdutil.revert() instead of comands.revert()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Mar 2015 10:05:31 -0700] rev 24436
largefiles: override cmdutil.revert() instead of comands.revert() By overriding the cmdutil method we don't need to override both the function and the command. Also, we get access to the 'ctx' and 'parents' variables, which will soon prove useful. Rename the 'ctx' argument to overridematch() to 'mctx' rather than letting it shadow new 'ctx'.
Sat, 21 Mar 2015 12:01:05 -0400 test-commit-interactive-curses: backout 852801178a63
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Mar 2015 12:01:05 -0400] rev 24435
test-commit-interactive-curses: backout 852801178a63 Now that the imports have been fixed up, and the platform EOL difference eliminated, this test runs on Windows.
Sat, 21 Mar 2015 11:56:43 -0400 test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Mar 2015 11:56:43 -0400] rev 24434
test-interactive: use stable EOL in various file generating routines The seq.py and shell echo redirected to a file ends up with platform specific EOL, which throws off the hash when the file is committed to the test repo on Windows. The other option is to glob the hashes, but the ability to see if they have changed might point out problems that would otherwise be missed.
Tue, 17 Mar 2015 15:46:36 -0700 patch.diff: restrict matcher to relative root in certain cases
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:46:36 -0700] rev 24433
patch.diff: restrict matcher to relative root in certain cases Previously we'd request all results, then filter by relative root. This is clearly inefficient, so we now restrict the matcher to the relative root for certain easy cases. The particular case here is when the matcher matches all files. In that case we can simply create a matcher by the relative root. This is purely an optimization and has no impact on correctness.
Tue, 17 Mar 2015 15:46:30 -0700 commands.diff: add support for diffs relative to a subdirectory
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:46:30 -0700] rev 24432
commands.diff: add support for diffs relative to a subdirectory Previous patches added all the backend support for this. This exposes this option in the UI.
Tue, 17 Mar 2015 15:06:40 -0700 cmdutil.diffordiffstat: add support for diffs relative to a subdirectory
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:06:40 -0700] rev 24431
cmdutil.diffordiffstat: add support for diffs relative to a subdirectory It's possible that some of the match patterns are outside the relative root. We warn in that case. In upcoming patches we'll add tests for this.
Sun, 22 Mar 2015 19:19:16 -0700 test-fileset.t: remove 'bar ' and 'baz\' from tested filenames
Siddharth Agarwal <sid0@fb.com> [Sun, 22 Mar 2015 19:19:16 -0700] rev 24430
test-fileset.t: remove 'bar ' and 'baz\' from tested filenames This test is guarded by a '#if no-windows', but they can't be written out on vfat on Linux either. con.xml can, and for testing that's good enough. Also clean up a stray 'ls' that I mistakenly left in while writing the test.
Mon, 23 Mar 2015 18:21:01 -0700 commands.push: abort when revisions evaluate to empty set (BC)
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 23 Mar 2015 18:21:01 -0700] rev 24429
commands.push: abort when revisions evaluate to empty set (BC) If the "-r" argument is specified to "hg push," the user has expressed an intent for a specific changeset to be present on the remote. If that expression cannot be mapped to a known changeset, the user's intent is ambiguous and cannot be acted upon without making assumptions. Previously, if arguments to `push -r <rev>` evaluated to an empty set (perhaps the user specified a revset that didn't evaluate to anything), the empty "revs" list would be passed down to "exchange.push" where it appears the empty list was being interpreted as "push everything." This patch adds validation to the "-r" argument to the push command. If the argument is specified but doesn't resolve to a changeset, the command will abort instead of doing something potentially unexpected. This patch is technically breaking backwards compatibility. I believe this is justified because the new behavior closes a crack that could result in undefined or under-defined behavior. Also, this patch doesn't drop client capabilities because if users really wanted to push all changesets, they can simply omit the "-r" argument from push completely.
Mon, 23 Mar 2015 17:07:25 -0700 largefiles: fix typo with s/__class/__class__/
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Mar 2015 17:07:25 -0700] rev 24428
largefiles: fix typo with s/__class/__class__/ Commit f78252429e0a (largefiles: don't create chain of __contains__ calls, 2015-03-11) introduced a typo with __class instead of __class__. Let's fix it. There are (obviously) no tests covering this code path, and I could not figure out a way to trigger it, so it remains untested. Spotted by Drew Gottlieb.
Mon, 23 Mar 2015 14:47:35 -0400 hgweb: pull line numbers out of main flow of source content
Paul Fisher <pfish@google.com> [Mon, 23 Mar 2015 14:47:35 -0400] rev 24427
hgweb: pull line numbers out of main flow of source content Pulls the autogenerated line number boxes outside of the padding box of the main content of .sourcelines, allowing the first tab to be properly sized and the line numbers to be outside the main source's margin when text is wrapped.
Mon, 23 Mar 2015 15:41:43 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 23 Mar 2015 15:41:43 -0500] rev 24426
merge with stable
Fri, 20 Mar 2015 23:35:13 -0400 crecord: don't abort on Windows when curses isn't available
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2015 23:35:13 -0400] rev 24425
crecord: don't abort on Windows when curses isn't available This is the hack portion of the previous patch, which can be backed out once we figure out how to deal with curses. Without this, the tests affected by the import problem mentioned in the previous patch fail in exactly the same way, but with the nicer 'module not available' error.
Sat, 21 Mar 2015 01:24:17 -0400 test-fileset: forget non-portable files to avoid failures on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Mar 2015 01:24:17 -0400] rev 24424
test-fileset: forget non-portable files to avoid failures on Windows The 3 deleted lines appeared on Windows, because the files were never created in the first place.
Fri, 20 Mar 2015 23:32:00 -0400 crecord: conditionalize the imports that are not available on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2015 23:32:00 -0400] rev 24423
crecord: conditionalize the imports that are not available on Windows 'fcntl', 'termios' and 'wcurses' are not available on the default Windows python installation, and importing them caused widespread carnage in the test suite. There were 29 different changed test files (on top of unrelated errors), mostly in the form of an ImportError. The failures weren't related to actual crecord use, and followed the import chain: 'localrepo' -> 'subrepo' -> 'cmdutil' -> 'crecord' -> 'fcntl'
Fri, 20 Mar 2015 21:55:11 -0400 cmdutil: drop a duplicate import of crecord
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2015 21:55:11 -0400] rev 24422
cmdutil: drop a duplicate import of crecord It looks like this crept in with 69538481ea9f.
Sat, 16 Aug 2014 17:50:55 +0900 annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Aug 2014 17:50:55 +0900] rev 24421
annotate: add option to annotate working-directory files Working revision or node is displayed with "+" suffix in plain output, but null/None in machine-readable format.
Thu, 19 Mar 2015 23:31:53 +0900 committablefilectx: override linkrev() to point to the associated changectx
Yuya Nishihara <yuya@tcha.org> [Thu, 19 Mar 2015 23:31:53 +0900] rev 24420
committablefilectx: override linkrev() to point to the associated changectx This is necessary to annotate workingctx revision. basefilectx.linkrev() can't be used because committablefilectx has no filelog. committablefilectx looks for parents() from self._changectx. That means fctx is linked to self._changectx, so linkrev() can simply be aliased to rev().
Sat, 16 Aug 2014 13:44:16 +0900 revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Aug 2014 13:44:16 +0900] rev 24419
revset: add wdir() function to specify workingctx revision by command The main purpose of wdir() is to annotate working-directory files. Currently many commands and revsets cannot handle workingctx and may raise exception. For example, -r ":wdir()" results in TypeError. This problem will be addressed by future patches. We could add "wdir" symbol instead, but it would conflict with the existing tag, bookmark or branch. So I decided not to. List of commands that will potentially support workingctx revision: command default remarks -------- ------- ----------------------------------------------------- annotate p1 useful archive p1 might be useful cat p1 might be useful on Windows (no cat) diff p1:wdir (default) export p1 might be useful if wctx can have draft commit message files wdir (default) grep tip:0 might be useful identify wdir (default) locate wdir (default) log tip:0 might be useful with -p or -G option parents wdir (default) status wdir (default) This patch includes minimal test of "hg status" that should be able to handle the workingctx revision.
Sun, 22 Mar 2015 19:08:13 -0400 win32: 'raise ctypes.WinError' -> 'raise ctypes.WinError()' stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Mar 2015 19:08:13 -0400] rev 24418
win32: 'raise ctypes.WinError' -> 'raise ctypes.WinError()' WinError is a function that creates an Error, not an Error itself. This is a partial backout of e34106fa0dc3.
(0) -10000 -3000 -1000 -300 -100 -96 +96 +100 +300 +1000 +3000 +10000 tip