Sat, 24 Oct 2015 01:54:46 +0200 convert: test clean p2 file missing
Mads Kiilerich <madski@unity3d.com> [Sat, 24 Oct 2015 01:54:46 +0200] rev 26844
convert: test clean p2 file missing 216fa1ba9993 introduced "clever" reuse of p2 but did that convert could fail with abort: f1@f73e02ae52c5: not found in manifest! when it tried to reuse a file from p2 but the file didn't exist there, for example because filemap changes. 5ca587348875 fixed that (using changes from a75d24539aba), but with a quite different reasoning and test case. Add another test that makes sure this case is covered too.
Mon, 02 Nov 2015 11:56:59 +0000 uescape: also encode non-printable char under 128
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 02 Nov 2015 11:56:59 +0000] rev 26843
uescape: also encode non-printable char under 128 We were assuming everything under 128 was printable ascii, but there are a lot of control characters in that range that can't simply be included in json and other targets. We forcibly encode everything under 32, because they are either control char or oddly printable (like tab or line ending). We also add the hypothesis-powered test that caught this.
Sat, 24 Oct 2015 12:46:03 +0100 testing: add hypothesis fuzz testing
David R. MacIver <david@drmaciver.com> [Sat, 24 Oct 2015 12:46:03 +0100] rev 26842
testing: add hypothesis fuzz testing Hypothesis a library for adding fuzzing over a range of structure data to your test suite: http://hypothesis.readthedocs.org/en/latest/ This adds the ability to build tests using Hypothesis within the Mercurial test suite. New tests and fixes using this helpers comes in later changesets.
Mon, 02 Nov 2015 13:00:45 +0000 merge with stable
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 02 Nov 2015 13:00:45 +0000] rev 26841
merge with stable
Sun, 01 Nov 2015 13:04:14 -0600 Added signature for changeset 47dd34f2e727 stable
Matt Mackall <mpm@selenic.com> [Sun, 01 Nov 2015 13:04:14 -0600] rev 26840
Added signature for changeset 47dd34f2e727
Sun, 01 Nov 2015 13:04:09 -0600 Added tag 3.6 for changeset 47dd34f2e727 stable
Matt Mackall <mpm@selenic.com> [Sun, 01 Nov 2015 13:04:09 -0600] rev 26839
Added tag 3.6 for changeset 47dd34f2e727
Sun, 01 Nov 2015 08:38:56 +0900 i18n: look translation of both "DEPRECATED" and "(DEPRECATED)" up stable 3.6
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 01 Nov 2015 08:38:56 +0900] rev 26838
i18n: look translation of both "DEPRECATED" and "(DEPRECATED)" up Since 44cc9f63a2f1, deprecated commands, options and so on are detected by "(DEPRECATED)" instead of "DEPRECATED". "hg.pot" generated from recent source files doesn't contain msgid "DEPRECATED", and looking the translation of "DEPRECATED" up in up-to-date *.po files works incorrectly. But on the other hand, there are still old *.po files, which contain msgid "DEPRECATED" but not "(DEPRECATED)". Looking the translation of "(DEPRECATED)" up in such old *.po files also works incorrectly. This patch resolves this problem by looking translation of both "DEPRECATED" and "(DEPRECATED)" up. This should work correctly, because previous patch makes "deprecated" checker be applied only on translations, of which msgid contains exact "(DEPRECATED)" string. 'p.msgstr' examination in 'deprecatedsetup()' is needed to ignore untranslated entries. This also makes 'deprecatedpe.msgstr' examination in 'deprecated()' meaningless.
Sun, 01 Nov 2015 08:38:56 +0900 i18n: fix regexp pattern to detect translation for DEPRECATED stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 01 Nov 2015 08:38:56 +0900] rev 26837
i18n: fix regexp pattern to detect translation for DEPRECATED Since 44cc9f63a2f1, deprecated commands, options and so on are detected by "(DEPRECATED)" instead of "DEPRECATED". Therefore, 'deprecated' checker in i18n/check-translation.py should check translation, of which msgid contains "(DEPRECATED)" instead of "DEPRECATED". At glance, it seems to do so, but it actually doesn't, because Python regexp treats "()" as grouping of patterns and "(DEPRECATED)" matches only against "DEPRECATED".
Sat, 31 Oct 2015 21:45:46 -0400 scmutil: abort if an empty revision is given to revpair() stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 31 Oct 2015 21:45:46 -0400] rev 26836
scmutil: abort if an empty revision is given to revpair() When using 'extdiff --patch' to check the changes in a rebase, 'precursors(x)' evaluated to an empty set because I forgot the --hidden flag, so the other revision was used as the replacement for the empty set. The result was the patch for the other revision was diffed against itself, and the tool saying there were no differences. That's misleading since the expected diff args were silently changed, so it's better to bail out. The other uses of scmutil.revpair() are commands.diff and commands.status, and it doesn't make sense to allow an empty revision there either. The code here was suggested by Yuya Nishihara.
Sun, 01 Nov 2015 15:24:57 -0200 i18n-pt_BR: synchronized with a9ed5a8fc5e0 stable
Wagner Bruna <wbruna@yahoo.com> [Sun, 01 Nov 2015 15:24:57 -0200] rev 26835
i18n-pt_BR: synchronized with a9ed5a8fc5e0
Sun, 01 Nov 2015 05:34:27 +0900 i18n-ja: synchronized with 6474b64045fb stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 01 Nov 2015 05:34:27 +0900] rev 26834
i18n-ja: synchronized with 6474b64045fb
Mon, 26 Oct 2015 14:19:37 -0400 packaging: rework version detection and declaration (issue4912) stable
Augie Fackler <augie@google.com> [Mon, 26 Oct 2015 14:19:37 -0400] rev 26833
packaging: rework version detection and declaration (issue4912) Previously the -rc in our rc tags got dropped, meaning that those packages looked newer to the packaging system than the later release build. This rectifies the issue, though some damage may already have been done on 3.6-rc builds. I'm mostly cargo-culting the RPM version format - there don't appear to be rules for RPM about how to handle this. Hopefully an RPM enthusiast can fix up what I've done as a followup.
Tue, 27 Oct 2015 12:34:05 +0800 hgweb: escape class keyword when used as a js object property (issue4913) stable
Anton Shestakov <av6@dwimlabs.net> [Tue, 27 Oct 2015 12:34:05 +0800] rev 26832
hgweb: escape class keyword when used as a js object property (issue4913)
Sat, 24 Oct 2015 18:58:57 +0900 localrepo: discard objects in _filecache at transaction failure (issue4876) stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 24 Oct 2015 18:58:57 +0900] rev 26831
localrepo: discard objects in _filecache at transaction failure (issue4876) 'repo.invalidate()' deletes 'filecache'-ed properties by 'filecache.__delete__()' below via 'delattr(unfiltered, k)'. But cached objects are still kept in 'repo._filecache'. def __delete__(self, obj): try: del obj.__dict__[self.name] except KeyError: raise AttributeError(self.name) If 'repo' object is reused even after failure of command execution, referring 'filecache'-ed property may reuse one kept in 'repo._filecache', even if reloading from a file is expected. Executing command sequence on command server is a typical case of this situation (5c0f5db65c6b also tried to fix this issue). For example: 1. start a command execution 2. 'changelog.delayupdate()' is invoked in a transaction scope This replaces own 'opener' by '_divertopener()' for additional accessing to '00changelog.i.a' (aka "pending file"). 3. transaction is aborted, and command (1) execution is ended After 'repo.invalidate()' at releasing store lock, changelog object above (= 'opener' of it is still replaced) is deleted from 'repo.__dict__', but still kept in 'repo._filecache'. 4. start next command execution with same 'repo' 5. referring 'repo.changelog' may reuse changelog object kept in 'repo._filecache' according to timestamp of '00changelog.i' '00changelog.i' is truncated at transaction failure (even though this truncation is unintentional one, as described later), and 'st_mtime' of it is changed. But 'st_mtime' doesn't have enough resolution to always detect this truncation, and invalid changelog object kept in 'repo._filecache' is reused occasionally. Then, "No such file or directory" error occurs for '00changelog.i.a', which is already removed at (3). This patch discards objects in '_filecache' other than dirstate at transaction failure. Changes in 'invalidate()' can't be simplified by 'self._filecache = {}', because 'invalidate()' should keep dirstate in 'self._filecache' 'repo.invalidate()' at "hg qpush" failure is removed in this patch, because now it is redundant. This patch doesn't make 'repo.invalidate()' always discard objects in '_filecache', because 'repo.invalidate()' is invoked also at unlocking store lock. - "always discard objects in filecache at unlocking" may cause serious performance problem for subsequent procedures at normal execution - but it is impossible to "discard objects in filecache at unlocking only at failure", because 'releasefn' of lock can't know whether a lock scope is terminated normally or not BTW, using "with" statement described in PEP343 for lock may resolve this ? After this patch, truncation of '00changelog.i' still occurs at transaction failure, even though newly added revisions exist only in '00changelog.i.a' and size of '00changelog.i' isn't changed by this truncation. Updating 'st_mtime' of '00changelog.i' implied by this redundant truncation also affects cache behavior as described above. This will be fixed by dropping '00changelog.i' at aborting from the list of files to be truncated in transaction.
Wed, 28 Oct 2015 16:27:09 +0100 demandimport: fix TypeError when importing Python regex library (issue4920) stable
Gábor Stefanik <gabor.stefanik@nng.com> [Wed, 28 Oct 2015 16:27:09 +0100] rev 26830
demandimport: fix TypeError when importing Python regex library (issue4920)
Sat, 24 Oct 2015 00:39:22 +0100 bundle2: attribute remote failures to remote (issue4788) stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 24 Oct 2015 00:39:22 +0100] rev 26829
bundle2: attribute remote failures to remote (issue4788) Before bundle2, hook output from hook failures was prefixed with "remote: ". Up to this point with bundle2, the output was converted to the message to print in an Abort exception. This had 2 implications: 1) It was unclear whether an error message came from the local repo or the remote 2) The exit code changed from 1 to 255 This patch changes the handling of error:abort bundle2 parts during push to prefix the error message with "remote: ". This restores the old behavior. We still preserve the behavior of raising an Abort during bundle2 application failure. This is a regression from pre-bundle2 because the exit code changed. Because we no longer raise an Abort with the remote's message, we needed to insert a message for the new Abort. So, I invented a new error message for that. This is another change from pre-bundle2. However, I like the new error message because it states unambiguously who aborted the push failed, which I think is important for users so they can decide what's next.
Sat, 24 Oct 2015 00:39:26 +0100 tests: add tests for remote hook output (issue4788) stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 24 Oct 2015 00:39:26 +0100] rev 26828
tests: add tests for remote hook output (issue4788) The added tests don't agree in their output. This demonstrates a difference in `hg push` behavior between pre-bundle2 and bundle2. A subsequent patch will attempt to restore some of the pre-bundle2 behavior to bundle2.
Sat, 24 Oct 2015 06:59:26 +0100 help: mention alias and revsetalias in description of HGPLAINEXCEPT stable
Yuya Nishihara <yuya@tcha.org> [Sat, 24 Oct 2015 06:59:26 +0100] rev 26827
help: mention alias and revsetalias in description of HGPLAINEXCEPT
Fri, 23 Oct 2015 11:04:53 -0400 debugrevlog: cope with empty revlog files stable
Augie Fackler <augie@google.com> [Fri, 23 Oct 2015 11:04:53 -0400] rev 26826
debugrevlog: cope with empty revlog files I have no idea where it came from, but my clone of Mercurial has an empty filelog for `contrib/hgfixes/__init__.py` - it's *valid*, just contains no nodes. Without this change, debugrevlog crashes with a zero division error.
Fri, 23 Oct 2015 21:27:29 +0200 largefiles: don't mute and obfuscate http errors when putlfile fails stable
Mads Kiilerich <madski@unity3d.com> [Fri, 23 Oct 2015 21:27:29 +0200] rev 26825
largefiles: don't mute and obfuscate http errors when putlfile fails 'unexpected putlfile response: None' when an http error occurs is not very helpful. Instead, leave the handling of urllib2.HTTPError exceptions to other layers.
Fri, 23 Oct 2015 21:27:29 +0200 largefiles: test coverage of error handling from putlfile stable
Mads Kiilerich <madski@unity3d.com> [Fri, 23 Oct 2015 21:27:29 +0200] rev 26824
largefiles: test coverage of error handling from putlfile This reveals a wrong and unhelpful 'unexpected putlfile response'.
Fri, 23 Oct 2015 21:27:29 +0200 largefiles: check hash of files in the store before copying to working dir stable
Mads Kiilerich <madski@unity3d.com> [Fri, 23 Oct 2015 21:27:29 +0200] rev 26823
largefiles: check hash of files in the store before copying to working dir If the store somehow got corrupted, users could end up in weird situations that were very hard to recover from or lead to propagation of the corruption. Instead, spend the extra time checking the hash when copying to the working directory. If it doesn't match, emit a warning, and don't put wrong content in the working directory.
Fri, 23 Oct 2015 21:27:29 +0200 largefiles: test coverage of handling of store corruption stable
Mads Kiilerich <madski@unity3d.com> [Fri, 23 Oct 2015 21:27:29 +0200] rev 26822
largefiles: test coverage of handling of store corruption This reveals that update might put a corrupted largefile in the working directory where it will show up as modified and ready for commit.
Fri, 23 Oct 2015 06:06:22 -0400 merge: improve clarity of table in update docstring stable
Augie Fackler <augie@google.com> [Fri, 23 Oct 2015 06:06:22 -0400] rev 26821
merge: improve clarity of table in update docstring
Thu, 22 Oct 2015 18:59:03 +0000 ui: support paths.default-push without paths.default set (issue4914) stable
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 22 Oct 2015 18:59:03 +0000] rev 26820
ui: support paths.default-push without paths.default set (issue4914) This behavior regressed as part of the paths API refactoring. Previous behavior was to accept "default-push" without "default" defined. Current behavior aborts with "default repository not configured!." This patch restores the old behavior and adds test coverage for the scenario, which was absent before.
Wed, 21 Oct 2015 16:21:27 -0500 bookmarks: don't allow pushing new head for existing mark with -B (issue4400) stable
Matt Mackall <mpm@selenic.com> [Wed, 21 Oct 2015 16:21:27 -0500] rev 26819
bookmarks: don't allow pushing new head for existing mark with -B (issue4400)
Tue, 20 Oct 2015 18:46:00 -0400 commands: fix help for debugobsolete stable
timeless <timeless@mozdev.org> [Tue, 20 Oct 2015 18:46:00 -0400] rev 26818
commands: fix help for debugobsolete
Wed, 21 Oct 2015 00:18:11 +0200 largefiles: fix explicit commit of normal/largefile switch stable
Mads Kiilerich <madski@unity3d.com> [Wed, 21 Oct 2015 00:18:11 +0200] rev 26817
largefiles: fix explicit commit of normal/largefile switch Commit of corresponding normal/largefiles pairs would only commit the standin. That is usually fine, except if either the normal file or the standin is a remove while the other is an add. In that case it would either give duplicate colliding entries or lose the file. Instead, commit both filenames if one of them is a remove.
Wed, 21 Oct 2015 00:10:46 +0200 largefiles: test coverage of explicit commit of normal/largefile switch stable
Mads Kiilerich <madski@unity3d.com> [Wed, 21 Oct 2015 00:10:46 +0200] rev 26816
largefiles: test coverage of explicit commit of normal/largefile switch This reveals that a switch from normal to largefile violates the normal largefile invariant and gives a manifest with both a normal and standin file in the repository, while a switch from largefile to normal gives nothing. Not good.
Tue, 20 Oct 2015 16:00:02 -0500 Added signature for changeset b66e3ca0b90c stable
Matt Mackall <mpm@selenic.com> [Tue, 20 Oct 2015 16:00:02 -0500] rev 26815
Added signature for changeset b66e3ca0b90c
Tue, 20 Oct 2015 15:59:58 -0500 Added tag 3.6-rc for changeset b66e3ca0b90c stable
Matt Mackall <mpm@selenic.com> [Tue, 20 Oct 2015 15:59:58 -0500] rev 26814
Added tag 3.6-rc for changeset b66e3ca0b90c
Tue, 20 Oct 2015 15:59:10 -0500 merge default into stable for code freeze stable 3.6-rc
Matt Mackall <mpm@selenic.com> [Tue, 20 Oct 2015 15:59:10 -0500] rev 26813
merge default into stable for code freeze
Mon, 19 Oct 2015 16:49:54 +0200 convert: fix Python syntax in 'splice in' message
Mads Kiilerich <madski@unity3d.com> [Mon, 19 Oct 2015 16:49:54 +0200] rev 26812
convert: fix Python syntax in 'splice in' message Instead of reporting spliced in ['82544090e14fe18091e04f1fb0f0d7991cbe6e7e'] as parents of 369fd983d9e13330e9f12d9fce820deae84ea223 report spliced in 82544090e14fe18091e04f1fb0f0d7991cbe6e7e as parents of 369fd983d9e13330e9f12d9fce820deae84ea223
Mon, 19 Oct 2015 16:29:35 +0200 rebase: fix wrong 'no changes to commit' when using --collapse
Mads Kiilerich <madski@unity3d.com> [Mon, 19 Oct 2015 16:29:35 +0200] rev 26811
rebase: fix wrong 'no changes to commit' when using --collapse --collapse will do that rebase doesn't commit until the final commit. The lack of a new commit would make it look like the rebase didn't contribute any changes. Instead, only warn about no commits when not using --collapse.
Mon, 19 Oct 2015 15:47:40 -0700 pull: all pass along extra opargs
Sean Farley <sean@farley.io> [Mon, 19 Oct 2015 15:47:40 -0700] rev 26810
pull: all pass along extra opargs Wihtout this patch, commands.pull silently drops opargs defeating the whole purpose of the argument.
Mon, 19 Oct 2015 15:43:35 -0700 push: all pass along opargs
Sean Farley <sean@farley.io> [Mon, 19 Oct 2015 15:43:35 -0700] rev 26809
push: all pass along opargs Wihtout this patch, commands.push silently drops opargs defeating the whole purpose of the argument.
Thu, 15 Oct 2015 17:28:26 -0400 check-code: allow argument passing py2.6ism
timeless <timeless@mozdev.org> [Thu, 15 Oct 2015 17:28:26 -0400] rev 26808
check-code: allow argument passing py2.6ism this backs out 131f7fe06e9e, because Python2.5 support was dropped
Thu, 15 Oct 2015 17:24:42 -0400 mail: drop python 2.5 self.sock.read workaround
timeless <timeless@mozdev.org> [Thu, 15 Oct 2015 17:24:42 -0400] rev 26807
mail: drop python 2.5 self.sock.read workaround
Thu, 15 Oct 2015 17:21:08 -0400 url: drop support for python2.5
timeless <timeless@mozdev.org> [Thu, 15 Oct 2015 17:21:08 -0400] rev 26806
url: drop support for python2.5
Thu, 15 Oct 2015 17:19:11 -0400 win32: drop reference to python2.5
timeless <timeless@mozdev.org> [Thu, 15 Oct 2015 17:19:11 -0400] rev 26805
win32: drop reference to python2.5
Mon, 19 Oct 2015 21:36:12 -0700 editmerge: dequote other use of $ED
Ryan McElroy <rmcelroy@fb.com> [Mon, 19 Oct 2015 21:36:12 -0700] rev 26804
editmerge: dequote other use of $ED We want to support editors with parameters, eg EDITOR="vim -O" or whatever. So remove the quotes from around $ED and assume that the editor variable is properly escaped already.
Mon, 19 Oct 2015 16:01:55 +0200 bundlerepo: properly extract compressed changegroup from bundle2
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 19 Oct 2015 16:01:55 +0200] rev 26803
bundlerepo: properly extract compressed changegroup from bundle2 Before this bundle repository were unable to work with compressed bundle2. We use the same approach as with bundle1, we extract the changegroup in uncompressed form into a temporary file.
Fri, 02 Oct 2015 23:21:39 -0700 bundle2: make unbundle.compressed return True when compressed
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 02 Oct 2015 23:21:39 -0700] rev 26802
bundle2: make unbundle.compressed return True when compressed We were returning 'False' in all cases, even when the bundle2 was actually compressed.
Mon, 19 Oct 2015 18:04:08 +0200 bundlerepo: uncompress changegroup in bundle1 case only
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 19 Oct 2015 18:04:08 +0200] rev 26801
bundlerepo: uncompress changegroup in bundle1 case only Uncompressing bundle2 needs to be handled differently.
Mon, 19 Oct 2015 17:58:04 +0200 bundlerepo: move temp-bundle writing logic into a closure
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 19 Oct 2015 17:58:04 +0200] rev 26800
bundlerepo: move temp-bundle writing logic into a closure We will reuse this logic for bundle2
Mon, 19 Oct 2015 15:42:50 +0200 shelve: properly process bundle2 bundle
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 19 Oct 2015 15:42:50 +0200] rev 26799
shelve: properly process bundle2 bundle
Tue, 20 Oct 2015 03:07:23 +0200 histedit: properly apply bundle2 backups
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 20 Oct 2015 03:07:23 +0200] rev 26798
histedit: properly apply bundle2 backups If the histedit fails, we restore a backup. We make sure this backup bundle can be in bundle2 format as general delta will require.
Tue, 20 Oct 2015 16:01:33 +0200 strip: pass source and url to bundle2 processing
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 20 Oct 2015 16:01:33 +0200] rev 26797
strip: pass source and url to bundle2 processing Restoring from a 'bundle2' was missing this data.
Tue, 20 Oct 2015 15:56:22 +0200 unbundle: use 'url' argument with applybundle
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 20 Oct 2015 15:56:22 +0200] rev 26796
unbundle: use 'url' argument with applybundle This will let the hook get access to the 'url' value.
Tue, 20 Oct 2015 15:55:04 +0200 applybundle: take url as argument
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 20 Oct 2015 15:55:04 +0200] rev 26795
applybundle: take url as argument We allow specifying the url to carry it to hooks. This gets us closer to 'bundle1.apply(...)' and will allow us to remove regressions in multiple place where we forget to pass the url to hooks.
Tue, 20 Oct 2015 15:53:07 +0200 unbundle: use 'source' argument with applybundle
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 20 Oct 2015 15:53:07 +0200] rev 26794
unbundle: use 'source' argument with applybundle This will let the hook get access to the 'source' value.
Tue, 20 Oct 2015 15:52:42 +0200 applybundle: take source as argument
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 20 Oct 2015 15:52:42 +0200] rev 26793
applybundle: take source as argument We allow specifying the source to carry it to hooks. This gets us closer to 'bundle1.apply(...)' and will allow us to remove regressions in multiple places where we forget to pass the source to hooks.
Tue, 20 Oct 2015 15:48:24 +0200 applybundle: set 'bundle2=1' env for all transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 20 Oct 2015 15:48:24 +0200] rev 26792
applybundle: set 'bundle2=1' env for all transaction This should be set for all bundle2 application, we enforce that at a low level. This is for courtesy with hooks.
Tue, 20 Oct 2015 15:47:20 +0200 unbundle: use 'bundle2.applybundle'
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 20 Oct 2015 15:47:20 +0200] rev 26791
unbundle: use 'bundle2.applybundle' This is one such place.
Tue, 20 Oct 2015 15:45:39 +0200 bundle2: introduce an "applybundle" function
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 20 Oct 2015 15:45:39 +0200] rev 26790
bundle2: introduce an "applybundle" function There is a case where the intent is clear and the transaction is not optional. We want to be able to alter that transaction in a wide and easy way. We cannot get a unified '.apply(repo)' method for bundle1 and bundle2 yet because the api are still a bit too far apart. But this is a good step forward to get the rc out.
Thu, 15 Oct 2015 01:31:04 -0700 commands.resolve: conclude merge driver if no unresolved files are left
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:31:04 -0700] rev 26789
commands.resolve: conclude merge driver if no unresolved files are left This can happen when either 'hg resolve --all' is called or a driver-resolved file is explicitly requested. This is done as part of 'hg resolve --all' so that users still have a chance to test their changes before committing them. The exact semantics here are still to be decided. This does not impact any non-experimental features. Thanks to Pierre-Yves David for some advice about this behavior in particular, and merge drivers in general.
Thu, 15 Oct 2015 01:27:06 -0700 commands.resolve: call driverpreprocess if we haven't run it yet
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:27:06 -0700] rev 26788
commands.resolve: call driverpreprocess if we haven't run it yet We need to be careful about allowing --mark and --unmark to keep working -- we don't want the user to be stuck in a weird state. The exact behavior here is still to be decided, though.
Thu, 15 Oct 2015 01:22:01 -0700 merge.applyupdates: call driverconclude after performing merge actions
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:22:01 -0700] rev 26787
merge.applyupdates: call driverconclude after performing merge actions This will be a chance for the merge driver to finish resolving or generating any driver-resolved files. As before, having a separate error state from 'unresolved' is too big a refactoring for now, so we hack around it by setting unresolved to a positive value when necessary.
Thu, 15 Oct 2015 01:19:10 -0700 merge.applyupdates: call driverpreprocess before starting merge actions
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:19:10 -0700] rev 26786
merge.applyupdates: call driverpreprocess before starting merge actions We also need to update our internal state to whatever state driverpreprocess leaves it in. Adding an error state separate from the unresolved count is too big a refactoring for now, so we hack around it by setting it to a positive value to indicate an error state.
Thu, 15 Oct 2015 01:17:29 -0700 merge: add stubs for preprocess and conclude steps of merge driver
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:17:29 -0700] rev 26785
merge: add stubs for preprocess and conclude steps of merge driver The exact semantics for what should happen (particularly with respect to error handling) are still a bit hard to pin down, so I think it's better to experiment with it as an extension for now. For now this stub will act as a convenient point for extensions to hook on.
Thu, 15 Oct 2015 01:15:22 -0700 commands.resolve: don't allow users to mark or unmark driver-resolved files
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:15:22 -0700] rev 26784
commands.resolve: don't allow users to mark or unmark driver-resolved files Users will often be in the habit of running 'hg resolve --mark --all' after resolving merge conflicts in source files. We need to make sure this doesn't cause driver-resolved files to be marked. 'hg resolve --all' will resolve driver-resolved files, though. The weird conditional structure is to accommodate an upcoming patch.
Thu, 15 Oct 2015 01:11:50 -0700 resolve: only create wctx once
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:11:50 -0700] rev 26783
resolve: only create wctx once This allows for status and other results on the wctx to be cached between iterations.
Mon, 19 Oct 2015 12:07:17 -0700 dirstate: fix invalid reference to self.ui
James Mills <prologic@fb.com> [Mon, 19 Oct 2015 12:07:17 -0700] rev 26782
dirstate: fix invalid reference to self.ui
Sat, 17 Oct 2015 00:58:46 +0200 spelling: trivial spell checking
Mads Kiilerich <madski@unity3d.com> [Sat, 17 Oct 2015 00:58:46 +0200] rev 26781
spelling: trivial spell checking
Wed, 14 Oct 2015 03:30:27 -0400 mq: consistently use qrefresh
timeless@mozdev.org [Wed, 14 Oct 2015 03:30:27 -0400] rev 26780
mq: consistently use qrefresh
Wed, 14 Oct 2015 02:06:54 -0400 grammar: use does instead of do where appropriate
timeless@mozdev.org [Wed, 14 Oct 2015 02:06:54 -0400] rev 26779
grammar: use does instead of do where appropriate
Wed, 14 Oct 2015 22:29:03 -0400 l10n: use %d instead of %s for numbers
timeless@mozdev.org [Wed, 14 Oct 2015 22:29:03 -0400] rev 26778
l10n: use %d instead of %s for numbers
Thu, 15 Oct 2015 20:36:12 -0400 check-code: block non-portable pipe-and
timeless <timeless@mozdev.org> [Thu, 15 Oct 2015 20:36:12 -0400] rev 26777
check-code: block non-portable pipe-and
Thu, 15 Oct 2015 20:32:01 -0400 test-shelve: do not use non-portable pipe-and
timeless <timeless@mozdev.org> [Thu, 15 Oct 2015 20:32:01 -0400] rev 26776
test-shelve: do not use non-portable pipe-and
Sun, 18 Oct 2015 09:05:04 +0900 parsers: suppress warning of signed and unsigned comparison at nt_init
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Oct 2015 09:05:04 +0900] rev 26775
parsers: suppress warning of signed and unsigned comparison at nt_init Spotted by CC=clang CFLAGS='-Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wshorten-64-to-32': mercurial/parsers.c:1580:24: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare] if (self->raw_length > INT_MAX / sizeof(nodetree)) {
Sat, 17 Oct 2015 23:14:13 +0900 parsers: correct type of temporary variables for dirstate tuple fields
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Oct 2015 23:14:13 +0900] rev 26774
parsers: correct type of temporary variables for dirstate tuple fields These fields are defined as int. This eliminates the following warning spotted by CC=clang CFLAGS='-Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wshorten-64-to-32': mercurial/parsers.c:625:29: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare] if (state == 'n' && mtime == now) {
Fri, 16 Oct 2015 02:53:57 +0100 test: enforce v1 type in 'test-bundle2-remote-changegroup.t'
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 16 Oct 2015 02:53:57 +0100] rev 26773
test: enforce v1 type in 'test-bundle2-remote-changegroup.t' This bundle command is meant to generate a bundle1, we enforce that to avoid test's misbehavior when moving to general-delta by default.
Fri, 16 Oct 2015 02:51:34 +0100 test: enforce v1 type in 'test-bundle2-format.t'
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 16 Oct 2015 02:51:34 +0100] rev 26772
test: enforce v1 type in 'test-bundle2-format.t' This bundle command is meant to generate a bundle1, we enforce that to avoid test's misbehavior when moving to general-delta by default.
Sat, 17 Oct 2015 15:48:14 -0700 editmerge: properly quote variables
Ryan McElroy <rmcelroy@fb.com> [Sat, 17 Oct 2015 15:48:14 -0700] rev 26771
editmerge: properly quote variables Previously, files with spaces would break editmerge.
Thu, 15 Oct 2015 01:09:58 -0700 commands.resolve: print out warning when only driver-resolved files remain
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:09:58 -0700] rev 26770
commands.resolve: print out warning when only driver-resolved files remain 'hg resolve --all' will be the canonical way to run the 'conclude' step of the merge driver.
Thu, 15 Oct 2015 01:06:29 -0700 merge.mergestate: set merge driver state to 's' if there's none present
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:06:29 -0700] rev 26769
merge.mergestate: set merge driver state to 's' if there's none present This allows mergestate.mdstate() to return 's' if there's nothing to be done on the merge driver end.
Thu, 15 Oct 2015 01:04:46 -0700 merge.mergestate: only check for merge driver when property is accessed
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:04:46 -0700] rev 26768
merge.mergestate: only check for merge driver when property is accessed Otherwise 'hg update --clean', 'hg rebase --abort' etc wouldn't work.
Thu, 15 Oct 2015 01:02:32 -0700 localrepo.commit: abort if merge driver's conclude step hasn't been run yet
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 01:02:32 -0700] rev 26767
localrepo.commit: abort if merge driver's conclude step hasn't been run yet This case also requires 'hg resolve --all' to be run before continuing.
Thu, 15 Oct 2015 00:57:56 -0700 merge.mergestate: add a way to get the merge driver state
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 00:57:56 -0700] rev 26766
merge.mergestate: add a way to get the merge driver state This will be useful to check what the status of the merge driver is.
Thu, 15 Oct 2015 00:49:07 -0700 merge.mergestate: add a way to get the other side of the merge
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 00:49:07 -0700] rev 26765
merge.mergestate: add a way to get the other side of the merge It's surprising there was no API at all for this until now. In any case this will be needed from custom merge drivers.
Thu, 15 Oct 2015 00:45:20 -0700 commands.resolve: support printing out driver-resolved files
Siddharth Agarwal <sid0@fb.com> [Thu, 15 Oct 2015 00:45:20 -0700] rev 26764
commands.resolve: support printing out driver-resolved files There's no user-visible way to mark files as driver-resolved, so this status won't be visible.
Sat, 17 Oct 2015 12:32:23 -0700 histedit: make histedit prune when obsolete is enabled
Durham Goode <durham@fb.com> [Sat, 17 Oct 2015 12:32:23 -0700] rev 26763
histedit: make histedit prune when obsolete is enabled Back in June we made histedit use obsolete markers to cleanup when possible. This was rolled back as part of 54f9561088c7 (which should have only rolled back the --abort stuff, but rolled back everything). This caused a nasty bug when used in conjuction with the inhibit+directaccess extensions where histedit would leave old nodes around even after they had been squashed away. The root of the problem is that we first clean up old nodes, and then we clean up temp nodes. In the first pass, when we obsoleted old nodes, some would become unobsolete because they had temp nodes on top of them, thus making them stick around even after the histedit finished. The fix is to A) move the temp node cleanup to be before the old node cleanup (since they are topological on top of the old nodes), and B) use obsolete markers instead of stripping.
Sat, 17 Oct 2015 11:23:54 -0700 clonebundles: rewrite documentation
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 17 Oct 2015 11:23:54 -0700] rev 26762
clonebundles: rewrite documentation There are a lot of considerations server operators need to know before deploying clone bundles. They should be documented. So I rewrote the extension docs to contain this information.
Sat, 17 Oct 2015 11:37:08 -0700 exchange: support streaming clone bundles in clone bundles
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 17 Oct 2015 11:37:08 -0700] rev 26761
exchange: support streaming clone bundles in clone bundles Now that we have support for detecting compatible stream clone bundles in bundle specifications, we can safely add support for applying stream clone bundles to the clone bundles feature.
Sat, 17 Oct 2015 10:26:34 -0700 exchange: parse requirements from stream clone specification string
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 17 Oct 2015 10:26:34 -0700] rev 26760
exchange: parse requirements from stream clone specification string Stream clone bundles can only be consumed if the consumer supports the exact format requirements that were present on the producer. This patch adds support for encoding and verifying the format requirements on the bundle specification string for a stream clone bundle are supported by the local repository. If they aren't, we raise an UnsupportedBundleSpecification, just like we do when an unknown compression or bundle type is encountered. The impetus for this patch is so the clone bundles manifest can advertise stream clone bundles and so clients can filter out stream clones with unsupported format requirements. e.g. a stream clone produced with the not-yet-invented "revlogv2" format will be ignored by clients that only support "revlogv1."
Wed, 14 Oct 2015 17:00:34 -0700 exchange: support parameters in bundle specification strings
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 14 Oct 2015 17:00:34 -0700] rev 26759
exchange: support parameters in bundle specification strings Sometimes a basic type string is not sufficient for representing the contents of a bundle. Take bundle2 for example: future bundle2 files may contain parts that today's bundle2 parser can't read. Another example is stream clone data. These require clients to support specific repository formats or they won't be able to read the written files. In both scenarios, we need to describe additional metadata beyond the outer container type. Furthermore, this metadata behaves more like an unordered set, so an order-based declaration format (such as static strings) is not sufficient. We introduce support for "parameters" into the bundle specification string. These are essentially key-value pairs that can be used to encode additional metadata about the bundle. Semicolons are used as the delimiter partially to increase similarity to MIME parameter values (see RFC 2231) and because they are relatively safe from the command line (although values will need quotes to avoid interpretation as multiple shell commands). Alternatives considered were spaces (a bit annoying to encode) and '&' (similar to URL query strings) (which will do bad things in a shell if unquoted). The parsing function now returns a dict of parsed parameters and consumers have been updated accordingly.
Thu, 15 Oct 2015 13:43:18 -0700 commands: support consuming stream clone bundles
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 15 Oct 2015 13:43:18 -0700] rev 26758
commands: support consuming stream clone bundles For the same reasons that we don't produce stream clone bundles with `hg bundle`, we don't support consuming stream clone bundles with `hg unbundle`. We introduce a complementary debug command for applying stream clone bundles. This command is mostly to facilitate testing. Although it may be used to manually apply stream clone bundles until a more formal mechanism is (possibly) adopted.
Sat, 17 Oct 2015 11:40:29 -0700 commands: support creating stream clone bundles
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 17 Oct 2015 11:40:29 -0700] rev 26757
commands: support creating stream clone bundles Now that we have support for recognizing the streaming clone bundle type, add a debug command for creating them. I decided to create a new debug command instead of adding support to `hg bundle` because stream clone bundles are not exactly used the same way as normal bundle files and I don't want to commit to supporting them through the official `hg bundle` command forever. A debug command, however, can be changed without as much concern for backwards compatibility. As part of this, `hg bundle` will explicitly reject requests to produce stream bundles. This command will be required by server operators using stream clone bundles with the clone bundles feature.
Thu, 15 Oct 2015 13:00:45 -0700 exchange: support for streaming clone bundles
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 15 Oct 2015 13:00:45 -0700] rev 26756
exchange: support for streaming clone bundles Now that we have a mechanism to produce and consume streaming clone bundles, we need to teach the human-facing bundle specification parser and the internal bundle file header reading code to be aware of this new format. This patch does so. For the human-facing bundle specification, we choose the name "packed" to describe "streaming clone bundles" because the bundle is essentially a "pack" of raw revlog files that are "packed" together. There should probably be a bikeshed over the name, especially since it is human facing.
Sat, 17 Oct 2015 11:14:52 -0700 streamclone: support for producing and consuming stream clone bundles
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 17 Oct 2015 11:14:52 -0700] rev 26755
streamclone: support for producing and consuming stream clone bundles Up to this point, stream clones only existed as a dynamically generated data format produced and consumed during streaming clones. In order to support this efficient cloning format with the clone bundles feature, we need a more formal, on disk representation of the streaming clone data. This patch introduces a new "bundle" type for streaming clones. Unlike existing bundles, it does not contain changegroup data. It does, however, share the same concepts like the 4 byte header which identifies the type of data that follows and the 2 byte abbreviation for compression types (of which only "UN" is currently supported). The new bundle format is essentially the existing stream clone version 1 data format with some headers at the beginning. Content negotiation at stream clone request time checked for repository format/requirements compatibility before initiating a stream clone. We can't do active content negotiation when using clone bundles. So, we put this set of requirements inside the payload so consumers have a built-in mechanism for checking compatibility before reading and applying lots of data. Of course, we will also advertise this requirements set in clone bundles. But that's for another patch. We currently don't have a mechanism to produce and consume this new bundle format. This will be implemented in upcoming patches. It's worth noting that if a legacy client attempts to `hg unbundle` a stream clone bundle (with the "HGS1" header), it will abort with: "unknown bundle version S1," which seems appropriate.
Sat, 17 Oct 2015 15:28:02 -0500 spelling: fix typo in transaction error messages
Matt Mackall <mpm@selenic.com> [Sat, 17 Oct 2015 15:28:02 -0500] rev 26754
spelling: fix typo in transaction error messages
Fri, 16 Oct 2015 03:29:51 +0900 transaction: reorder unlinking .hg/journal and .hg/journal.backupfiles
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 16 Oct 2015 03:29:51 +0900] rev 26753
transaction: reorder unlinking .hg/journal and .hg/journal.backupfiles After this reordering, absence of '.hg/journal' just before starting new transaction means also absence of '.hg/journal.backupfiles'. In this case, all temporary files for preceding transaction should be completely unlinked, and HG_PENDING doesn't cause unintentional reading stalled temporary files in. Otherwise, 'repo.transaction()' raises exception with "run 'hg recover' to clean up transaction" hint.
Sat, 17 Oct 2015 01:15:34 +0900 merge: make in-memory changes visible to external update hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 17 Oct 2015 01:15:34 +0900] rev 26752
merge: make in-memory changes visible to external update hooks 51844b8b5017 (while 3.4 code-freeze) made all 'update' hooks run after releasing wlock for visibility of in-memory dirstate changes. But this breaks paired invocation of 'preupdate' and 'update' hooks. For example, 'hg backout --merge' for TARGET revision, which isn't parent of CURRENT, consists of steps below: 1. update from CURRENT to TARGET 2. commit BACKOUT revision, which backs TARGET out 3. update from BACKOUT to CURRENT 4. merge TARGET into CURRENT Then, we expects hooks to run in the order below: - 'preupdate' on CURRENT for (1) - 'update' on TARGET for (1) - 'preupdate' on BACKOUT for (3) - 'update' on CURRENT for (3) - 'preupdate' on TARGET for (4) - 'update' on CURRENT/TARGET for (4) But hooks actually run in the order below: - 'preupdate' on CURRENT for (1) - 'preupdate' on BACKOUT for (3) - 'preupdate' on TARGET for (4) - 'update' on TARGET for (1), but actually on CURRENT/TARGET - 'update' on CURRENT for (3), but actually on CURRENT/TARGET - 'update' on CURRENT for (4), but actually on CURRENT/TARGET Root cause of the issue focused by 51844b8b5017 is that external 'update' hook process can't view in-memory changes (especially, of dirstate), because they aren't written out until the end of transaction (or wlock). Now, hooks can be invoked just after updating, because previous patches made in-memory changes visible to external process. This patch may break backward compatibility from the point of view of "scheduling hook execution", but should be reasonable because 'update' hooks had been executed in this order before 3.4. This patch tests "hg backout" and "hg unshelve", because the former activates the transaction before 'update' hook invocation, but the former doesn't.
Sat, 17 Oct 2015 01:15:34 +0900 hook: centralize passing HG_PENDING to external hook process
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 17 Oct 2015 01:15:34 +0900] rev 26751
hook: centralize passing HG_PENDING to external hook process This patch centralizes passing HG_PENDING to external hook process into '_exthook()'. To make in-memory changes visible to external hook process, this patch does: - write (or schedule to write) in-memory dirstate changes, and - set HG_PENDING environment variable, if: - a transaction is running, and - there are in-memory changes to be visible This patch tests some commands with some hooks, because transaction activity of a same hook differs from each other ("---": "not tested"). ======== ========= ========= ============ command preupdate precommit pretxncommit ======== ========= ========= ============ unshelve o --- --- backout x --- --- import --- o o qrefresh --- x o ======== ========= ========= ============ Each hooks are examined separately to prevent in-memory changes from being visible to external process accidentally by side effect of hooks previously invoked.
Sat, 17 Oct 2015 01:15:34 +0900 cmdutil: make in-memory changes visible to external editor (issue4378)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 17 Oct 2015 01:15:34 +0900] rev 26750
cmdutil: make in-memory changes visible to external editor (issue4378) Before this patch, external editor process for the commit log can't view some in-memory changes (especially, of dirstate), because they aren't written out until the end of transaction (or wlock). This causes unexpected output of Mercurial commands spawned from that editor process. To make in-memory changes visible to external editor process, this patch does: - write (or schedule to write) in-memory dirstate changes, and - set HG_PENDING environment variable, if: - a transaction is running, and - there are in-memory changes to be visible "hg diff" spawned from external editor process for "hg qrefresh" shows: - "changes newly imported into the topmost" before 49148d7868df(*) - "all changes recorded in the topmost by refreshing" after this patch (*) 49148d7868df changed steps invoking editor process Even though backward compatibility may be broken, the latter behavior looks reasonable, because "hg diff" spawned from the editor process consistently shows "what changes new revision records" regardless of invocation context. In fact, issue4378 itself should be resolved by 800e090e9c64, which made 'repo.transaction()' write in-memory dirstate changes out explicitly before starting transaction. It also made "hg qrefresh" imply 'dirstate.write()' before external editor invocation in call chain below. - mq.queue.refresh - strip.strip - repair.strip - localrepository.transaction - dirstate.write - localrepository.commit - invoke external editor Though, this patch has '(issue4378)' in own summary line to indicate that issues like issue4378 should be fixed by this. BTW, this patch adds '-m' option to a 'hg ci --amend' execution in 'test-commit-amend.t', to avoid invoking external editor process. In this case, "unsure" states may be changed to "clean" according to timestamp or so on. These changes should be written into pending file, if external editor invocation is required, Then, writing dirstate changes out breaks stability of test, because it shows "transaction abort!/rollback completed" occasionally. Aborting after editor process invocation while commands below may cause similar instability of tests, too (AFAIK, there is no more such one, at this revision) - commit --amend - without --message/--logfile - import - without --message/--logfile, - without --no-commit, - without --bypass, - one of below, and - patch has no description text, or - with --edit - aborting at the 1st patch, which adds or removes file(s) - if it only changes existing files, status is checked only for changed files by 'scmutil.matchfiles()', and transition from "unsure" to "normal" in dirstate doesn't occur (= dirstate isn't changed, and written out) - aborting at the 2nd or later patch implies other pending changes (e.g. changelog), and always causes showing "transaction abort!/rollback completed"
Sat, 17 Oct 2015 01:15:34 +0900 dirstate: show develwarn for write() invocation without transaction
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 17 Oct 2015 01:15:34 +0900] rev 26749
dirstate: show develwarn for write() invocation without transaction This is used to detect 'dirstate.write()' invocation without the value gotten by 'repo.currenttransaction()' (mainly focused on 3rd party extensions).
(0) -10000 -3000 -1000 -300 -100 -96 +96 +100 +300 +1000 +3000 +10000 tip