Mon, 16 Jul 2018 16:43:35 +0200 revset-benchmark: use a generic revset to test `heads(commonancestors())`
Boris Feld <boris.feld@octobus.net> [Mon, 16 Jul 2018 16:43:35 +0200] rev 38711
revset-benchmark: use a generic revset to test `heads(commonancestors())` This allow to benchmark revset performance in other repositories than just the mercurial one.
Mon, 16 Jul 2018 16:22:43 +0200 revlog: reintroduce `revlog.descendant` as deprecated
Boris Feld <boris.feld@octobus.net> [Mon, 16 Jul 2018 16:22:43 +0200] rev 38710
revlog: reintroduce `revlog.descendant` as deprecated Reintroduce `revlog.descendant` to help extensions authors update their extensions in order to use the new API.
Mon, 16 Jul 2018 16:21:12 +0200 context: reintroduce `ctx.descendant` as deprecated
Boris Feld <boris.feld@octobus.net> [Mon, 16 Jul 2018 16:21:12 +0200] rev 38709
context: reintroduce `ctx.descendant` as deprecated Reintroduce `ctx.descendant` to help extensions authors update their extensions in order to use the new API.
Sun, 15 Jul 2018 18:32:17 +0900 obsolete: explode if metadata contains invalid UTF-8 sequence (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Jul 2018 18:32:17 +0900] rev 38708
obsolete: explode if metadata contains invalid UTF-8 sequence (API) The current metadata API can be a source of bugs since it forces callers to process encoding conversion by themselves. So let's make it reject bad data as a last ditch. I assume there's no metadata field which is supposed to store arbitrary BLOB like transplant_source.
Sun, 15 Jul 2018 18:24:57 +0900 obsolete: store user name and note in UTF-8 (issue5754) (BC)
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Jul 2018 18:24:57 +0900] rev 38707
obsolete: store user name and note in UTF-8 (issue5754) (BC) Before, user names were stored in local encoding and transferred across repositories, which made it impossible to restore non-ASCII user names on different platforms. This patch fixes new markers to be encoded in UTF-8 and decoded back to local encoding when displaying. Existing markers are unfixable so they may result in mojibake. I don't like the API that requires metadata dict to be UTF-8 encoded, which is a source of bugs, but there's no abstraction layer to process the encoding thingy efficiently. So we apply the same rule as extras dict to obsstore metadata.
Sun, 15 Jul 2018 18:22:40 +0900 obsolete: clarify users in markerusers() never contain None
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Jul 2018 18:22:40 +0900] rev 38706
obsolete: clarify users in markerusers() never contain None
Thu, 12 Jul 2018 23:07:29 +0900 revset: special case commonancestors(none()) to be empty set
Yuya Nishihara <yuya@tcha.org> [Thu, 12 Jul 2018 23:07:29 +0900] rev 38705
revset: special case commonancestors(none()) to be empty set This matches the behavior of ancestor(none()). From an implementation perspective, ancestor() and commonancestors() are intersection, and ancestors() is union, so it would make some sense that commonancestors(none()) returned all revisions. However, ancestor(none()) isn't implemented as such, which breaks ancestor(x) == max(commonancestors(x)). From a user perspective, ancestors of nothing is nothing whichever type of operation the ancestor predicate does.
Tue, 10 Jul 2018 23:01:53 +0900 revset: clarify heads() order doesn't matter while computing common ancestors
Yuya Nishihara <yuya@tcha.org> [Tue, 10 Jul 2018 23:01:53 +0900] rev 38704
revset: clarify heads() order doesn't matter while computing common ancestors Follows up 5460926352ee and 52f19a840543.
Sat, 14 Jul 2018 10:51:52 +0900 hghave: require clang-format >= 6 due to output change
Yuya Nishihara <yuya@tcha.org> [Sat, 14 Jul 2018 10:51:52 +0900] rev 38703
hghave: require clang-format >= 6 due to output change
Sat, 14 Jul 2018 10:50:10 +0900 cext: reformat with clang-format 6.0
Yuya Nishihara <yuya@tcha.org> [Sat, 14 Jul 2018 10:50:10 +0900] rev 38702
cext: reformat with clang-format 6.0 It appears some changes in clang-format affect our code. I didn't dig into that deeper since the new output looks better.
Sun, 08 Jul 2018 19:52:35 +0900 py3: use bytes() to byte-stringify Abort message in handleremotechangegroup()
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Jul 2018 19:52:35 +0900] rev 38701
py3: use bytes() to byte-stringify Abort message in handleremotechangegroup()
Sun, 08 Jul 2018 19:44:51 +0900 py3: don't str() to byte-stringify object in test-bundle2-remote-changegroup.t
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Jul 2018 19:44:51 +0900] rev 38700
py3: don't str() to byte-stringify object in test-bundle2-remote-changegroup.t
Sun, 08 Jul 2018 19:39:11 +0900 py3: byte-stringify literals in extension in test-bundle2-remote-changegroup.t
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Jul 2018 19:39:11 +0900] rev 38699
py3: byte-stringify literals in extension in test-bundle2-remote-changegroup.t # skip-blame just some b''
Sun, 08 Jul 2018 19:41:00 +0900 py3: open file in binary mode in test-bundle2-remote-changegroup.t
Yuya Nishihara <yuya@tcha.org> [Sun, 08 Jul 2018 19:41:00 +0900] rev 38698
py3: open file in binary mode in test-bundle2-remote-changegroup.t
Fri, 01 Jun 2018 12:10:34 +0200 statprof: small if cleanup
Boris Feld <boris.feld@octobus.net> [Fri, 01 Jun 2018 12:10:34 +0200] rev 38697
statprof: small if cleanup Explicitly testing for None to avoid comparison bugs.
Sat, 14 Jul 2018 02:10:43 +0200 store: assert the fncache have been loaded if dirty
Boris Feld <boris.feld@octobus.net> [Sat, 14 Jul 2018 02:10:43 +0200] rev 38696
store: assert the fncache have been loaded if dirty This should catch fncache corruption as the one that existed in `perffncachewrite`.
Sat, 14 Jul 2018 02:09:47 +0200 perffncachewrite: load fncache after lock is acquired
Boris Feld <boris.feld@octobus.net> [Sat, 14 Jul 2018 02:09:47 +0200] rev 38695
perffncachewrite: load fncache after lock is acquired Without this patch, running perffncachewrite on a repository destroy its fncache. Lock Acquisition drops various caches, including the fncache one. Then writing of an non-loaded fncache result into an empty one.
Fri, 22 Jun 2018 11:02:42 +0100 perf: add a 'perf.all-timing' option to display more than best time
Boris Feld <boris.feld@octobus.net> [Fri, 22 Jun 2018 11:02:42 +0100] rev 38694
perf: add a 'perf.all-timing' option to display more than best time Minimal time is a useful information, but it is useful to have a wider view on the performance picture.
Wed, 11 Jul 2018 10:46:15 +0200 perf: document the perfmanifest command
Boris Feld <boris.feld@octobus.net> [Wed, 11 Jul 2018 10:46:15 +0200] rev 38693
perf: document the perfmanifest command
Sat, 09 Jun 2018 22:38:29 +0900 fileset: remove fullmatchctx class
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jun 2018 22:38:29 +0900] rev 38692
fileset: remove fullmatchctx class It's exactly the same as matchctx.
Sat, 09 Jun 2018 22:35:21 +0900 fileset: remove subset and unused filtering functions from matchctx
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jun 2018 22:35:21 +0900] rev 38691
fileset: remove subset and unused filtering functions from matchctx
Sat, 09 Jun 2018 22:31:51 +0900 fileset: remove callexisting flag and mctx.existing() (API)
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jun 2018 22:31:51 +0900] rev 38690
fileset: remove callexisting flag and mctx.existing() (API) They are no longer needed since any files are included as long as they are passed in to the matcher.
Sat, 09 Jun 2018 19:55:10 +0900 fileset: rewrite predicates to return matcher not closed to subset (API) (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jun 2018 19:55:10 +0900] rev 38689
fileset: rewrite predicates to return matcher not closed to subset (API) (BC) This makes fileset expression open to any input, so that we can just say "hg status 'set: not binary()'" to select text files including unknowns. With this and removal of subset computation, 'set:**' becomes as fast as 'glob:**'. Further optimization will probably be possible by narrowing the file tree to compute status for example. This also fixes 'subrepo()' to not ignore the current mctx.subset. .. bc:: The fileset expression may include untracked files by default. Use ``tracked()`` to explicitly filter out files not existing at the context revision.
Tue, 10 Jul 2018 23:49:48 +0900 highlight: use matcher API to test if file should be pygmentized
Yuya Nishihara <yuya@tcha.org> [Tue, 10 Jul 2018 23:49:48 +0900] rev 38688
highlight: use matcher API to test if file should be pygmentized Prepares for the upcoming API change. We'll no longer have to call the fileset function directly since the cost of the matcher-based fileset will become O(number of tests) from O(number of files in subset).
Sun, 10 Jun 2018 20:58:10 +0900 fileset: parse argument of size() by predicate function
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 20:58:10 +0900] rev 38687
fileset: parse argument of size() by predicate function This change is necessary to pass in a size expression to predicatematcher. See the next patch.
Sun, 10 Jun 2018 22:19:56 +0900 fileset: add "tracked()" to explicitly select files in the revision
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 22:19:56 +0900] rev 38686
fileset: add "tracked()" to explicitly select files in the revision I'm going to rewrite filesets to be match predicates, which means basic patterns such as '*' will no longer be "closed" to the subset constructed from the ctx. Good thing is that 'hg status "set:not binary()"' can include unknown files out of the box, and fileset computation will likely to be faster as we won't have to walk dirstate twice, for example. Bad thing is that we can't select files at a certain revision by 'set:revs(REV, **)' since '**' is "open" to any paths. So, this patch introduces "tracked()" as a replacement for the '**' in the example above.
Sat, 09 Jun 2018 18:11:49 +0900 fileset: rewrite andset() to not use mctx.narrow()
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jun 2018 18:11:49 +0900] rev 38685
fileset: rewrite andset() to not use mctx.narrow() New code is less efficient than the original, but it helps porting andset() to matcher composition. This will be cleaned up later. This effectively disables the fullmatchctx magic since mctx will never be demoted to the matchctx. The fullmatchctx class will be removed later.
Sun, 10 Jun 2018 20:02:53 +0900 fileset: add helpers to make predicatematcher and nevermatcher
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 20:02:53 +0900] rev 38684
fileset: add helpers to make predicatematcher and nevermatcher These functions will be used to compose a tree of matchers from a fileset expression.
Sat, 14 Jul 2018 13:21:49 +0900 phases: micro-optimize newheads() to not create context objects
Yuya Nishihara <yuya@tcha.org> [Sat, 14 Jul 2018 13:21:49 +0900] rev 38683
phases: micro-optimize newheads() to not create context objects
Sat, 14 Jul 2018 13:19:18 +0900 phases: remove excessive optimization from newheads() (issue5939)
Yuya Nishihara <yuya@tcha.org> [Sat, 14 Jul 2018 13:19:18 +0900] rev 38682
phases: remove excessive optimization from newheads() (issue5939) This function is intended to compute 'heads(::heads - roots::)', but it failed because 'heads + parents(roots)' missed sibling branches of the roots. That's why the public heads slipped down from D to B in the example added by 2a227782e754 "tests: add test demonstrating phase loss when cloning": > E draft > |\Z draft > | Y draft > D | public > | X draft > C/ public > B public > A public where heads = {E, Z}, roots = {X}
Sun, 15 Jul 2018 15:48:18 +0530 rebase: remove unused variable "release" and an extra blank line
Sushil khanchi <sushilkhanchi97@gmail.com> [Sun, 15 Jul 2018 15:48:18 +0530] rev 38681
rebase: remove unused variable "release" and an extra blank line Differential Revision: https://phab.mercurial-scm.org/D3947
Sat, 14 Jul 2018 23:00:22 +0530 rebase: remove unnecessary confirm block
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 14 Jul 2018 23:00:22 +0530] rev 38680
rebase: remove unnecessary confirm block Removed unnecessary 'if confirm:' block as that thing is now handled at 'finally'. Differential Revision: https://phab.mercurial-scm.org/D3945
Sat, 14 Jul 2018 08:59:42 +0530 rebase: in --confirm option just abort if hit a conflict
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 14 Jul 2018 08:59:42 +0530] rev 38679
rebase: in --confirm option just abort if hit a conflict Before this patch, it was prompting the user in both cases 1) when there is no conflict 2) when there is at least one conflict. But for simplicity we can just abort if we hit a conflict and no need to prompt in that case. Differential Revision: https://phab.mercurial-scm.org/D3944
Thu, 12 Jul 2018 15:29:03 +0200 pullbundle: fix handling of gzip bundlespecs
Joerg Sonnenberger <joerg@bec.de> [Thu, 12 Jul 2018 15:29:03 +0200] rev 38678
pullbundle: fix handling of gzip bundlespecs Differential Revision: https://phab.mercurial-scm.org/D3933
Wed, 11 Jul 2018 16:44:33 -0700 tests: add test demonstrating phase loss when cloning (issue5939)
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 11 Jul 2018 16:44:33 -0700] rev 38677
tests: add test demonstrating phase loss when cloning (issue5939) The added tests demonstrate that phases exchange when using the listkeys based phases exchange fails to preserve public phase in a certain scenario when a merge is a phase root. Both non-bundle2 and bundle2 prior to the binary phase data part are buggy. Differential Revision: https://phab.mercurial-scm.org/D3932
Fri, 13 Jul 2018 14:20:12 -0700 scmutil: rewrite docstring for filecache
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 13 Jul 2018 14:20:12 -0700] rev 38676
scmutil: rewrite docstring for filecache The old docstring was incorrect in that it said that subsequent calls perform a stat() and refresh the object if things change. This is not how things work: __get__ populates obj.__dict__[self.sname] with the result of the decorated function and returns this value without validation on subsequent calls, if available. The correct usage of this type is kinda wonky. It would probably benefit from a refactor. But I don't have time to do that right now. But we can change the docstring so others aren't entrapped by its lies (like I was when using repofilecache in a Mozilla extension). Differential Revision: https://phab.mercurial-scm.org/D3943
Thu, 12 Jul 2018 22:35:54 +0530 rebase: correct misleading message in --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com> [Thu, 12 Jul 2018 22:35:54 +0530] rev 38675
rebase: correct misleading message in --confirm option Differential Revision: https://phab.mercurial-scm.org/D3939
Thu, 12 Jul 2018 22:23:51 +0530 rebase: make sure we don't loose the return code in --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com> [Thu, 12 Jul 2018 22:23:51 +0530] rev 38674
rebase: make sure we don't loose the return code in --confirm option return _dorebase() to make sure it returns 'return code'. Differential Revision: https://phab.mercurial-scm.org/D3938
Wed, 11 Jul 2018 15:12:01 -0700 rebase: use revnums (not nodes) for set of extinct revisions
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Jul 2018 15:12:01 -0700] rev 38673
rebase: use revnums (not nodes) for set of extinct revisions There is no need to convert extinct revisions to nodeids. Differential Revision: https://phab.mercurial-scm.org/D3942
Wed, 11 Jul 2018 15:01:47 -0700 rebase: avoid converting from nodes to revnums twice
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Jul 2018 15:01:47 -0700] rev 38672
rebase: avoid converting from nodes to revnums twice In the case where the node has successors, but none of them is an ancestor of the destination, we would iterate over the successor nodes twice, check if they're in the repo and convert them to revnums. I doubt it's a measureable cost, but it gets simpler this way too. Differential Revision: https://phab.mercurial-scm.org/D3941
Wed, 11 Jul 2018 15:03:39 -0700 rebase: reduce scope of a variable
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Jul 2018 15:03:39 -0700] rev 38671
rebase: reduce scope of a variable Differential Revision: https://phab.mercurial-scm.org/D3940
Thu, 12 Jul 2018 08:22:28 -0700 context: rename descendant() to isancestorof()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Jul 2018 08:22:28 -0700] rev 38670
context: rename descendant() to isancestorof() This makes the direction much clearer, IMO. Differential Revision: https://phab.mercurial-scm.org/D3936
Thu, 12 Jul 2018 09:25:02 -0700 copies: delete now-unnecessary check for "a == b" before "a.descendant(b)"
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Jul 2018 09:25:02 -0700] rev 38669
copies: delete now-unnecessary check for "a == b" before "a.descendant(b)" Unnecessary since 879cbdde63df (revlog: do inclusive descendant testing (API), 2018-06-21). Differential Revision: https://phab.mercurial-scm.org/D3935
Thu, 12 Jul 2018 08:14:21 -0700 revlog: delete isdescendantrev() in favor of isancestorrev()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Jul 2018 08:14:21 -0700] rev 38668
revlog: delete isdescendantrev() in favor of isancestorrev() As agreed on by Boris, Yuya, and me on D3929. Differential Revision: https://phab.mercurial-scm.org/D3934
Sat, 30 Jun 2018 12:42:49 +0530 rebase: add --confirm option
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 30 Jun 2018 12:42:49 +0530] rev 38667
rebase: add --confirm option This feature adds a functionality in rebase to confirm before applying changes. When there is no conflict and user confirm to apply actions, we just finish the unfinished rebase. But when there is a conflict and user confirm to apply actions then we can't just finish rebasing using rbsrt._finishrebase() because in-memory merge doesn't support conflicts, so we have to abort and run on-disk merge in this case. And if user doesn't confirm to apply actions then simply abort the rebase. Differential Revision: https://phab.mercurial-scm.org/D3870
Wed, 11 Jul 2018 16:29:23 -0700 revlog: introduce a isancestorrev() and use it in rebase
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Jul 2018 16:29:23 -0700] rev 38666
revlog: introduce a isancestorrev() and use it in rebase Differential Revision: https://phab.mercurial-scm.org/D3931
Wed, 11 Jul 2018 16:37:30 -0700 revlog: make isdescendantrev(a, b) check if a < b
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Jul 2018 16:37:30 -0700] rev 38665
revlog: make isdescendantrev(a, b) check if a < b This check was taken from rebase.py. It seems to make sense to move it here, but I haven't done any measurements. Differential Revision: https://phab.mercurial-scm.org/D3930
Wed, 11 Jul 2018 16:21:41 -0700 revlog: replace descendant(b, a) by isdescendantrev(a, b) (API)
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Jul 2018 16:21:41 -0700] rev 38664
revlog: replace descendant(b, a) by isdescendantrev(a, b) (API) The "is" is to match "isancestor" and to make it clear that it doesn't return a descendant. The "rev" is to make it clear that it's not about nodeids (unlike e.g. isancestor()). The argument order change is just seems more natural (and makes isancestor() less confusing). Differential Revision: https://phab.mercurial-scm.org/D3929
Wed, 11 Jul 2018 16:27:40 -0700 revlog: move comment about commonancestorsheads where it's used
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Jul 2018 16:27:40 -0700] rev 38663
revlog: move comment about commonancestorsheads where it's used Differential Revision: https://phab.mercurial-scm.org/D3928
Wed, 11 Jul 2018 13:02:06 -0700 removeemptydirs: add test for `hg split` inside a disappearing directory
Kyle Lippincott <spectral@google.com> [Wed, 11 Jul 2018 13:02:06 -0700] rev 38662
removeemptydirs: add test for `hg split` inside a disappearing directory Differential Revision: https://phab.mercurial-scm.org/D3927
Wed, 11 Jul 2018 14:28:13 +0100 fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com> [Wed, 11 Jul 2018 14:28:13 +0100] rev 38661
fncache: avoid loading the filename cache when not actually modifying it With time, fncache can become very large. The mozilla-central repo for example, has a 31M and growing fncache file. Loading this file takes time (280ms for the mozilla-central repository). In many scenarios, we don't need to load fncache at all. For example, when committing changes to existing files, or pushing such commits to another clone. This patch detects when a name is added via store.vfs(), and only loads the cache if a) the data metadata file doesn't already exist, or b) when opening for appending, the data or metadata file exists but has size (a transaction rollback leaves behind such files). Benchmarks (run on Macos 10.13 on a 2017-model Macbook Pro with Core i7 2.9GHz and flash drive), each test without and with patch run 5 times: * committing to an existing file, against the mozilla-central repository. Baseline real time average 2.3736, with patch 1.9884. * unbundling a large changeset consisting *only* of existing-file modifications (159 revisions, 1050 modifications, mozilla-central 4a250a0e4f29:beea9ac7d823), into a clone limited to the ancestor revision of that revset). Baseline real time average 1.5048, with patch 1.3108.
Wed, 11 Jul 2018 16:11:33 +0200 tests: add diff color trailing whitespace test
Sune Foldager <cryo@cyanite.org> [Wed, 11 Jul 2018 16:11:33 +0200] rev 38660
tests: add diff color trailing whitespace test
Wed, 11 Jul 2018 13:40:50 -0400 scmutil: fix shortesthexnodeidprefix on Python 3 for 0-prefixed nodes
Augie Fackler <augie@google.com> [Wed, 11 Jul 2018 13:40:50 -0400] rev 38659
scmutil: fix shortesthexnodeidprefix on Python 3 for 0-prefixed nodes This fixes test-bookmarks.t on Python 3 (which had regressed.) Differential Revision: https://phab.mercurial-scm.org/D3926
Wed, 11 Jul 2018 12:36:37 -0400 tests: add missing b prefix in test-context.py
Augie Fackler <augie@google.com> [Wed, 11 Jul 2018 12:36:37 -0400] rev 38658
tests: add missing b prefix in test-context.py # skip-blame just a b prefix Differential Revision: https://phab.mercurial-scm.org/D3925
Wed, 11 Jul 2018 11:43:22 -0400 manifest: just duplicate the definition of items as iteritems
Augie Fackler <augie@google.com> [Wed, 11 Jul 2018 11:43:22 -0400] rev 38657
manifest: just duplicate the definition of items as iteritems The forwarding trick was failing test-check-interfaces on Python 3. Duplicating a line of code is easy enough I'm doing that rather than try and figure out what's going on in any kind of detail. Differential Revision: https://phab.mercurial-scm.org/D3924
Wed, 11 Jul 2018 11:41:14 -0400 tests: properly sort imports in test-nointerrupt.t
Augie Fackler <augie@google.com> [Wed, 11 Jul 2018 11:41:14 -0400] rev 38656
tests: properly sort imports in test-nointerrupt.t Somehow this was only detected in Python 3. Differential Revision: https://phab.mercurial-scm.org/D3923
(0) -30000 -10000 -3000 -1000 -300 -100 -56 +56 +100 +300 +1000 +3000 +10000 tip