Wed, 22 Apr 2015 13:56:30 -0700 record: fix record with change on moved file crashes (issue4619) stable
Laurent Charignon <lcharignon@fb.com> [Wed, 22 Apr 2015 13:56:30 -0700] rev 24837
record: fix record with change on moved file crashes (issue4619) reverting 79fceed67676, add a test to prevent the issue from coming back.
Wed, 22 Apr 2015 23:38:55 +0900 check-code: check os.path.join(*, '') not working correctly with Python 2.7.9 stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 22 Apr 2015 23:38:55 +0900] rev 24836
check-code: check os.path.join(*, '') not working correctly with Python 2.7.9 Since Python 2.7.9, "os.path.join(path, '')" doesn't append "os.sep" for UNC path (see issue4557 for detail).
Wed, 22 Apr 2015 23:38:55 +0900 unionrepo: use pathutil.normasprefix to ensure os.sep at the end of cwd stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 22 Apr 2015 23:38:55 +0900] rev 24835
unionrepo: use pathutil.normasprefix to ensure os.sep at the end of cwd Since Python 2.7.9, "os.path.join(path, '')" doesn't add "os.sep" at the end of UNC path (see issue4557 for detail). This makes unionrepo incorrectly work, if: 1. cwd is the root of UNC share (e.g. "\host\share"), and 2. mainreporoot is near cwd (e.g. "\host\sharefoo\repo") - host of UNC path is same as one of cwd - share of UNC path starts with one of cwd 3. "repopath" isn't specified in URI (e.g. "union:path/to/repo2") For example: $ hg --cwd \host\share -R \host\sharefoo\repo incoming union:path\to\repo2 In this case: - os.path.join(r"\host\share", "") returns r"\host\share", - r"\host\sharefoo\repo".startswith(r"\host\share") returns True, then - r"foo\repo" is treated as repopath of unionrepo instead of r"\host\sharefoo\repo" This causes failure of combining "\host\sharefoo\repo" and another repository: in addition to it, "\host\share\foo\repo" may be combined with another repository, if it accidentally exists. This patch uses "pathutil.normasprefix()" to ensure "os.sep" at the end of cwd safely, even with some problematic encodings, which use 0x5c (= "os.sep" on Windows) as the tail byte of some multi-byte characters. BTW, normalization before "pathutil.normasprefix()" isn't needed in this case, because "os.getcwd()" always returns normalized one.
Wed, 22 Apr 2015 23:38:55 +0900 bundlerepo: use pathutil.normasprefix to ensure os.sep at the end of cwd stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 22 Apr 2015 23:38:55 +0900] rev 24834
bundlerepo: use pathutil.normasprefix to ensure os.sep at the end of cwd Since Python 2.7.9, "os.path.join(path, '')" doesn't add "os.sep" at the end of UNC path (see issue4557 for detail). This makes bundlerepo incorrectly work, if: 1. cwd is the root of UNC share (e.g. "\host\share"), and 2. mainreporoot is near cwd (e.g. "\host\sharefoo\repo") - host of UNC path is same as one of cwd - share of UNC path starts with one of cwd 3. "repopath" isn't specified in bundle URI (e.g. "bundle:bundlefile" or just "bundlefile") For example: $ hg --cwd \host\share -R \host\sharefoo\repo incoming bundle In this case: - os.path.join(r"\host\share", "") returns r"\host\share", - r"\host\sharefoo\repo".startswith(r"\host\share") returns True, then - r"foo\repo" is treated as repopath of bundlerepo instead of r"\host\sharefoo\repo" This causes failure of combining "\host\sharefoo\repo" and bundle file: in addition to it, "\host\share\foo\repo" may be combined with bundle file, if it accidentally exists. This patch uses "pathutil.normasprefix()" to ensure "os.sep" at the end of cwd safely, even with some problematic encodings, which use 0x5c (= "os.sep" on Windows) as the tail byte of some multi-byte characters. BTW, normalization before "pathutil.normasprefix()" isn't needed in this case, because "os.getcwd()" always returns normalized one.
Wed, 22 Apr 2015 23:38:52 +0900 dirstate: use pathutil.normasprefix to ensure os.sep at the end of root stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 22 Apr 2015 23:38:52 +0900] rev 24833
dirstate: use pathutil.normasprefix to ensure os.sep at the end of root 3cc630be5f09 replaced "os.path.join(root, '')" by "root.endswith(os.sep)" examination, because Python 2.7.9 changes behavior of "os.path.join(path, '')" on UNC path. But some problematic encodings use 0x5c (= "os.sep" on Windows) as the tail byte of some multi-byte characters, and replacement above prevents Mercurial from working on the repository, of which root path ends with such multi-byte character, regardless of enabling win32mbcs. This patch uses "pathutil.normasprefix()" instead of "root.endswith(os.sep)" examination, to ensure "os.sep" at the end of "dirstate._rootdir" even with problematic encodings. "root" of dirstate can be passed to "pathutil.normasprefix()" without normalization, because it is always given from "repo.root" = "repo.wvfs.base", which is normalized by "os.path.realpath()". Using "util.endswithsep()" instead of "str.endswith(os.sep)" also fixes this problem, but this patch chooses "pathutil.normasprefix()" to centralize "adding os.sep if endswith(os.sep)" logic into it.
Tue, 21 Apr 2015 21:02:08 -0300 bookmarks: add i18n hints to bookmark sync states stable
Wagner Bruna <wbruna@yahoo.com> [Tue, 21 Apr 2015 21:02:08 -0300] rev 24832
bookmarks: add i18n hints to bookmark sync states
Tue, 21 Apr 2015 21:01:17 -0300 histedit: fix typo in abort message stable
Wagner Bruna <wbruna@yahoo.com> [Tue, 21 Apr 2015 21:01:17 -0300] rev 24831
histedit: fix typo in abort message
Tue, 21 Apr 2015 21:01:05 -0300 help: fix typos in txnclose and txnabort documentation stable
Wagner Bruna <wbruna@yahoo.com> [Tue, 21 Apr 2015 21:01:05 -0300] rev 24830
help: fix typos in txnclose and txnabort documentation
Mon, 20 Apr 2015 22:21:57 -0500 util: fix the check for non-C99 compilers (issue4605) stable
Kevin Bullock <kbullock@ringworld.org> [Mon, 20 Apr 2015 22:21:57 -0500] rev 24829
util: fix the check for non-C99 compilers (issue4605)
Mon, 20 Apr 2015 18:44:57 -0700 histedit: fix rollup prompting for a commit message (issue4606) stable
Durham Goode <durham@fb.com> [Mon, 20 Apr 2015 18:44:57 -0700] rev 24828
histedit: fix rollup prompting for a commit message (issue4606) Commit 090da03361c5 broke histedit's rollup by causing it to open the editor. Turns out I missed a spot where the rollup option was read. This fixes that and adjusts the test to catch this case.
Mon, 20 Apr 2015 13:43:10 -0400 test-hook.t: don't directly use redirect to /dev/null in hook for Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 20 Apr 2015 13:43:10 -0400] rev 24827
test-hook.t: don't directly use redirect to /dev/null in hook for Windows This goes with 57f1dbc99631. External hooks are run in cmd.exe, which doesn't know about /dev/null, but sh can handle it.
Mon, 20 Apr 2015 18:13:44 -0500 mq: avoid silent failure when single patch doesn't apply (issue4604) stable
Matt Mackall <mpm@selenic.com> [Mon, 20 Apr 2015 18:13:44 -0500] rev 24826
mq: avoid silent failure when single patch doesn't apply (issue4604) The error-handling here is quite byzantine. self._apply raises an AbortNoCleanup, but self.apply was swallowing the exception and returns 2. In self.push, we catch all exceptions.. and cleanup. We try to print a message to clean up.. but that relies on having a top-of-stack. Instead, we re-raise the abort in self.apply, and avoid cleanup on AbortNoCleanup in self.push by adding a trivial new except clause. We also modernize the now-visible abort message.
Mon, 20 Apr 2015 17:16:05 +0200 pushkey: flush pending data before running a pre-pushkey hook (issue4607) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 20 Apr 2015 17:16:05 +0200] rev 24825
pushkey: flush pending data before running a pre-pushkey hook (issue4607) The pre-pushkey hook will likely validate the pushkey based on element previously changed in the same transaction. We need to make theses data available for the hook.
Mon, 20 Apr 2015 17:15:50 +0200 pushkey: use hook arguments from transaction when one exists stable
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 20 Apr 2015 17:15:50 +0200] rev 24824
pushkey: use hook arguments from transaction when one exists When pushkey is called during a transaction, we include its 'hookargs' when running the pre-pushkey hooks. Having more data cannot hurt, especially the transaction ID.
Mon, 20 Apr 2015 14:47:51 -0400 util.h: also sniff for C99 before trying to use stdbool.h (issue4605) stable
Augie Fackler <augie@google.com> [Mon, 20 Apr 2015 14:47:51 -0400] rev 24823
util.h: also sniff for C99 before trying to use stdbool.h (issue4605) stdbool.h isn't required until C99. Sigh.
Mon, 20 Apr 2015 17:16:22 +0200 changelog: fix readpending if no pending data exist (issue4609) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 20 Apr 2015 17:16:22 +0200] rev 24822
changelog: fix readpending if no pending data exist (issue4609) Since transaction are used for more than just changesets, it is possible to have a transaction without new changesets at all. In this case no ''00changelog.i.a' are written. In all cases the 'changelog.readpending' method is called if the repository has any pending data. The 'revlog' logic provides empty content if the file is missing, so the whole operation resulted in an empty changelog. We now skip reading the pending file if it is missing.
Mon, 20 Apr 2015 15:27:55 +0200 afterlock: add the callback to the top level lock (issue4608) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 20 Apr 2015 15:27:55 +0200] rev 24821
afterlock: add the callback to the top level lock (issue4608) If 'wlock' is taken, we should add 'afterlock' callback to the 'wlock' instead. Otherwise, running post transaction hook after 'lock' is release but 'wlock' is still taken lead to a deadlock (eg: 'hg update' during a hook). This situation is much more common since: 5dc5cd7abbf5 push: acquire local 'wlock' if "pushback" is expected (BC) (issue4596)
Mon, 20 Apr 2015 16:05:32 +0200 debuglock: access the lock file using the proper vfs stable
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 20 Apr 2015 16:05:32 +0200] rev 24820
debuglock: access the lock file using the proper vfs Before this fix, 'wlock' was always reported as "free" because '.hg/store/wlock' have never been a thing.
Sun, 19 Apr 2015 21:43:53 -0700 status: pass matcher to pathcopies() stable
Martin von Zweigbergk <martinvonz@google.com> [Sun, 19 Apr 2015 21:43:53 -0700] rev 24819
status: pass matcher to pathcopies() Just like a7f8e3584ef3 (diff: pass the diff matcher to the copy logic, 2015-04-16) sped up 'hg diff --git $path', let's speed up 'hg st -C $path'. On the Firefox repo, this speeds up hg st --rev tip~40000 --rev tip -C python from 16s to 1.8s. Those two revisions differ in 100k files, out of which 1k is in python/.
Sat, 18 Apr 2015 15:27:03 +0900 annotate: prepare ancestry context of workingfilectx stable
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Apr 2015 15:27:03 +0900] rev 24818
annotate: prepare ancestry context of workingfilectx _ancestrycontext is necessary for fast lookup of _changeid. Because we can't compute the ancestors from wctx, we skip to its parents. 'None' is not needed to be included in _ancestrycontext because it is used for a membership test of filelog revisions. repo: https://hg.mozilla.org/releases/mozilla-beta/#062e49bcb2da command: hg annotate -r 'wdir()' gfx/thebes/gfxWindowsPlatform.cpp before: 51.520 sec after: 1.780 sec
Sat, 18 Apr 2015 14:10:55 +0900 committablefilectx: propagate ancestry info to parent to fix annotation stable
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Apr 2015 14:10:55 +0900] rev 24817
committablefilectx: propagate ancestry info to parent to fix annotation Before this patch, annotating working directory could include wrong revisions that were hidden or belonged to different branches. This fixes wfctx.parents() to set _descendantrev so that all ancestors can take advantage of the linkrev adjustment introduced at c48924787eaa. _adjustlinkrev() can handle 'None' revision thanks to 5a12ef618c03.
Sat, 18 Apr 2015 14:03:41 +0900 filectx: extract function to create parent fctx keeping ancestry info stable
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Apr 2015 14:03:41 +0900] rev 24816
filectx: extract function to create parent fctx keeping ancestry info committablefilectx.parents() should use this to take advantage of the linkrev adjustment.
Sat, 18 Apr 2015 13:46:24 +0900 filectx: factor out creation of parent fctx stable
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Apr 2015 13:46:24 +0900] rev 24815
filectx: factor out creation of parent fctx This series tries to fix wrong ancestry information on annotating working directory. This change should slightly improves the readability of the next patch.
Sun, 19 Apr 2015 11:37:29 +0100 help: fix typo commited -> committed stable
Javi Merino <merino.jav@gmail.com> [Sun, 19 Apr 2015 11:37:29 +0100] rev 24814
help: fix typo commited -> committed
Sat, 18 Apr 2015 13:08:41 -0400 largefiles: don't mangle filesets when fixing up the log matcher stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 18 Apr 2015 13:08:41 -0400] rev 24813
largefiles: don't mangle filesets when fixing up the log matcher The fileset-generated.t test previously failed with this: + hg: parse error: unknown identifier: .hglf/modified + (did you mean 'modified'?) + [255] Filesets will find the standins on their own, without any help. While that's useful for some things like modified(), clean(), etc., it is wrong for things like size(). Proper fileset support for largefiles is not trivial, but this was failing with just the extension enabled on a normal repo.
Sat, 18 Apr 2015 00:34:38 -0400 largefiles: don't crash when cloning to a remote repo stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 18 Apr 2015 00:34:38 -0400] rev 24812
largefiles: don't crash when cloning to a remote repo The immediate crash was when checking for requirements immediately after this, but lfcommands.downloadlfiles() will also crash if --all-largefiles is specified. That has been in place since atleast 5884812686f7 (2.3-rc) without anyone noticing. I can't tell from the peer classes if there's a way to make the custom largefile functionality work in this case, but atleast it doesn't crash.
Fri, 17 Apr 2015 14:12:01 -0700 run-tests: don't error when glob matched line ends with backslash stable
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 17 Apr 2015 14:12:01 -0700] rev 24811
run-tests: don't error when glob matched line ends with backslash As part of writing another test, I triggered an array index error in glob match processing code by having a (glob) line end in a single backslash (which is the escape character). Adding a simple bounds check prevents the error in run-tests.py.
Fri, 17 Apr 2015 09:46:43 -0700 histedit: change state format to allow non-hash lines stable
Durham Goode <durham@fb.com> [Fri, 17 Apr 2015 09:46:43 -0700] rev 24810
histedit: change state format to allow non-hash lines The existing state serialization format assumed the rule line consisted of an action and a hash. In our external extension that adds 'exec' this is not the case (there is no hash, just the shell command). So let's change the format to be more generic with just an action and a remainder, and the various commands can handle it as they wish. Flagged for stable since we want to get this format tweak in before the new format goes live in the release.
Fri, 17 Apr 2015 15:42:20 -0500 tests: fix portability issue with test-merge-tools stable
Matt Mackall <mpm@selenic.com> [Fri, 17 Apr 2015 15:42:20 -0500] rev 24809
tests: fix portability issue with test-merge-tools Not sure how this ever worked.
Fri, 17 Apr 2015 12:39:55 -0400 test-rename-merge2: fix test failure on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 17 Apr 2015 12:39:55 -0400] rev 24808
test-rename-merge2: fix test failure on Windows Windows and OpenVMS use double quote for shell quoting, posix uses single quote. Since the other test lines added in 5668202cfaaf don't include the quotes, this was presumably an oversight.
(0) -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip