Wed, 15 Apr 2015 17:42:38 -0400 tags: extract .hgtags filenodes cache to a standalone file
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 15 Apr 2015 17:42:38 -0400] rev 24735
tags: extract .hgtags filenodes cache to a standalone file Resolution of .hgtags filenodes values has historically been a performance pain point for large repositories, where reading individual manifests can take over 100ms. Multiplied by hundreds or even thousands of heads and resolving .hgtags filenodes becomes a performance issue. This patch establishes a standalone cache file holding the .hgtags filenodes for each changeset. After this patch, the .hgtags filenode for any particular changeset should only have to be computed once during the lifetime of the repository. The introduced hgtagsfnodes1 cache file is modeled after the rev branch cache: the cache is effectively an array of entries consisting of a changeset fragment and the filenode for a revision. The file grows in proportion to the length of the repository (24 bytes per changeset) and is truncated when the repository is stripped. The file is not written unless tag info is requested and tags have changed since last time. This patch partially addresses issue4550. Future patches will split the "tags" cache file into per-filter files and will refactor the cache format to not capture the .hgtags fnodes, as these are now stored in the hgtagsfnodes1 cache. This patch is capable of standing alone. We should not have to wait on the tags cache filter split and format refactor for this patch to land.
Wed, 15 Apr 2015 12:18:05 -0400 extensions: extract partial application into a bind() function
Eric Sumner <ericsumner@fb.com> [Wed, 15 Apr 2015 12:18:05 -0400] rev 24734
extensions: extract partial application into a bind() function We use partial function application for wrapping existing Mercurial functions, and it's implemented separately each time. This patch extracts the partial application into a new bind() function that can be used on its own by extensions when appropriate. In particular, the evolve extension needs to wrap functions in the various bundle2 processing dictionaries, which the pre-existing methods don't support.
Tue, 14 Apr 2015 11:44:04 -0400 obsolete: experimental flag to get debug about obsmarkers exchange
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Apr 2015 11:44:04 -0400] rev 24733
obsolete: experimental flag to get debug about obsmarkers exchange The obsolescence markers exchange is still experimental. We (developer) need more information about what is going on. I'm adding an experimental flag to add display the amount of data exchanged during bundle2 exchanges.
Tue, 14 Apr 2015 14:59:37 -0400 bundle2: add an 'idx' argument to the 'getbundle2partsgenerator'
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Apr 2015 14:59:37 -0400] rev 24732
bundle2: add an 'idx' argument to the 'getbundle2partsgenerator' This argument let extensions control in what order bundle2 part are generated server side during a pull. This is useful to ensure the transaction is in a proper state before some actions or hooks happens.
Tue, 14 Apr 2015 14:07:35 -0400 bundle2: add an 'idx' argument to the 'b2partsgenerator'
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 14 Apr 2015 14:07:35 -0400] rev 24731
bundle2: add an 'idx' argument to the 'b2partsgenerator' This argument let extensions control in what order bundle2 part are generated client side during a push. This is useful to ensure the transaction is in a proper state before some actions or hooks happens.
Tue, 14 Apr 2015 23:51:02 -0400 rpms: create missing builds dir if it doesn't exist
Mads Kiilerich <madski@unity3d.com> [Tue, 14 Apr 2015 23:51:02 -0400] rev 24730
rpms: create missing builds dir if it doesn't exist
Tue, 14 Apr 2015 23:44:03 -0400 rpms: for packages with their own python, put it in /opt/python-hg
Mads Kiilerich <madski@unity3d.com> [Tue, 14 Apr 2015 23:44:03 -0400] rev 24729
rpms: for packages with their own python, put it in /opt/python-hg This is more compliant with the FHS and Fedora packaging guidelines.
Wed, 14 Jan 2015 01:15:26 +0100 branchcache: stay silent if failing to read cache files
Mads Kiilerich <madski@unity3d.com> [Wed, 14 Jan 2015 01:15:26 +0100] rev 24728
branchcache: stay silent if failing to read cache files The warning has in some cases incorrectly attributed unrelated problems to rbc. Instead, just do like the branch head cache does and stay quiet when reading fails. The cache will be missing the first time a repo is used. It is a normal situation and there is no reason to make a note of that.
Thu, 19 Mar 2015 22:22:50 +0100 merge: better debug messages before/after invoking external merge tool
Mads Kiilerich <mads@kiilerich.com> [Thu, 19 Mar 2015 22:22:50 +0100] rev 24727
merge: better debug messages before/after invoking external merge tool
Sat, 11 Apr 2015 23:00:04 +0900 subrepo: use vfs.walk instead of os.walk
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 23:00:04 +0900] rev 24726
subrepo: use vfs.walk instead of os.walk "dirpath" in the tuple yielded by "vfs.walk()" is relative one from the root of specified vfs, and absolute path in the warning message is composed by "vfs.join()". On the other hand, target file "f" exists in "dirpath", and "reljoin()" is needed to unlink "f" by "vfs.unlink()".
Sat, 11 Apr 2015 23:00:04 +0900 vfs: add walk
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 23:00:04 +0900] rev 24725
vfs: add walk To eliminate "path prefix" (= "the root of vfs") part from "dirpath" yielded by "os.walk()" correctly, "path prefix" should have "os.sep" at the end of own string, but it isn't easy to ensure it, because: - examination by "path.endswith(os.sep)" isn't portable Some problematic encodings use 0x5c (= "os.sep" on Windows) as the tail byte of some multi-byte characters. - "os.path.join(path, '')" isn't portable With Python 2.7.9, this invocation doesn't add "os.sep" at the end of UNC path (see issue4557 for detail). Python 2.7.9 changed also behavior of "os.path.normpath()" (see *) and "os.path.splitdrive()" for UNC path. vfs root normpath splitdrive os.sep required =============== ============== =================== ============ z:\ z:\ z: + \ no z:\foo z:\foo z: + \foo yes z:\foo\ z:\foo z: + \foo yes [before Python 2.7.9] \\foo\bar \\foo\bar '' + \\foo\bar yes \\foo\bar\ \\foo\bar (*) '' + \\foo\bar yes \\foo\bar\baz \\foo\bar\baz '' + \\foo\bar\baz yes \\foo\bar\baz\ \\foo\bar\baz '' + \\foo\bar\baz yes [Python 2.7.9] \\foo\bar \\foo\bar \\foo\bar + '' yes \\foo\bar\ \\foo\bar\ (*) \\foo\bar + \ no \\foo\bar\baz \\foo\bar\baz \\foo\bar + \baz yes \\foo\bar\baz\ \\foo\bar\baz \\foo\bar + \baz yes If it is ensured that "normpath()"-ed vfs root is passed to "splitdrive()", adding "os.sep" is required only when "path" part of "splitdrive()" result isn't "os.sep" itself. This is just what "pathutil.nameasprefix()" examines. This patch applies "os.path.normpath()" on "self.join(None)" explicitly, because it isn't ensured that vfs root is already normalized: vfs itself is constructed with "realpath=False" (= avoid normalizing in "vfs.__init__()") in many code paths. This normalization should be much cheaper than subsequent file I/O for directory traversal.
Sat, 11 Apr 2015 23:00:04 +0900 subrepo: pass wvfs to _sanitize instead of absolute path to a subrepository
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 23:00:04 +0900] rev 24724
subrepo: pass wvfs to _sanitize instead of absolute path to a subrepository As a preparation for vfs migration of "_sanitize()", this patch passes "wvfs" to "_sanitize()" and use "wvfs.base" instead of absolute path to a subrepository.
Wed, 01 Apr 2015 18:43:29 -0700 repoview: move function for computing filtered hash
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Apr 2015 18:43:29 -0700] rev 24723
repoview: move function for computing filtered hash An upcoming patch will establish per-filter tags caches. We'll want to use the same cache validation logic as the branch cache. Prepare for that by moving the logic for computing a filtered view hash to somewhere central.
Tue, 14 Apr 2015 12:54:16 -0400 revset: don't import discovery at module level
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 14 Apr 2015 12:54:16 -0400] rev 24722
revset: don't import discovery at module level discovery.py imports a lot of the world. Pierre-Yves told me to move it to a function-level import to avoid an import cycle in a future patch.
Tue, 14 Apr 2015 10:59:26 -0400 transaction: add missing newline to message
Michael O'Connor <moconnor@janestreet.com> [Tue, 14 Apr 2015 10:59:26 -0400] rev 24721
transaction: add missing newline to message Add a missing newline to the "journal was created by a different version of Mercurial" message.
Sun, 05 Apr 2015 13:16:46 +0900 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org> [Sun, 05 Apr 2015 13:16:46 +0900] rev 24720
cat: disable optimization of single file case for workingctx It crashes because workingctx has no manifest.
Thu, 09 Apr 2015 22:18:55 +0900 committablectx: override manifestnode() to return None
Yuya Nishihara <yuya@tcha.org> [Thu, 09 Apr 2015 22:18:55 +0900] rev 24719
committablectx: override manifestnode() to return None wctx.manifestnode() crashed before because it has no _changeset. Instead of crashing, just return None like wctx.node().
Sat, 11 Apr 2015 16:01:42 +0900 cat: use ctx.manifestnode() in place of ctx._changeset[0]
Yuya Nishihara <yuya@tcha.org> [Sat, 11 Apr 2015 16:01:42 +0900] rev 24718
cat: use ctx.manifestnode() in place of ctx._changeset[0]
Fri, 10 Apr 2015 23:34:06 -0400 changegroup: flush the ui stdio buffers after adding a changegroup
Matt Harbison <matt_harbison@yahoo.com> [Fri, 10 Apr 2015 23:34:06 -0400] rev 24717
changegroup: flush the ui stdio buffers after adding a changegroup This eliminates the following test failure on Windows, as well as a similar one in evolve's test-wireproto.t. See the previous patch for details on the problem. --- e:/Projects/hg/tests/test-init.t +++ e:/Projects/hg/tests/test-init.t.err @@ -216,10 +216,10 @@ * test 0:08b9e9f63b32 $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote-bookmarks searching for changes + exporting bookmark test remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files - exporting bookmark test $ hg -R remote-bookmarks bookmarks test 0:08b9e9f63b32
Fri, 10 Apr 2015 22:30:19 -0400 hook: forcibly flush stderr for Windows test stability
Matt Harbison <matt_harbison@yahoo.com> [Fri, 10 Apr 2015 22:30:19 -0400] rev 24716
hook: forcibly flush stderr for Windows test stability There are a handful of SSH related test failures on Windows. --- c:/Users/Matt/Projects/hg/tests/test-bundle2-exchange.t +++ c:/Users/Matt/Projects/hg/tests/test-bundle2-exchange.t.err @@ -305,16 +305,16 @@ remote: added 1 changesets with 1 changes to 1 files remote: 1 new obsolescence markers updating bookmark book_5fdd + pre-close-tip:02de42196ebe draft book_02de + postclose-tip:02de42196ebe draft book_02de + txnclose hook: HG_SOURCE=push-response HG_TXNNAME=push-response + ssh://user@dummy/other HG_URL=ssh://user@dummy/other remote: pre-close-tip:5fddd98957c8 draft book_5fdd remote: pushkey: lock state after "bookmarks" remote: lock: free remote: wlock: free remote: postclose-tip:5fddd98957c8 draft book_5fdd remote: txnclose hook: (env vars truncated) - pre-close-tip:02de42196ebe draft book_02de - postclose-tip:02de42196ebe draft book_02de - txnclose hook: HG_SOURCE=push-response HG_TXNNAME=push-response - ssh://user@dummy/other HG_URL=ssh://user@dummy/other $ hg -R other log -G o 6:5fddd98957c8 draft Nicolas Dumazet <...> book_5fdd C | --- c:/Users/Matt/Projects/hg/tests/test-ssh.t +++ c:/Users/Matt/Projects/hg/tests/test-ssh.t.err @@ -438,12 +438,12 @@ $ hg push pushing to ssh://user@dummy/remote searching for changes + local stdout remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files - remote: KABOOM - local stdout + remote: KABOOM\r (esc) $ cd .. What is happening is that no data is available in 'sshpeer.pipee' while the command is executing. As the command completes, local output is printed, and then sshpeer.cleanup() is called. When it calls 'self.pipeo.close()', the child process is shutdown, flushing stderr. As an experiment, I printed a line to stdout and another to stderr instead this flush(). The stdout data was immediately available to the hg client, and none of the stderr data was until the child exited. At that point, pipee has all of the buffered data, and it is read out and printed before the pipe is closed in sshpeer.cleanup(). This is probably a known issue, since ui.write_err() mentions that stderr may be buffered, and also flushes stderr. It would be nice if there was a more general fix (there is one more test that fails), but I'm not sure what it is. I've seen (ancient) references [1] to setvbuf() "crashing spectacularly" on some systems if any I/O has been done already, so it seems worth avoiding. https://sourceware.org/ml/gdb-patches/2013-08/msg00422.html [1] https://groups.google.com/forum/#!msg/comp.lang.python/JT8LiYzYDEY/Qg9d1HwyjScJ
Fri, 10 Apr 2015 22:37:40 -0400 json: implement {fileannotate} template
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 10 Apr 2015 22:37:40 -0400] rev 24715
json: implement {fileannotate} template
Fri, 10 Apr 2015 22:26:53 -0400 json: implement {comparison} template
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 10 Apr 2015 22:26:53 -0400] rev 24714
json: implement {comparison} template Similar to {filediff}, we abbreviate some property names to cut down on string bloat.
Fri, 10 Apr 2015 22:39:22 -0400 json: implement {filediff} template
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 10 Apr 2015 22:39:22 -0400] rev 24713
json: implement {filediff} template Single letter properties are used to keep payload size down, as diff representation can be quite large and longer property names can create a lot of extra work for parsers. Rename is not yet captured. This can be done in a follow-up.
Fri, 10 Apr 2015 22:34:12 -0400 hgweb: expose raw line numbers to templates
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 10 Apr 2015 22:34:12 -0400] rev 24712
hgweb: expose raw line numbers to templates Surpringly, the templates didn't receive an unmodified version of the line numbers. Expose it to make implementing the JSON templates easier. In theory, we could post-process an existing template variable. But extra string manipulation seems quite wasteful, especially on items that could occur hundreds or even thousands of times in output.
Sat, 11 Apr 2015 11:54:09 -0400 revert: stop marking files clean after interactive revert (issue4592)
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 11 Apr 2015 11:54:09 -0400] rev 24711
revert: stop marking files clean after interactive revert (issue4592) The goal of 'hg revert --interactive' is usually to keep some change in the revert file, so the files -must-not- be marked as clean. We want the status logic to do its usual job here. For unclear reasons (probably timing related), I was unable to build an automated test that reproduced issue4592 but manual testing shows this is fixed.
Sat, 11 Apr 2015 11:56:21 -0400 lazymanifest: prevent leak when updating an entry more than once
Augie Fackler <augie@google.com> [Sat, 11 Apr 2015 11:56:21 -0400] rev 24710
lazymanifest: prevent leak when updating an entry more than once __setitem__ on the lazymanifest C type wasn't checking to see if a line had previously been malloced before replacing it, leading to leaks if files got updated multiple times in the course of a task. I was able to reproduce the leak with this change to test-manifest.py: diff --git a/tests/test-manifest.py b/tests/test-manifest.py --- a/tests/test-manifest.py +++ b/tests/test-manifest.py @@ -456,6 +456,16 @@ class basemanifesttests(object): ['a/b/c/bar.txt', 'a/b/c/foo.txt', 'a/b/d/ten.txt'], m2.keys()) + def testManifestSetItem(self): + m = self.parsemanifest('') + for x in range(3): + m['file%d' % x] = BIN_HASH_1 + for x in range(3): + m['file%d' % x] = BIN_HASH_2 + import time + time.sleep(4) + + along with the commands: $ make local $ PYTHONPATH=. SILENT_BE_NOISY=1 python tests/test-manifest.py testmanifestdict.testManifestSetItem & $ sleep 4 $ leaks $(jobs -p | tee /dev/stderr | awk '{print $3}') $ wait in an interactive shell on OS X. As far as I can tell, it had to be an interactive shell so that I could get the pid of the test run using the jobs builtin. Prior to this change, I was leaking several strings, and after this change leaks reports no leaks. I thought there was a bug filed for this in bugzilla, but I can't find it either in bugzilla or by searching my email.
Mon, 13 Apr 2015 07:42:25 -0500 strip: properly clear resolve state with --keep (issue4593)
Matt Mackall <mpm@selenic.com> [Mon, 13 Apr 2015 07:42:25 -0500] rev 24709
strip: properly clear resolve state with --keep (issue4593) Normal updates automatically clean up the resolve state, but strip --keep does a "manual" update that bypasses the normal machinery. This adds a mergestate reset.
Mon, 13 Apr 2015 20:53:05 -0700 revsets: more informative syntax error message
Ryan McElroy <rmcelroy@fb.com> [Mon, 13 Apr 2015 20:53:05 -0700] rev 24708
revsets: more informative syntax error message I came across a case where an internal command was using a revset that I didn't immediately pass in and it was difficult to debug what was going wrong with the revset. This prints out the revset and informs the user that the error is with a rebset so it should be more obvious what and where the error is.
Mon, 13 Apr 2015 21:06:21 -0700 revsets: show current revset abort behavior
Ryan McElroy <rmcelroy@fb.com> [Mon, 13 Apr 2015 21:06:21 -0700] rev 24707
revsets: show current revset abort behavior
Mon, 13 Apr 2015 13:28:37 -0400 tests: move blackbox testing of tags to test-tags.t
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Apr 2015 13:28:37 -0400] rev 24706
tests: move blackbox testing of tags to test-tags.t We're going to refactor tags cache shortly. It is easier to test the blackbox logging if these tests are in test-tags.t.
Mon, 13 Apr 2015 09:36:33 -0400 tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 13 Apr 2015 09:36:33 -0400] rev 24705
tests: move mock blackbox extension into own file Having all blackbox log testing in test-blackbox.t isn't scalable. Move the mock blackbox extension into its own file so we can start to move blackbox logging into other tests.
Sun, 12 Apr 2015 14:59:31 -0400 shelve: acquire lock in the right order
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 14:59:31 -0400] rev 24704
shelve: acquire lock in the right order Text book says that 'wlock' should be acquired before 'lock'. Caught through developer warning.
Sun, 12 Apr 2015 14:54:53 -0400 check-commit: be more picky about detection of wrong bug tag
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 12 Apr 2015 14:54:53 -0400] rev 24703
check-commit: be more picky about detection of wrong bug tag The check-commit script search for "bug" withing bracket and ask people to use (issueXXXX) instead. The test was too wide and matching any "(+b+u+g"sequence.
Mon, 13 Apr 2015 09:54:36 -0400 discovery: don't compute allfuturecommon when it won't be used
Michael O'Connor <moconnor@janestreet.com> [Mon, 13 Apr 2015 09:54:36 -0400] rev 24702
discovery: don't compute allfuturecommon when it won't be used In repos with many changesets, the computation of allfuturecommon can take a significant amount of time. Since it's only used if there's an obsstore, don't compute it otherwise.
Fri, 10 Apr 2015 18:54:33 -0700 treemanifest: separate flags for trees in memory and trees on disk
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Apr 2015 18:54:33 -0700] rev 24701
treemanifest: separate flags for trees in memory and trees on disk When we start writing tree manifests with one manifest revlog per directory, it will still be nice to be able to run tests using tree manifests in memory but writing to a flat manifest to a single revlog. Let's break the current '_usetreemanifest' flag on the revlog into '_treeinmem' and '_treeondisk'. Both are populated from the same config, but after this change, one can temporarily hard-code _treeinmem=True to see that tests still pass.
Fri, 10 Apr 2015 18:13:01 -0700 manifestdict: drop empty-string argument when creating empty manifest
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Apr 2015 18:13:01 -0700] rev 24700
manifestdict: drop empty-string argument when creating empty manifest manifestdict() creates an empty manifestdict, so let's consistently use that instead of explicitly parsing an empty string (which does result in an empty manifest).
Sun, 12 Apr 2015 06:51:13 -0700 lazymanifest: fix memory leak in lmiter_iterentriesnext() after 3d485727e45e
Mike Hommey <mh@glandium.org> [Sun, 12 Apr 2015 06:51:13 -0700] rev 24699
lazymanifest: fix memory leak in lmiter_iterentriesnext() after 3d485727e45e
Sat, 11 Apr 2015 12:26:54 -0400 revert: do not requires '--all' if '--interative' is present
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 11 Apr 2015 12:26:54 -0400] rev 24698
revert: do not requires '--all' if '--interative' is present The '--all' option have been introduced in 890e285c52a1 (August 2006), most probably to prevent user shooting themselves in the foot. As the record process will let you, view and select the set of files and change you want to revert, I feel like the '--all' flag is superfluous in the '--interactive' case.
Thu, 09 Apr 2015 16:18:38 -0400 bundle2: drop the experimental hooks
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 09 Apr 2015 16:18:38 -0400] rev 24697
bundle2: drop the experimental hooks The series at e9ede9b4c2f8::8e13cc0825f1 introduced generic transaction level hooking. This makes the experimental bundle2 specific hooks redundant, we drop them.
Fri, 10 Apr 2015 15:41:33 -0400 bundle2: advertise bundle2 by default
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 10 Apr 2015 15:41:33 -0400] rev 24696
bundle2: advertise bundle2 by default That way, any new server will be ready to accept bundle2 payload. The decision for the client to use it is still off by default so this is not turning bundle2 everywhere. We introduce a new kill switch for this in case stuff goes wrong.
Sat, 07 Feb 2015 12:57:40 -0500 subrepo: convert the os.path references in git to vfs
Matt Harbison <matt_harbison@yahoo.com> [Sat, 07 Feb 2015 12:57:40 -0500] rev 24695
subrepo: convert the os.path references in git to vfs There are a handful of os.path references in the free functions at the top of the module that will be trickier to remove.
Sat, 11 Apr 2015 00:47:09 +0900 subrepo: use vfs.removedirs instead of os.removedirs
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24694
subrepo: use vfs.removedirs instead of os.removedirs This patch also removes useless composing absolute path by "repo.wjoin()".
Sat, 11 Apr 2015 00:47:09 +0900 vfs: add removedirs
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24693
vfs: add removedirs
Sat, 11 Apr 2015 00:47:09 +0900 util: add removedirs as platform depending function
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24692
util: add removedirs as platform depending function According to fa901423ac23 introducing "windows._removedirs()": If a hg repository including working directory is a reparse point (directory symlinked or a junction point), then using os.removedirs will remove the reparse point erroneously. "windows._removedirs()" should be used instead of "os.removedirs()" on Windows. This patch adds "removedirs" as platform depending function to replace "os.removedirs()" invocations for portability and safety
Sat, 11 Apr 2015 00:47:09 +0900 subrepo: use vfs.unlink instead of os.remove
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24691
subrepo: use vfs.unlink instead of os.remove This patch also removes useless composing absolute path by "os.path.join()".
Sat, 11 Apr 2015 00:47:09 +0900 subrepo: use vfs.rmtree instead of shutil.rmtree
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24690
subrepo: use vfs.rmtree instead of shutil.rmtree This patch also removes useless "shutil" import.
Sat, 11 Apr 2015 00:47:09 +0900 vfs: add rmtree
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24689
vfs: add rmtree This duplicates "onerror()" function from "svnsubrepo.remove()" for equivalence of replacing in subsequent patch. This "onerror()" function for "shutil.rmtree()" was introduced by 92b0d669637f, which avoids failure of removing svn repository on Windows.
Sat, 11 Apr 2015 00:47:09 +0900 subrepo: use vfs.readdir instead of os.listdir to avoid expensive stat calls
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 11 Apr 2015 00:47:09 +0900] rev 24688
subrepo: use vfs.readdir instead of os.listdir to avoid expensive stat calls "kind" information given from "vfs.readdir()" makes expensive stat calls "os.path.isdir()" and "os.path.islink()" useless.
Fri, 10 Apr 2015 08:05:50 +0300 editor: prefer 'intermediate-source' extra to use for HGREVISION environment variable
Alexander Drozdov <al.drozdov@gmail.com> [Fri, 10 Apr 2015 08:05:50 +0300] rev 24687
editor: prefer 'intermediate-source' extra to use for HGREVISION environment variable Revision 51930a7180bd ('graft: record intermediate grafts in extras') introduced 'intermediate-source' extra which refers to the closest graft source. As 'intermediate-source' extra provides more detailed information about the source changeset than 'source' one, it is better to prefer the first one to use as a value of HGREVISION environment variable for an editor.
Thu, 09 Apr 2015 16:25:48 -0400 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 09 Apr 2015 16:25:48 -0400] rev 24686
bundle2: rename format, parts and config to final names It is finally time to freeze the bundle2 format! To do so we: - rename HG2Y to HG20, - drop "b2x:" prefix from all part names, - rename capability to "bundle2-exp" to "bundle2" - rename the hook flag from 'bundle2-exp' to 'bundle2'
Wed, 08 Apr 2015 09:38:09 -0700 manifestdict: extract condition for _intersectfiles() and use for walk()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 08 Apr 2015 09:38:09 -0700] rev 24685
manifestdict: extract condition for _intersectfiles() and use for walk() The condition on which manifestdict.matches() and manifestdict.walk() take the fast path of iterating over files instead of the manifest, is slightly different. Specifically, walk() does not take the fast path for exact matchers and it does not avoid taking the fast path when there are more than 100 files. Let's extract the condition so we don't have to maintain it in two places and so walk() can gain these two missing pieces of the condition (although there seems to be no current caller of walk() with an exact matcher).
Tue, 07 Apr 2015 22:40:25 -0700 manifestdict.walk: remove now-redundant check for match.files()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 07 Apr 2015 22:40:25 -0700] rev 24684
manifestdict.walk: remove now-redundant check for match.files() When checking whether we can take the fast path of iterating over matcher files instead of manifest files, we check whether match.files() is non-empty. However, now that return early for match.always(), it can only be empty when there are only include/exclude patterns, but in that case anypats() will be True, so it's already covered. This makes manifestdict.walk() more similar to manifestdict.matches().
Tue, 07 Apr 2015 21:08:23 -0700 manifest.walk: special-case match.always() for speed
Martin von Zweigbergk <martinvonz@google.com> [Tue, 07 Apr 2015 21:08:23 -0700] rev 24683
manifest.walk: special-case match.always() for speed This cuts down the run time of hg files -r . > /dev/null from ~0.850s to ~0.780s on the Firefox repo. Note that manifest.matches() already has the corresponding optimization.
Tue, 07 Apr 2015 22:36:17 -0700 manifest.walk: use return instead of StopIteration in generator
Martin von Zweigbergk <martinvonz@google.com> [Tue, 07 Apr 2015 22:36:17 -0700] rev 24682
manifest.walk: use return instead of StopIteration in generator Using "return" within a generator is supposedly more Pythonic than raising StopIteration.
Wed, 08 Apr 2015 23:30:02 +0900 archive: look for first visible revision to build repo identity (issue4591)
Yuya Nishihara <yuya@tcha.org> [Wed, 08 Apr 2015 23:30:02 +0900] rev 24681
archive: look for first visible revision to build repo identity (issue4591) No test for the case where all revisions are hidden because "archive" command aborts if the target revision is null.
Wed, 08 Apr 2015 22:42:37 +0900 largefiles: use common function to build content of .hg_archival.txt
Yuya Nishihara <yuya@tcha.org> [Wed, 08 Apr 2015 22:42:37 +0900] rev 24680
largefiles: use common function to build content of .hg_archival.txt This fixes the missing "changessincelatesttag" field introduced by 242d11819c6c.
Wed, 08 Apr 2015 22:38:46 +0900 test-largefiles: verify content of .hg_archival.txt
Yuya Nishihara <yuya@tcha.org> [Wed, 08 Apr 2015 22:38:46 +0900] rev 24679
test-largefiles: verify content of .hg_archival.txt
Wed, 08 Apr 2015 22:37:03 +0900 archive: extract metadata() closure to module-level function
Yuya Nishihara <yuya@tcha.org> [Wed, 08 Apr 2015 22:37:03 +0900] rev 24678
archive: extract metadata() closure to module-level function This function will be reused in largefiles.
Wed, 08 Apr 2015 22:31:04 +0900 archive: use ctx object consistently to build meta data
Yuya Nishihara <yuya@tcha.org> [Wed, 08 Apr 2015 22:31:04 +0900] rev 24677
archive: use ctx object consistently to build meta data
Wed, 08 Apr 2015 21:04:06 +0900 templatekw: have {manifest} use ctx.manifestnode() for consistency
Yuya Nishihara <yuya@tcha.org> [Wed, 08 Apr 2015 21:04:06 +0900] rev 24676
templatekw: have {manifest} use ctx.manifestnode() for consistency changeset_printer was updated at f57640bf10d4 to not access changeset by index.
Fri, 10 Apr 2015 00:36:42 +0900 subrepo: use vfs.reljoin instead of os.path.join
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 10 Apr 2015 00:36:42 +0900] rev 24675
subrepo: use vfs.reljoin instead of os.path.join
Fri, 10 Apr 2015 00:36:42 +0900 subrepo: inline reporelpath into abstractsubrepo._relpath to centralize logic
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 10 Apr 2015 00:36:42 +0900] rev 24674
subrepo: inline reporelpath into abstractsubrepo._relpath to centralize logic "reporelpath()" is referred only from "abstractsubrepo._relpath()".
Fri, 10 Apr 2015 00:36:42 +0900 subrepo: add _relpath field to centralize subrelpath logic
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 10 Apr 2015 00:36:42 +0900] rev 24673
subrepo: add _relpath field to centralize subrelpath logic This patch adds propertycache-ed "_relpath" field to "abstractsubrepo", to centralize "subrelpath" logic into it. Now, "subrelpath()" can always return "_relpath" field of the specified subrepo object, because it is ensured that subrepo object has it. To reduce changes in this patch, "subrelpath()" itself is still kept, even though it seems to be redundant. This is also a part of eliminating "os.path.*" API invocations for "Windows UTF-8 Plan".
Fri, 10 Apr 2015 00:36:42 +0900 subrepo: add wvfs field to access the working directory via vfs
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 10 Apr 2015 00:36:42 +0900] rev 24672
subrepo: add wvfs field to access the working directory via vfs This patch doesn't create vfs object in "abstractsubrepo.__init__()" but adds propertycache-ed "wvfs" field, because the latter can: - delay vfs instantiation until it is actually needed - allow to use "hgsubrepo._repo.wvfs" as "wvfs" "hgsubrepo._repo" is initialized after "abstractsubrepo.__init__()" invocation, and passing "hgsubrepo._repo.wvfs" to "abstractsubrepo.__init__()" is difficult.
Fri, 10 Apr 2015 00:36:42 +0900 subrepo: change arguments of abstractsubrepo.__init__ (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 10 Apr 2015 00:36:42 +0900] rev 24671
subrepo: change arguments of abstractsubrepo.__init__ (API) This patch passes "ctx" and "path" instead of "ui" to "abstractsubrepo.__init__()" and stores them as "_ctx" and "_path" to use them in subsequent patches. This also removes redundant field initializations in the constructor of classes derived from "abstractsubrepo".
Tue, 07 Apr 2015 15:18:52 -0700 treemanifest: optimize treemanifest._walk() to skip directories
Drew Gottlieb <drgott@google.com> [Tue, 07 Apr 2015 15:18:52 -0700] rev 24670
treemanifest: optimize treemanifest._walk() to skip directories This makes treemanifest.walk() not visit submanifests that are known not to have any matching files. It does this by calling match.visitdir() on submanifests as it walks. This change also updates largefiles to be able to work with this new behavior in treemanifests. It overrides match.visitdir(), the function that dictates how walk() and matches() skip over directories. The greatest speed improvements are seen with narrower scopes. For example, this commit speeds up the following command on the Mozilla repo from 1.14s to 1.02s: hg files -r . dom/apps/ Whereas with a wider scope, dom/, the speed only improves from 1.21s to 1.13s. As with similar a similar optimization to treemanifest.matches(), this change will bring out even bigger performance improvements once treemanifests are loaded lazily. Once that happens, we won't just skip over looking at submanifests, but we'll skip even loading them.
Wed, 08 Apr 2015 22:31:50 -0400 import-checker: force 'fcntl', 'grp', 'pwd', and 'termios' to stdlib modules
Matt Harbison <matt_harbison@yahoo.com> [Wed, 08 Apr 2015 22:31:50 -0400] rev 24669
import-checker: force 'fcntl', 'grp', 'pwd', and 'termios' to stdlib modules These are Unix only, and caused these additional warnings on Windows if they aren't hardcoded as stdlib: mercurial/posix.py mixed imports stdlib: errno, getpass, os, socket, stat, sys, tempfile relative: grp, pwd, unicodedata mercurial/posix.py mixed imports stdlib: re relative: fcntl mercurial/posix.py mixed imports stdlib: array relative: termios Additionally, this was missing on Windows: mercurial/crecord.py mixed imports stdlib: fcntl, termios relative: curses https://docs.python.org/2/library/fcntl.html https://docs.python.org/2/library/grp.html https://docs.python.org/2/library/pwd.html https://docs.python.org/2/library/termios.html
Wed, 08 Apr 2015 22:23:51 -0400 import-checker: allow *.pyd based stdlib modules
Matt Harbison <matt_harbison@yahoo.com> [Wed, 08 Apr 2015 22:23:51 -0400] rev 24668
import-checker: allow *.pyd based stdlib modules These are Windows dlls, and eliminate the following import check diffs that are not on Unix: mercurial/changegroup.py mixed imports stdlib: os, struct, tempfile, zlib relative: bz2 mercurial/encoding.py mixed imports stdlib: locale, os relative: unicodedata
Tue, 07 Apr 2015 22:35:44 -0700 manifest.walk: join nested if-conditions
Martin von Zweigbergk <martinvonz@google.com> [Tue, 07 Apr 2015 22:35:44 -0700] rev 24667
manifest.walk: join nested if-conditions This makes it more closely match the similar condition in manifestdict.matches().
Wed, 08 Apr 2015 10:01:31 -0700 manifestdict: inline _intersectfiles()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 08 Apr 2015 10:01:31 -0700] rev 24666
manifestdict: inline _intersectfiles() The _intersectfiles() method is only called from one place, it's pretty short, and its caller has to be aware when it's appropriate to call it (when the number of files in the matcher is not too large), so let's inline it.
Wed, 08 Apr 2015 10:03:59 -0700 manifestdict._intersectfiles: avoid one level of property indirection
Martin von Zweigbergk <martinvonz@google.com> [Wed, 08 Apr 2015 10:03:59 -0700] rev 24665
manifestdict._intersectfiles: avoid one level of property indirection We have already bothered to extract "lm = self._lm", so let's use "lm" where possible.
Wed, 08 Apr 2015 10:06:05 -0700 manifestdict.matches: avoid name 'lm' for a not-lazymanifest
Martin von Zweigbergk <martinvonz@google.com> [Wed, 08 Apr 2015 10:06:05 -0700] rev 24664
manifestdict.matches: avoid name 'lm' for a not-lazymanifest
Tue, 24 Mar 2015 21:25:57 +0100 commands: add ui.statuscopies config knob
Mathias De Maré <mathias.demare@gmail.com> [Tue, 24 Mar 2015 21:25:57 +0100] rev 24663
commands: add ui.statuscopies config knob statuscopies enables viewing of copies and moves in 'hg status' by default.
Sat, 04 Apr 2015 22:30:59 +0900 changelog: inline revlog.__contains__ in case it is used in hot loop
Yuya Nishihara <yuya@tcha.org> [Sat, 04 Apr 2015 22:30:59 +0900] rev 24662
changelog: inline revlog.__contains__ in case it is used in hot loop Currently __contains__ is called only by "rev()" revset, but "x in cl" is a function that is likely to be used in hot loop. revlog.__contains__ is simple enough to duplicate to changelog, so just inline it.
Wed, 08 Apr 2015 02:56:19 +0900 bookmarks: show detailed status about outgoing bookmarks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 08 Apr 2015 02:56:19 +0900] rev 24661
bookmarks: show detailed status about outgoing bookmarks Before this patch, "hg outgoing -B" shows only difference of bookmarks between two repositories, and it isn't user friendly. This patch shows detailed status about outgoing bookmarks at "hg outgoing -B". To avoid breaking backward compatibility with other tool chains, this patch shows status, only if --verbose is specified,
Wed, 08 Apr 2015 02:56:19 +0900 bookmarks: show detailed status about incoming bookmarks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 08 Apr 2015 02:56:19 +0900] rev 24660
bookmarks: show detailed status about incoming bookmarks Before this patch, "hg incoming -B" shows only difference of bookmarks between two repositories, and it isn't user friendly. This patch shows detailed status about incoming bookmarks at "hg incoming -B". To avoid breaking backward compatibility with other tool chains, this patch shows status, only if --verbose is specified,
Wed, 08 Apr 2015 02:56:19 +0900 bookmarks: enhance test of showing detail about incoming/outgoing bookmarks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 08 Apr 2015 02:56:19 +0900] rev 24659
bookmarks: enhance test of showing detail about incoming/outgoing bookmarks
Wed, 08 Apr 2015 02:56:19 +0900 bookmarks: show outgoing bookmarks more exactly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 08 Apr 2015 02:56:19 +0900] rev 24658
bookmarks: show outgoing bookmarks more exactly Before this patch, "hg outgoing -B" shows only bookmarks added locally. Then, users can't know about bookmarks below before "hg push" execution. - deleted locally (even though it may be added remotely from "hg pull" view) - advanced locally - diverged - changed (= remote revision is unknown for local) This patch shows such bookmarks, too.
Wed, 08 Apr 2015 02:56:19 +0900 bookmarks: show incoming bookmarks more exactly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 08 Apr 2015 02:56:19 +0900] rev 24657
bookmarks: show incoming bookmarks more exactly Before this patch, "hg incoming -B" shows only bookmarks added remotely. Then, users can't know about bookmarks below before "hg pull" execution. - advanced remotely - diverged - changed (remote revision is unknown for local) This patch shows such bookmarks, too.
Tue, 07 Apr 2015 15:16:19 -0700 test-manifest: add some test coverage for treemanifest
Drew Gottlieb <drgott@google.com> [Tue, 07 Apr 2015 15:16:19 -0700] rev 24656
test-manifest: add some test coverage for treemanifest Similar to the testmanifest test case, testtreemanifest extends the base test case but uses treemanifests instead of manifestdicts. Adding this test provides some basic test coverage of treemanifest within the standard test suite.
Tue, 07 Apr 2015 15:16:19 -0700 test-manifest: make manifesttest a base class that is extended
Drew Gottlieb <drgott@google.com> [Tue, 07 Apr 2015 15:16:19 -0700] rev 24655
test-manifest: make manifesttest a base class that is extended The implementation of the testmanifest test case is moved to a new base class, which is then extended to make the testmanifest. And instead of testmanifest, the subclass is named testmanifestdict because, well, that's what it's testing. This refactoring makes it possible to create alternate versions of what was formerly testmanifest, improving test coverage of different manifestdict implementations.
Tue, 07 Apr 2015 15:16:19 -0700 test-manifest: move parsemanifest() to be a testmanifest class method
Drew Gottlieb <drgott@google.com> [Tue, 07 Apr 2015 15:16:19 -0700] rev 24654
test-manifest: move parsemanifest() to be a testmanifest class method This refactoring lets testmanifest subclasses override this method to return different manifestdict implementations, such as treemanifest. It is useful for later commits where the testmanifest class is moved into a base class, and test cases that extend the base class can provide their own parsemanifest() implementation.
Tue, 07 Apr 2015 22:31:36 -0400 windows: allow readpipe() to actually read data out of the pipe
Matt Harbison <matt_harbison@yahoo.com> [Tue, 07 Apr 2015 22:31:36 -0400] rev 24653
windows: allow readpipe() to actually read data out of the pipe It appears that the read() in readpipe() never actually ran before (in test-ssh.t anyway). A print of the size returned from os.fstat() is 0 for every single print output in test-ssh.t, so the data in the pipe ends up being read later instead of when it is available. This is the same problem as Linux, as mentioned in 331cbf088c4c. There are several places in the Windows SSH tests where the order of local output vs remote output differ from the other platforms. This only fixes one of those cases (and interstingly, not the one added in order to test 331cbf088c4c), so there is more investigation needed. However, without this patch, test-ssh.t also has this diff: --- c:/Users/Matt/Projects/hg/tests/test-ssh.t +++ c:/Users/Matt/Projects/hg/tests/test-ssh.t.err @@ -397,11 +397,11 @@ $ hg push --ssh "sh ../ssh.sh" pushing to ssh://user@dummy/*/remote (glob) searching for changes - remote: Permission denied - remote: abort: prechangegroup.hg-ssh hook failed - remote: Permission denied - remote: pushkey-abort: prepushkey.hg-ssh hook failed updating 6c0482d977a3 to public failed! + remote: Permission denied + remote: abort: prechangegroup.hg-ssh hook failed + remote: Permission denied + remote: pushkey-abort: prepushkey.hg-ssh hook failed [1] $ cd .. Output with this change was stable over 600+ runs of test-ssh.t. I initially tried a background thread to read the pipe[1], but this was simpler and the test results were exactly the same. I also tried SetNamedPipeHandleState(), but the PIPE_NOWAIT is for compatibility with LANMAN 2.0, not for async I/O (the results were identical though). [1] http://eyalarubas.com/python-subproc-nonblock.html
Tue, 07 Apr 2015 22:30:25 -0400 win32: add a method to fetch the available pipe data size
Matt Harbison <matt_harbison@yahoo.com> [Tue, 07 Apr 2015 22:30:25 -0400] rev 24652
win32: add a method to fetch the available pipe data size This will be used in the next patch to do nonblocking reads from the child process, like on posix platforms. See that for why os.fstat() is insufficient.
Tue, 07 Apr 2015 20:43:04 -0700 dirs._addpath: reinstate use of Py_CLEAR
Siddharth Agarwal <sid0@fb.com> [Tue, 07 Apr 2015 20:43:04 -0700] rev 24651
dirs._addpath: reinstate use of Py_CLEAR I changed this to an explicit Py_DECREF + set to null in 6f0e6fa9fdd7. This was a silly misunderstanding on my part -- for some reason I thought Py_CLEAR set its argument to null only if its refcount reached 0. Turns out that's not actually the case -- Py_CLEAR is just Py_DECREF + set to null with some additional precautions around destructors that aren't relevant here. The real bug that 6f0e6fa9fdd7 fixed was the fact that we were mutating the string after setting it in the Python dictionary.
Mon, 06 Apr 2015 18:31:59 -0700 exchange: introduce a '_canusebundle2' function
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Apr 2015 18:31:59 -0700] rev 24650
exchange: introduce a '_canusebundle2' function This function refactors the logic that decides to use 'bundle2' during an exchange (pull/push). This will help being consistent while transitioning from the experimental protocol to the final frozen version. I do not expect this function to survive on the long run when using 'bundle2' will become a simple capability check. This is also necessary to allow HG2Y support in an extension to ease transition of companies using the experimental protocol in production (yeah...). Such extension will be able to wrap this function to use the experimental protocol in some case.
Tue, 07 Apr 2015 16:01:32 -0700 bundle2: detect bundle2 stream/request on /HG2./ instead of /HG2Y/
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Apr 2015 16:01:32 -0700] rev 24649
bundle2: detect bundle2 stream/request on /HG2./ instead of /HG2Y/ To support more bundle2 formats, we need a wider detection of bundle2-family streams. The various places what were explicitly detecting the full magic string are now matching on the first three characters of it.
Mon, 06 Apr 2015 17:23:11 -0700 unbundle20: allow generic dispatch between unbundlers
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Apr 2015 17:23:11 -0700] rev 24648
unbundle20: allow generic dispatch between unbundlers We now take full advantage of the 'getunbundler' function by using a '{version -> unbundler-class}' mapping. This map currently contains a single entry but will make it easy to support more versions from an extension/the future. At some point, this map will probably contain bundler-class information too, in the same fashion the packer map does. However, this is not critically required right now so it will happen by itself when needed. The main target is to allow HG2Y support in an extension to ease transition of companies using the experimental protocol in production (yeah...) But I've no doubt this will be useful when playing with a future HG21.
Tue, 07 Apr 2015 15:18:52 -0700 treemanifest: refactor treemanifest.walk()
Drew Gottlieb <drgott@google.com> [Tue, 07 Apr 2015 15:18:52 -0700] rev 24647
treemanifest: refactor treemanifest.walk() This refactor is a preparation for an optimization in the next commit. This introduces a recursive element that recurses each submanifest. By using a recursive function, the next commit can avoid walking over some subdirectories altogether.
Tue, 07 Apr 2015 15:18:52 -0700 manifest: move changectx.walk() to manifests
Drew Gottlieb <drgott@google.com> [Tue, 07 Apr 2015 15:18:52 -0700] rev 24646
manifest: move changectx.walk() to manifests The logic of walking a manifest to yield files matching a match object is currently being done by context, not the manifest itself. This moves the walk() function to both manifestdict and treemanifest. This separate implementation will also permit differing, optimized implementations for each manifest.
Sun, 05 Apr 2015 15:08:55 -0400 subrepo: precisely identify the missing subrepo spec file
Matt Harbison <matt_harbison@yahoo.com> [Sun, 05 Apr 2015 15:08:55 -0400] rev 24645
subrepo: precisely identify the missing subrepo spec file It isn't obvious which file is the problem with deep subrepos, so provide the path. Since the parsing is done with a ctx and not a subrepo object, it isn't possible to display a path from the root subrepo. Therefore, the path shown is relative to cwd. There's no test coverage for the first abort, and I couldn't figure out how to trigger it, but it is changed for consistency.
Sun, 05 Apr 2015 12:12:02 -0700 graft: record intermediate grafts in extras
Durham Goode <durham@fb.com> [Sun, 05 Apr 2015 12:12:02 -0700] rev 24644
graft: record intermediate grafts in extras Previously the extra field for a graft only contained the original commit hash. This made it impossible to use graft to copy a commit more than once, because the extras fields did not change after the second graft. The fix is to add an extra.intermediate-source field that records the immediate predecessor to graft. This changes hashes for commits that have been grafted twice, which is why the test was affected.
Sun, 05 Apr 2015 11:55:38 -0700 graft: allow creating sibling grafts
Durham Goode <durham@fb.com> [Sun, 05 Apr 2015 11:55:38 -0700] rev 24643
graft: allow creating sibling grafts Previously it was impossible to graft a commit onto it's own parent (i.e. create a copy of the commit). This is useful when wanting to create a backup of the commit before continuing to amend it. This patch enables that behavior. The change to the histedit test is because histedit uses graft to apply commits. The test in question moves a commit backwards onto an ancestor. Since the graft logic now more explicitly supports this, it knows to simply accept the incoming changes (since they are more recent), instead of prompting.
Mon, 06 Apr 2015 16:07:18 -0700 unbundle20: move header parsing into the 'getunbundler' function
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Apr 2015 16:07:18 -0700] rev 24642
unbundle20: move header parsing into the 'getunbundler' function The dispatching will be based on the header content, so we need to move this logic into the factory function.
Mon, 06 Apr 2015 16:04:33 -0700 unbundle20: retrieve unbundler instances through a factory function
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Apr 2015 16:04:33 -0700] rev 24641
unbundle20: retrieve unbundler instances through a factory function To support multiple bundle2 formats, we will need a function returning the proper unbundler according to the header. We introduce such aa function and change the usage in the code base. The function will get smarter in later changesets. This is somewhat similar to the dispatching we do for 'HG10' and 'HG11'. The main target is to allow HG2Y support in an extension to ease transition of companies using the experimental protocol in production (yeah...) But I've no doubt this will be useful when playing with a future HG21.
Mon, 06 Apr 2015 15:40:12 -0700 bundle20: move magic string into the class
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 06 Apr 2015 15:40:12 -0700] rev 24640
bundle20: move magic string into the class This makes it easy to create a new bundler class that inherits from the core one. This matches the way 'changegroup' packers work. The main target is to allow HG2Y support in an extension to ease transition of companies using the experimental protocol in production (yeah...) But I've no doubt this will be useful when playing with a future HG21.
Tue, 07 Apr 2015 08:45:52 -0700 localrepo.getbundle: drop unused 'format' argument
Martin von Zweigbergk <martinvonz@google.com> [Tue, 07 Apr 2015 08:45:52 -0700] rev 24639
localrepo.getbundle: drop unused 'format' argument The 'format' argument was not used even when it was added in 60ad2ea5b106 (getbundle: pass arbitrary arguments all along the call chain, 2014-04-17). Note that by removing the argument, if any caller did pass a named 'format' argument, we will now pass that along to exchange.getbundle() via the kwargs. If the idea was to remove such a key, that should have been done explicitly.
Tue, 07 Apr 2015 12:35:07 -0700 exchange: remove check for 'format' key
Martin von Zweigbergk <martinvonz@google.com> [Tue, 07 Apr 2015 12:35:07 -0700] rev 24638
exchange: remove check for 'format' key When the 'kwargs' variable was added in 12f161f08d74 (bundle2: allow pulling changegroups using bundle2, 2014-04-01), it could contain only 'bundlecaps', 'common' and 'heads', so the check for 'format' would always be false. Since then, _pullbundle2extraprepare() has been added for hooks, but it seems unlikely that they would a 'format' key.
Fri, 27 Mar 2015 22:12:53 +0900 templates-default: do not show description or summary if empty
Yuya Nishihara <yuya@tcha.org> [Fri, 27 Mar 2015 22:12:53 +0900] rev 24637
templates-default: do not show description or summary if empty changeset_printer shows description only if ctx.description().strip() is not empty. The default template should do the same way.
Mon, 06 Apr 2015 10:51:53 -0700 treemanifest: further optimize treemanifest.matches()
Drew Gottlieb <drgott@google.com> [Mon, 06 Apr 2015 10:51:53 -0700] rev 24636
treemanifest: further optimize treemanifest.matches() The matches function was previously traversing all submanifests to look for matching files, even though it was possible to know if a submanifest won't contain any matches. This change adds a visitdir function on the match object to decide quickly if a directory should be visited when traversing. The function also decides if _all_ subdirectories should be traversed. Adding this logic as methods on the match object also makes the logic modifiable by extensions, such as largefiles. An example of a command this speeds up is running hg status --rev .^ python/ on the Mozilla repo with the treemanifest experiment enabled. It goes from 2.03s to 1.85s. More improvements to speed from this change will happen when treemanifests are lazily loaded. Because a flat manifest is still loaded and then converted into treemanifests, speed improvements are limited. This change has no negative effect on speed. For a worst-case example, this command is not negatively impacted: hg status --rev .^ 'relglob:*.js' on the Mozilla repo. It goes from 2.83s to 2.82s.
Mon, 06 Apr 2015 14:36:08 -0700 util: move dirs() and finddirs() from scmutil to util
Drew Gottlieb <drgott@google.com> [Mon, 06 Apr 2015 14:36:08 -0700] rev 24635
util: move dirs() and finddirs() from scmutil to util An upcoming commit requires that match.py be able to call scmutil.dirs(), but when match.py imports scmutil, a dependency cycle is created. This commit avoids the cycle by moving dirs() and its related finddirs() function from scmutil to util, which match.py already depends on.
Mon, 06 Apr 2015 13:59:36 -0700 parsers: remove unused dependency on util
Drew Gottlieb <drgott@google.com> [Mon, 06 Apr 2015 13:59:36 -0700] rev 24634
parsers: remove unused dependency on util Parsers.py had a reference to util.sha1 which was unused. This commit removes this reference as well as the unused import of util to simplify the dependency graph. This is important for the next commit which actually relocates part of a module to eliminate a cycle.
Mon, 06 Apr 2015 17:03:35 -0700 changectx.walk: drop unnecessary call to match function
Martin von Zweigbergk <martinvonz@google.com> [Mon, 06 Apr 2015 17:03:35 -0700] rev 24633
changectx.walk: drop unnecessary call to match function If all the files in match.files() are in the context/manifest, we already know that the matcher will match each file.
Mon, 06 Apr 2015 17:16:55 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 06 Apr 2015 17:16:55 -0500] rev 24632
merge with stable
Sat, 04 Apr 2015 19:06:43 -0400 largefiles: use the share source as the primary local store (issue4471)
Matt Harbison <matt_harbison@yahoo.com> [Sat, 04 Apr 2015 19:06:43 -0400] rev 24631
largefiles: use the share source as the primary local store (issue4471) The benefit of retargeting the local store to the share source is that all shares will always have access to the largefiles any one of them commit, even if the user cache is deleted (which is documented to be OK to do). Further, any push into the source (and now any shares), will likewise make the largefile(s) visible to all related repositories. In order to maintain compatibility with existing repos, where the largefiles would be cached only in the local share, fallback to searching the local share if it isn't found at the share source. The unshare command should probably be taught to copy the source store into the store for the repo being unshared to complete the loop. This patch changes the test like this: @@ -159,6 +159,5 @@ $ hg share -q src share_dst --config extensions.share= $ hg -R share_dst update -r0 getting changed largefiles - large: largefile $HASH not available from file:///$TESTTMP\share_dst - 0 largefiles updated, 0 removed + 1 largefiles updated, 0 removed 1 files updated, 0 files merged, 0 files removed, 0 files unresolved The issue writeup mentions pushing a largefile from a remote repo to the main local repo, and the largefile is then not available in any shares. Since the push doesn't cache the largefile in $USERCACHE, the trashed $USERCACHE in this test is equivalent.
Sat, 04 Apr 2015 19:34:36 -0400 largefiles: use lfutil.findstorepath() when verifying a local repo
Matt Harbison <matt_harbison@yahoo.com> [Sat, 04 Apr 2015 19:34:36 -0400] rev 24630
largefiles: use lfutil.findstorepath() when verifying a local repo
Sat, 04 Apr 2015 19:31:40 -0400 largefiles: introduce lfutil.findstorepath()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 04 Apr 2015 19:31:40 -0400] rev 24629
largefiles: introduce lfutil.findstorepath() The handful of direct uses of lfutil.storepath() merely need a single path to read from or write to the largefile, whether or not it exists. Most callers that care about the file existing call lfutil.findfile(), in order to fallback from the store to the user cache. localstore._verify() doesn't call lfutil.findfile(). This prevents redirecting the store to the share source because the largefiles for existing repos may not be in the source's store, so verification may fail. It can't be changed to call findfile(), because findfile() links the file from the usercache to the local store[1], and because it returns None instead of a path if the file doesn't exist. For now, this method is just a cover for lfutil.storepath(), but it will be filled out in an upcoming patch. [1] Maybe we shouldn't care? But on a filesystem that doesn't support hardlinks, then verify will take a lot longer, and start to consume disk space.
Sat, 04 Apr 2015 17:19:16 -0400 vfs: make it possible to pass multiple path elements to join
Matt Harbison <matt_harbison@yahoo.com> [Sat, 04 Apr 2015 17:19:16 -0400] rev 24628
vfs: make it possible to pass multiple path elements to join os.path.join(), localrepo.join() and localrepo.wjoin() allow passing multiple path elements; vfs.join() should be as convenient.
Sat, 04 Apr 2015 15:43:00 -0400 largefiles: drop os.path reference in lfutil.storepath()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 04 Apr 2015 15:43:00 -0400] rev 24627
largefiles: drop os.path reference in lfutil.storepath() localrepo.join() can concatenate multiple parts on its own.
Sat, 04 Apr 2015 11:24:48 -0700 histedit: fix preventing strips during histedit
Durham Goode <durham@fb.com> [Sat, 04 Apr 2015 11:24:48 -0700] rev 24626
histedit: fix preventing strips during histedit We were trying to prevent strips of important nodes during histedit, but the check was actually comparing the short hashes in the rules to the exact value the user typed in, so it only ever worked if the user typed a 12 character hash.
Fri, 03 Apr 2015 15:18:34 -0700 copies: pass changectx instead of manifest to _computenonoverlap
Durham Goode <durham@fb.com> [Fri, 03 Apr 2015 15:18:34 -0700] rev 24625
copies: pass changectx instead of manifest to _computenonoverlap The _computenonoverlap function takes two manifests to allow extensions to hook in and read the manifest nodes produced by the function. The remotefilelog extension actually needs the entire changectx instead (which includes the manifest) so it can prefetch the subset of files necessary for a sparse checkout (and the sparse checkout depends on which commit is being accessed, hence the need for the changectx). I have tests in the remotefilelog extension that cover this.
Mon, 06 Apr 2015 10:46:44 -0700 dirs._addpath: don't mutate Python strings after exposing them (issue4589)
Siddharth Agarwal <sid0@fb.com> [Mon, 06 Apr 2015 10:46:44 -0700] rev 24624
dirs._addpath: don't mutate Python strings after exposing them (issue4589) One of the rules of Python strings is that they're immutable. dirs._addpath breaks this assumption for performance, which is fine as long as it is done safely -- once a string is no longer internal-only it shouldn't be mutated. Unfortunately, we weren't being safe here -- we were mutating 'key' even after adding it to a dictionary. This only really affects other C code that reads strings, so it's somewhat hard to write a test for this without poking into the internal representation of the string via ctypes or similar. There is currently no C code that reads the output of the string, but there will likely be some soon as the bug indicates. There's no significant difference in performance.
Mon, 06 Apr 2015 08:23:27 -0700 parsers: check for memory allocation overflows more carefully
Bryan O'Sullivan <bryano@fb.com> [Mon, 06 Apr 2015 08:23:27 -0700] rev 24623
parsers: check for memory allocation overflows more carefully
Sat, 04 Apr 2015 11:27:15 +0200 parsers.c: avoid implicit conversion loses integer precision warning
André Sintzoff <andre.sintzoff@gmail.com> [Sat, 04 Apr 2015 11:27:15 +0200] rev 24622
parsers.c: avoid implicit conversion loses integer precision warning This warning is raised by Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) and was introduced in 670aaee7931c
Sat, 04 Apr 2015 21:54:12 -0700 dirstate.walk: don't report same file stat multiple times stable
Martin von Zweigbergk <martinvonz@google.com> [Sat, 04 Apr 2015 21:54:12 -0700] rev 24621
dirstate.walk: don't report same file stat multiple times dirstate.walk() generates pairs of filename and a stat-like object. After "hg mv foo Foo", it generates one pair for "foo" and one for "Foo", as it should. However, on case-insensitive file systems, when it tries to stat to get the disk state as well, it gets the same stat result for both names. This confuses at least scmutil._interestingfiles(), making it think that "foo" was forgotten rather than removed. That, in turn, makes "hg addremove" add "foo" back, resulting in both cases in the dirstate, as reported in issue4590. This change only takes care of the "if unknown" branch. A similar fix should perhaps be applied to the other branch.
Fri, 03 Apr 2015 14:41:18 -0700 repoview: avoid processing the same rev twice in _getstatichidden
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Apr 2015 14:41:18 -0700] rev 24620
repoview: avoid processing the same rev twice in _getstatichidden If a rev had multiple children, it would be added to the heap multiple times. We now ensure it is added only once.
Fri, 03 Apr 2015 14:37:52 -0700 repoview: skip public parent earlier in _getstatichidden
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Apr 2015 14:37:52 -0700] rev 24619
repoview: skip public parent earlier in _getstatichidden Public changeset have nothing to offer regarding hidden changeset. Lets not add them to the heap at all.
Fri, 03 Apr 2015 14:36:05 -0700 repoview: directly skip public head in _getstatichidden
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Apr 2015 14:36:05 -0700] rev 24618
repoview: directly skip public head in _getstatichidden Public heads have nothing to offer regarding hidden stuff, let's skip them.
Fri, 03 Apr 2015 14:35:53 -0700 repoview: simplify process in _getstatichidden
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Apr 2015 14:35:53 -0700] rev 24617
repoview: simplify process in _getstatichidden Since all children are processed before their parents, we can apply the following algorithm: For each rev (descending order): * If I'm still hidden, no children will block me, * If I'm not hidden, I must remove my parent from the hidden set, This allows us to dynamically change the set of 'hidden' revisions, dropping the need for the 'actuallyhidden' dictionary and the 'blocked' boolean in the queue. As before, we start iterating from all heads and stop at the first public changesets. This ensures the hidden computation is 'O(not public())' instead of 'O(len(min(not public()):))'.
Fri, 03 Apr 2015 14:16:50 -0700 repoview: use a heap in _getstatichidden
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 03 Apr 2015 14:16:50 -0700] rev 24616
repoview: use a heap in _getstatichidden Since we want to process all non-public changesets from top to bottom, a heap seems more appropriate. This will ensure any revision is processed after all its children, opening the way to code simplification.
(0) -10000 -3000 -1000 -120 +120 +1000 +3000 +10000 tip