Sun, 28 May 2017 15:47:00 -0400 dispatch: convert exception payload to bytes more carefully
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:47:00 -0400] rev 32643
dispatch: convert exception payload to bytes more carefully We were previously depending on str() doing something reasonable here, and we can't depend on the objects in question supporting __bytes__, so we work around the lack of direct bytes formatting.
Sun, 28 May 2017 15:49:29 -0400 help: convert flag default to bytes portably
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 15:49:29 -0400] rev 32642
help: convert flag default to bytes portably We were relying on %s using repr on (for example) integer values. Work around that for Python 3 while preserving all the prior magic.
Thu, 01 Jun 2017 23:08:23 +0900 cmdutil: use isstdiofilename() where appropriate
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 23:08:23 +0900] rev 32641
cmdutil: use isstdiofilename() where appropriate
Thu, 01 Jun 2017 23:05:29 +0900 py3: simply use b'%d\n' to format pid in server.py
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 23:05:29 +0900] rev 32640
py3: simply use b'%d\n' to format pid in server.py Spotted by Martin, thanks.
Thu, 01 Jun 2017 22:43:24 +0900 py3: implement __bytes__() on most of our exception classes
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 22:43:24 +0900] rev 32639
py3: implement __bytes__() on most of our exception classes We store bytes in exc.args, which should be translated to a byte string without encode/decode dance. IOError subclasses are unchanged for now. We'll need to decide how our IOErrors should be caught.
Thu, 01 Jun 2017 22:24:15 +0900 py3: convert __doc__ back to bytes in help.py
Yuya Nishihara <yuya@tcha.org> [Thu, 01 Jun 2017 22:24:15 +0900] rev 32638
py3: convert __doc__ back to bytes in help.py pycompat.getdoc() is pretty simple, but we wouldn't want to write handling of None inline.
Thu, 01 Jun 2017 01:41:34 +0530 py3: ensure that we don't concat bytes and str and the end result is bytes
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 01:41:34 +0530] rev 32637
py3: ensure that we don't concat bytes and str and the end result is bytes Here obj.__module__ and obj.__name__ are str. Either we can convert them to bytes or use an r'' and convert back to bytes when concat is done. I preferred the later one since we are encoding only once here.
Thu, 01 Jun 2017 00:00:10 +0530 py3: make sure we return strings from __str__ and __repr__
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 01 Jun 2017 00:00:10 +0530] rev 32636
py3: make sure we return strings from __str__ and __repr__ On Python 3: >>> class abc: ... def __repr__(self): ... return b'abc' ... >>> abc() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __repr__ returned non-string (type bytes) >>> class abc: ... def __str__(self): ... return b'abc' ... >>> str(abc()) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __str__ returned non-string (type bytes) So the __str__ and __repr__ must return strings.
Wed, 31 May 2017 23:48:52 +0530 py3: replace None with -1 to sort an integer array
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 31 May 2017 23:48:52 +0530] rev 32635
py3: replace None with -1 to sort an integer array In Python 2: >>> ls = [4, 2, None] >>> sorted(ls) [None, 2, 4] In Python 3: >>> ls = [4, 2, None] >>> sorted(ls) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unorderable types: NoneType() < int() Therefore we replaced None with -1, and the safe part is that, None and -1 are only the keys which are used for sorting so we don't need to convert the -1's back to None.
Wed, 31 May 2017 23:42:58 +0530 py3: pass str in os.sysconf()
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 31 May 2017 23:42:58 +0530] rev 32634
py3: pass str in os.sysconf() os.sysconf() doesn't accepts bytes on Python 3. Adding r'' will make sure b'' is not added here.
Thu, 11 May 2017 13:59:48 -0700 context: move dirty() to committablectx
Sean Farley <sean@farley.io> [Thu, 11 May 2017 13:59:48 -0700] rev 32633
context: move dirty() to committablectx This is a pedantic move. It should be an error if dirty() is called on a read-only context. Based on Mads Kiilerix's and my work at the sprint.
Thu, 11 May 2017 13:51:10 -0700 committablectx: extra is already normalized by committablectx.__init__
Sean Farley <sean@farley.io> [Thu, 11 May 2017 13:51:10 -0700] rev 32632
committablectx: extra is already normalized by committablectx.__init__ Avoid doing the same work again. Based on work done by Mads Kiilerix.
Thu, 01 Jun 2017 00:40:52 -0700 match: introduce nevermatcher for when no ignore files are present
Siddharth Agarwal <sid0@fb.com> [Thu, 01 Jun 2017 00:40:52 -0700] rev 32631
match: introduce nevermatcher for when no ignore files are present 952017471f93 introduced a deterministic `__repr__` for ignores. However, it didn't account for when ignore was `util.never`. This broke fsmonitor's ignore change detection -- with an empty hgignore, it would kick in all the time. Introduce `nevermatcher` and switch to it. This neatly parallels `alwaysmatcher`.
Wed, 31 May 2017 11:41:54 -0700 check-code: suggest policy.importmod
Jun Wu <quark@fb.com> [Wed, 31 May 2017 11:41:54 -0700] rev 32630
check-code: suggest policy.importmod This forbids patterns like `from mercurial.cext import parsers` which breaks pure.
Fri, 26 May 2017 03:41:10 +0200 test-obsolete-bundle-strip: test bundling in the seventh case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:41:10 +0200] rev 32629
test-obsolete-bundle-strip: test bundling in the seventh case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:23:56 +0200 test-obsolete-bundle-strip: test bundling in the sixth case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:23:56 +0200] rev 32628
test-obsolete-bundle-strip: test bundling in the sixth case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:20:40 +0200 test-obsolete-bundle-strip: test bundling in the fifth case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:20:40 +0200] rev 32627
test-obsolete-bundle-strip: test bundling in the fifth case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:20:25 +0200 test-obsolete-bundle-strip: test bundling in the fourth case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:20:25 +0200] rev 32626
test-obsolete-bundle-strip: test bundling in the fourth case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:19:11 +0200 test-obsolete-bundle-strip: test bundling in the third case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:19:11 +0200] rev 32625
test-obsolete-bundle-strip: test bundling in the third case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:15:53 +0200 test-obsolete-bundle-strip: test bundling in the second case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:15:53 +0200] rev 32624
test-obsolete-bundle-strip: test bundling in the second case Updating all cases in the file at the same time is a bit overwhelming and harder to double check. So each case come in its own patch.
Fri, 26 May 2017 03:11:53 +0200 test-obsolete-bundle-strip: test bundling in the first case
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 May 2017 03:11:53 +0200] rev 32623
test-obsolete-bundle-strip: test bundling in the first case We adds a shell function checking that the relevant markers and the bundled markers matches. Updating all cases in the file at the same time is a bit overwhelming and harder to double checks. So each cases come in its own patch.
Thu, 25 May 2017 16:50:23 +0200 obsolete: raise richer exception on unknown version
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 16:50:23 +0200] rev 32622
obsolete: raise richer exception on unknown version We raise a more precise subclass of Abort with details about the faulty version. This will be used to detect this case and display some information in debugbundle.
Wed, 31 May 2017 20:07:08 -0700 import-checker: add hgdemandimport to local modules
Siddharth Agarwal <sid0@fb.com> [Wed, 31 May 2017 20:07:08 -0700] rev 32621
import-checker: add hgdemandimport to local modules This fixes test-check-module-imports.t.
Wed, 31 May 2017 19:46:04 -0700 rebase: drop unnecessary parentchange call
Siddharth Agarwal <sid0@fb.com> [Wed, 31 May 2017 19:46:04 -0700] rev 32620
rebase: drop unnecessary parentchange call We're calling localrepo.setparents here, not dirstate.setparents. localrepo.setparents calls dirstate.parentchange already.
Tue, 30 May 2017 13:16:32 -0700 hidden: remove unnecessary guard condition
Martin von Zweigbergk <martinvonz@google.com> [Tue, 30 May 2017 13:16:32 -0700] rev 32619
hidden: remove unnecessary guard condition The "if visible" guard is now pretty pointless, because the function call it guards will do almost no work anyway when there are no visible revisions. We can also stop wrapping "visible" in a set since it just needs to be an iterable now.
Tue, 30 May 2017 10:27:20 -0700 hidden: subtract pinned revs from hidden earlier
Martin von Zweigbergk <martinvonz@google.com> [Tue, 30 May 2017 10:27:20 -0700] rev 32618
hidden: subtract pinned revs from hidden earlier The pinned revs are simply revisions that should not be hidden even if hideablerevs() says that should. Let's make that clear by simply setting "hidden = hideablerevs() - pinnedrevs()" early on.
Sat, 27 May 2017 23:05:10 -0700 hidden: make _revealancestors() reveal ancestors exclusively
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 23:05:10 -0700] rev 32617
hidden: make _revealancestors() reveal ancestors exclusively I think this seems more expected. It also prepares for the next commit.
Sat, 27 May 2017 22:55:19 -0700 hidden: remove _consistencyblockers()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 22:55:19 -0700] rev 32616
hidden: remove _consistencyblockers() Roughly speaking, we currently do this to reveal hidden ancestors of visible revisions: 1. Iterate over all visible non-public revisions and see if they have hidden parents 2. For each revision found in step (1) walk the chain of hidden commits and reveal it We can simplify that by skipping step (1) and doing step (2) from all visible non-public revisions instead. This doesn't seem to have much impact on "perfvolatilesets". Before: ! obsolete ! wall 0.004616 comb 0.000000 user 0.000000 sys 0.000000 (best of 570) ! visible ! wall 0.008235 comb 0.010000 user 0.010000 sys 0.000000 (best of 326) After: ! obsolete ! wall 0.004727 comb 0.010000 user 0.010000 sys 0.000000 (best of 543) ! visible ! wall 0.008371 comb 0.000000 user 0.000000 sys 0.000000 (best of 324)
Sat, 27 May 2017 22:43:37 -0700 hidden: pass revs to iterate into _consistencyblockers()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 22:43:37 -0700] rev 32615
hidden: pass revs to iterate into _consistencyblockers() Instead of passing the domain into _consistencyblockers() and having the function calculate the set of revisions to iterate over, let the caller do it. This is just a minor refactoring to make future changes simpler.
Sat, 27 May 2017 22:10:20 -0700 hidden: remove unnecessary 'domain' parameter from _revealancestors()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 22:10:20 -0700] rev 32614
hidden: remove unnecessary 'domain' parameter from _revealancestors() The function will stop searching as soon as it runs into a non-hidden revision, so there is no need to restrict by the domain (of mutable revisions) as well. This doesn't seem to have much impact on "perfvolatilesets". Before: ! obsolete ! wall 0.004903 comb 0.000000 user 0.000000 sys 0.000000 (best of 535) ! visible ! wall 0.008913 comb 0.010000 user 0.010000 sys 0.000000 (best of 300) After: ! obsolete ! wall 0.004616 comb 0.000000 user 0.000000 sys 0.000000 (best of 570) ! visible ! wall 0.008235 comb 0.010000 user 0.010000 sys 0.000000 (best of 326)
Sat, 27 May 2017 21:17:06 -0700 hidden: change _domainancestors() to _revealancestors()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 21:17:06 -0700] rev 32613
hidden: change _domainancestors() to _revealancestors() This change makes the function actually reveal the ancestors by removing them from the hidden set. This prepares for further simplification. Note that the function will now only reveal contiguous chains of hidden revisions, but that's fine because we always pass it an immediate child of any revision that should be revealed (or the revision itself). This doesn't seem to have much impact on "perfvolatilesets". Before: ! obsolete ! wall 0.004672 comb 0.010000 user 0.010000 sys 0.000000 (best of 590) ! visible ! wall 0.008936 comb 0.010000 user 0.010000 sys 0.000000 (best of 322) After: ! obsolete ! wall 0.004903 comb 0.000000 user 0.000000 sys 0.000000 (best of 535) ! visible ! wall 0.008913 comb 0.010000 user 0.010000 sys 0.000000 (best of 300)
Sat, 27 May 2017 21:08:51 -0700 hidden: rename "revealedrevs" to "pinnedrevs" (API)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 27 May 2017 21:08:51 -0700] rev 32612
hidden: rename "revealedrevs" to "pinnedrevs" (API) E.g. tags and bookmarks can reveal revisions that would otherwise be hidden. A revision can also be revealed because one if its descendants is visible. Let's use the term "pinned" for the former case (bookmarks etc.).
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -32 +32 +50 +100 +300 +1000 +3000 +10000 tip