Fri, 20 Jul 2018 23:24:14 -0700 index: create function for deleting node from nodetree
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Jul 2018 23:24:14 -0700] rev 38884
index: create function for deleting node from nodetree A node is marked deleted by nt_insert(self, node, -1), but "-1" could mean so many things (notably nullrev), so let's hide it in a function. The function could possibly also remove nodes from the tree in the future (it currently only marks them deleted). Differential Revision: https://phab.mercurial-scm.org/D4004
Fri, 20 Jul 2018 09:58:09 -0700 revlog: remove some knowledge of sentinel nullid in index
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Jul 2018 09:58:09 -0700] rev 38883
revlog: remove some knowledge of sentinel nullid in index I think the "-2" to mean "last position in index, not counting the null revision at the end" is an implementation detail of the index that we should avoid spreading knowledge of. I hope we can even remove support for index[-2]. Differential Revision: https://phab.mercurial-scm.org/D4016
Fri, 13 Apr 2018 23:23:47 -0700 scmutil: make shortest() respect disambiguation revset
Martin von Zweigbergk <martinvonz@google.com> [Fri, 13 Apr 2018 23:23:47 -0700] rev 38882
scmutil: make shortest() respect disambiguation revset The previous patch would let you use a shorter prefix if the prefix is unique within a configured revset. However, that's not very useful if there's no simple way of knowing what that shorter prefix is. This patch adapts the shortest() template function to use the shorter prefixes for nodes in the configured revset. This is currently extremely slow, because it calculates the revset for each call to shortest(). To make this faster, the next patch will start caching the revset instance. Ideally we'd cache a prefix tree instance instead. Differential Revision: https://phab.mercurial-scm.org/D4038
Wed, 28 Mar 2018 09:36:02 -0700 lookup: add option to disambiguate prefix within revset
Martin von Zweigbergk <martinvonz@google.com> [Wed, 28 Mar 2018 09:36:02 -0700] rev 38881
lookup: add option to disambiguate prefix within revset When resolving a nodeid prefix that is not unique within the repo and the user has configured a revset that they want to disambiguate within, we now try to look up within that revset before we fail. If there is a unique match within the revset, we use that. This is of course most effective at allowing a short prefix if the revset contains few nodes. For most of our internal users at Google, "not public()" is sufficiently small that a hex digit or two is enough. The implementation is currently pretty slow, but good enough for small revsets (which is the expected use case). The scan in the revset is linear. We may want to use a prefix tree if we want to allow users to use a larger revset. Credit for the idea goes to Kyle Lippincott. Differential Revision: https://phab.mercurial-scm.org/D4037
Fri, 13 Apr 2018 23:37:53 -0700 revlog: use specialized exception for ambiguous prefix lookup
Martin von Zweigbergk <martinvonz@google.com> [Fri, 13 Apr 2018 23:37:53 -0700] rev 38880
revlog: use specialized exception for ambiguous prefix lookup It's useful to be able to catch a specific exception for this case. We'll use it soon. Differential Revision: https://phab.mercurial-scm.org/D4036
Thu, 02 Aug 2018 22:44:41 +0300 narrowspec: remove the unused _parsestoredpatterns() function
Pulkit Goyal <pulkit@yandex-team.ru> [Thu, 02 Aug 2018 22:44:41 +0300] rev 38879
narrowspec: remove the unused _parsestoredpatterns() function Previous patch started using sparse.parseconfig() to read narrowspec and now we don't need this function. Differential Revision: https://phab.mercurial-scm.org/D4058
Fri, 03 Aug 2018 22:29:04 +0530 narrowspec: use sparse.parseconfig() to parse narrowspec file (BC)
Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 03 Aug 2018 22:29:04 +0530] rev 38878
narrowspec: use sparse.parseconfig() to parse narrowspec file (BC) This also make narrow files use 'include' and 'exclude' instead of plural forms which are 'includes' and 'excludes'. This is BC because existing narrowspecs have to replace excludes, includes words with exclude and include i.e. their singular versions. Differential Revision: https://phab.mercurial-scm.org/D4057
Fri, 03 Aug 2018 22:24:58 +0530 sparse: add an action argument to parseconfig()
Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 03 Aug 2018 22:24:58 +0530] rev 38877
sparse: add an action argument to parseconfig() This will help us in reusing this function to parse narrow config files and unfiying the config file parsing logic. Differential Revision: https://phab.mercurial-scm.org/D4056
Fri, 03 Aug 2018 13:00:14 -0700 tests: avoid unnecessarily looking inside .hg/ in test-narrow*
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Aug 2018 13:00:14 -0700] rev 38876
tests: avoid unnecessarily looking inside .hg/ in test-narrow* Many of the narrow tests were looking at .hg/narrowspec. I think most of them were written before we added `hg tracked`, but now that we have that command, we should fix the tests. There were also a few instances of tests looking at .hg/dirstate. I fixed those to use `hg files` instead. Differential Revision: https://phab.mercurial-scm.org/D4093
Fri, 03 Aug 2018 10:56:07 -0700 narrow: extract part of narrowspec backup to core
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Aug 2018 10:56:07 -0700] rev 38875
narrow: extract part of narrowspec backup to core Just a little preparation for the next patch. Differential Revision: https://phab.mercurial-scm.org/D4095
Fri, 03 Aug 2018 11:02:34 -0700 narrow: move requirement constant from changegroup to repository
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Aug 2018 11:02:34 -0700] rev 38874
narrow: move requirement constant from changegroup to repository As suggested by Gregory Szorc. Differential Revision: https://phab.mercurial-scm.org/D4094
Fri, 03 Aug 2018 12:35:23 -0700 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Aug 2018 12:35:23 -0700] rev 38873
merge with stable
Sat, 21 Jul 2018 16:49:01 +0900 fileset: optimize 'x and not y' to 'x - y'
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 16:49:01 +0900] rev 38872
fileset: optimize 'x and not y' to 'x - y' 'x - y' is first rewritten to 'x and not y' so that x and y are reordered by weight.
Sat, 21 Jul 2018 16:41:45 +0900 fileset: reorder 'and' expression to evaluate basic patterns first
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 16:41:45 +0900] rev 38871
fileset: reorder 'and' expression to evaluate basic patterns first Timing of a crafted example (when disk cache is warm): $ hg files set:'binary() and path:contrib' (orig) time: real 0.140 secs (user 0.120+0.000 sys 0.020+0.000) (new) time: real 0.040 secs (user 0.030+0.000 sys 0.010+0.000)
Sun, 22 Jul 2018 11:47:29 +0900 fileset: roughly adjust weights of functions
Yuya Nishihara <yuya@tcha.org> [Sun, 22 Jul 2018 11:47:29 +0900] rev 38870
fileset: roughly adjust weights of functions ... in order to move status predicates far away from basic patterns. I don't know if each weight is appropriate, but it should be good enough as a start.
Sat, 21 Jul 2018 15:52:26 +0900 fileset: add stub for weight-based optimization
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 15:52:26 +0900] rev 38869
fileset: add stub for weight-based optimization The main purpose of this change is to group basic patterns, which can be mapped to a plain matcher. I'm not so interested in a weight of each function.
Sat, 21 Jul 2018 16:16:44 +0900 fileset: reject 'negate' node early while transforming parsed tree
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 16:16:44 +0900] rev 38868
fileset: reject 'negate' node early while transforming parsed tree That's how a 'negate' node is processed in revset.
Sat, 21 Jul 2018 16:13:30 +0900 fileset: drop 'group' node from tree to be evaluated
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 16:13:30 +0900] rev 38867
fileset: drop 'group' node from tree to be evaluated This helps rewriting a parsed tree.
Sat, 21 Jul 2018 16:11:36 +0900 fileset: add phase to transform parsed tree
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 16:11:36 +0900] rev 38866
fileset: add phase to transform parsed tree This isn't strictly necessary, but I decided to just follow the strategy of the revset parsing.
Fri, 03 Aug 2018 11:40:15 -0400 py3: whitelist another 3 tests caught by the ratchet
Augie Fackler <augie@google.com> [Fri, 03 Aug 2018 11:40:15 -0400] rev 38865
py3: whitelist another 3 tests caught by the ratchet Differential Revision: https://phab.mercurial-scm.org/D4069
Thu, 08 Feb 2018 13:53:59 -0800 testrunner: allow multiple #testcases
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Feb 2018 13:53:59 -0800] rev 38864
testrunner: allow multiple #testcases This lets you have multiple #testcases declarations and they're taken to be different dimensions of the test, so their cross product becomes the total set of test cases. For example: #testcases obsstore-on obsstore-off #testcases manifest-flat manifest-tree $ hg rebase ... ... #if obsstore-on $ hg log ... #endif Note that this is an excellent way to slow down the test suite, so use it with care. The feature is implemented by replacing most of the "case" variables that were strings before by an array of strings with each item a different dimension of the test case. The file names are created by joining the dimensions by "#" (e.g. test-foo.t#obsstore-on#manifest-flat). Differential Revision: https://phab.mercurial-scm.org/D4049
Wed, 01 Aug 2018 22:32:51 -0700 testrunner: use "#" for "test cases" suffix in .err filename too
Martin von Zweigbergk <martinvonz@google.com> [Wed, 01 Aug 2018 22:32:51 -0700] rev 38863
testrunner: use "#" for "test cases" suffix in .err filename too This seems like a natural follow-up to b865bba56db1 (run-tests: update the test case name format, 2018-05-13). Differential Revision: https://phab.mercurial-scm.org/D4052
Tue, 31 Jul 2018 19:11:17 +0530 resolve: add confirm config option
Sushil khanchi <sushilkhanchi97@gmail.com> [Tue, 31 Jul 2018 19:11:17 +0530] rev 38862
resolve: add confirm config option This config setting gives a functionality to confirm before it re-merge all unresolved files. If this config is enabled, when you run 'hg resolve --all' it will prompt with a msg "re-merge all unresolved files (yn)?" To enable this functionality: [commands] resolve.confirm = True Differential Revision: https://phab.mercurial-scm.org/D3988
Tue, 17 Jul 2018 23:34:55 -0700 revlog: remove side effect from failed nt_init()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 17 Jul 2018 23:34:55 -0700] rev 38861
revlog: remove side effect from failed nt_init() If nt_init() successfully allocates memory for the node tree but then runs out of memory while trying to insert nullid into it, it will leave the node tree pointer set on the index object. That means that future node tree operations will think that the tree is properly initialized. It seems very unlikely to make a difference in practice (if nt_init() runs out of memory, not much else will probably work), but since I spotted it, I figured I might as well fix it. Differential Revision: https://phab.mercurial-scm.org/D4028
Sun, 08 Jul 2018 23:39:32 -0700 revlog: remove micro-optimization for looking up only nullid
Martin von Zweigbergk <martinvonz@google.com> [Sun, 08 Jul 2018 23:39:32 -0700] rev 38860
revlog: remove micro-optimization for looking up only nullid index_find_node() would call nt_find() before initializing the node tree. nt_find() would then return -2 unless the requested revision was the null revision. I can't imagine what scenario that is optimizing for, and doing the initialization earlier makes the code simpler and easier to follow, so that's what this patch does. Differential Revision: https://phab.mercurial-scm.org/D4027
Fri, 20 Jul 2018 23:57:25 -0700 revlog: remove unnecessary output parameter from node_check()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Jul 2018 23:57:25 -0700] rev 38859
revlog: remove unnecessary output parameter from node_check() The "nodelen" output parameter is always set to 20 if the function returns successfully. Differential Revision: https://phab.mercurial-scm.org/D4026
Thu, 02 Aug 2018 23:50:47 -0700 narrow: move status-filtering to core and to ctx
Martin von Zweigbergk <martinvonz@google.com> [Thu, 02 Aug 2018 23:50:47 -0700] rev 38858
narrow: move status-filtering to core and to ctx One of my recent changes from repo.status(ctx1, ctx2) to ctx1.status(ctx2) broke some of our Google-internal tests. The problem turned out to be that the narrow extension was overriding repo.status() to make it filter out paths outside the narrowspec. When I changed to ctx1.status(ctx2), then that filtering obviously got lost. ctx.status() seems like a better method to do the filtering in, so this patch moves the filtering into that method, thereby also moving it out of the extension and into core. Differential Revision: https://phab.mercurial-scm.org/D4068
Tue, 10 Jul 2018 20:23:55 +0530 amend: support "history-editing-backup" config option
Sushil khanchi <sushilkhanchi97@gmail.com> [Tue, 10 Jul 2018 20:23:55 +0530] rev 38857
amend: support "history-editing-backup" config option Now, amend is in the list of those history editing commands which support `history-editing-backup` config option. If you don't want to store any backup then just use this config. [ui] hisotry-editing-backup = False Current status of list of history editing commands which support this config: 1. histedit 2. rebase 3. amend Differential Revision: https://phab.mercurial-scm.org/D3968
Fri, 03 Aug 2018 00:10:52 +0530 rebase: move "backup" flag to rebaseruntime
Sushil khanchi <sushilkhanchi97@gmail.com> [Fri, 03 Aug 2018 00:10:52 +0530] rev 38856
rebase: move "backup" flag to rebaseruntime It was getting messy to populate "backup" flag to calls of `_finishrebase()` and `_prepareabortorcontinue`, so made some changes to move "backup" flag to rbsrt. Differential Revision: https://phab.mercurial-scm.org/D4055
Mon, 11 Jun 2018 13:00:15 +0900 i18n: format warning of hggettext in standard compiler error style
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 11 Jun 2018 13:00:15 +0900] rev 38855
i18n: format warning of hggettext in standard compiler error style Now, hggettext specific warning messages are formatted in: FILENAME:LINENO:MESSAGE This allows editors to jump into corresponded line easily.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip