Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Aug 2018 13:00:14 -0700] rev 38837
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
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Aug 2018 10:56:07 -0700] rev 38836
narrow: extract part of narrowspec backup to core
Just a little preparation for the next patch.
Differential Revision: https://phab.mercurial-scm.org/D4095
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Aug 2018 11:02:34 -0700] rev 38835
narrow: move requirement constant from changegroup to repository
As suggested by Gregory Szorc.
Differential Revision: https://phab.mercurial-scm.org/D4094
Martin von Zweigbergk <martinvonz@google.com> [Fri, 03 Aug 2018 12:35:23 -0700] rev 38834
merge with stable
Augie Fackler <augie@google.com> [Fri, 03 Aug 2018 15:09:19 -0400] rev 38833
tests: update test expectations in pre-2.7.9 branch of this test
As far as I can tell this is the only spot that got overlooked. Rough
test methodology (run inside an hg working copy):
docker run --rm -v `pwd`:/hg -it debian:wheezy bash
apt-get update
apt-get install python python-dev build-essential unzip mercurial \
wget libbz2-dev
make testpy-2.7.8
You could try and use the system Python, but it's 2.7.3 and has lots
of issues for hg these days that are not worth fixing.
Differential Revision: https://phab.mercurial-scm.org/D4070
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 16:49:01 +0900] rev 38832
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.
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 16:41:45 +0900] rev 38831
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)
Yuya Nishihara <yuya@tcha.org> [Sun, 22 Jul 2018 11:47:29 +0900] rev 38830
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.
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 15:52:26 +0900] rev 38829
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.
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 16:16:44 +0900] rev 38828
fileset: reject 'negate' node early while transforming parsed tree
That's how a 'negate' node is processed in revset.
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 16:13:30 +0900] rev 38827
fileset: drop 'group' node from tree to be evaluated
This helps rewriting a parsed tree.
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Jul 2018 16:11:36 +0900] rev 38826
fileset: add phase to transform parsed tree
This isn't strictly necessary, but I decided to just follow the strategy
of the revset parsing.
Augie Fackler <augie@google.com> [Fri, 03 Aug 2018 11:40:15 -0400] rev 38825
py3: whitelist another 3 tests caught by the ratchet
Differential Revision: https://phab.mercurial-scm.org/D4069
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Feb 2018 13:53:59 -0800] rev 38824
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
Martin von Zweigbergk <martinvonz@google.com> [Wed, 01 Aug 2018 22:32:51 -0700] rev 38823
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
Sushil khanchi <sushilkhanchi97@gmail.com> [Tue, 31 Jul 2018 19:11:17 +0530] rev 38822
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
Martin von Zweigbergk <martinvonz@google.com> [Tue, 17 Jul 2018 23:34:55 -0700] rev 38821
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
Martin von Zweigbergk <martinvonz@google.com> [Sun, 08 Jul 2018 23:39:32 -0700] rev 38820
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
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Jul 2018 23:57:25 -0700] rev 38819
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
Martin von Zweigbergk <martinvonz@google.com> [Thu, 02 Aug 2018 23:50:47 -0700] rev 38818
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
Sushil khanchi <sushilkhanchi97@gmail.com> [Tue, 10 Jul 2018 20:23:55 +0530] rev 38817
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
Sushil khanchi <sushilkhanchi97@gmail.com> [Fri, 03 Aug 2018 00:10:52 +0530] rev 38816
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
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 11 Jun 2018 13:00:15 +0900] rev 38815
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.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 11 Jun 2018 12:32:16 +0900] rev 38814
i18n: omit redundant translatable synopsis text to avoid xgettext warning
This empty translatable synopsis text causes xgettext warning below:
Empty msgid. It is reserved by GNU gettext:
gettext("") returns the header entry with
meta information, not the empty string.
This "synopsis" argument of @command annotation is omitable.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 02 Aug 2018 21:07:30 +0900] rev 38813
i18n: avoid substitution of PYFILES at runtime for readability of output
This substitution decreases readability of "make update-pot" output,
because PYFILES consists of many files.
This patch makes "make update-pot" show "find mercurial hgext doc
-name '*.py'" instead of many *.py files at runtime.
Martijn Pieters <mj@zopatista.com> [Thu, 02 Aug 2018 20:53:03 +0100] rev 38812
util: make new timedcmstats class Python 3 compatible
Danny Hooper <hooper@google.com> [Wed, 01 Aug 2018 16:03:32 -0700] rev 38811
fix: add a monkey-patchable point after all new revisions have been committed
Differential Revision: https://phab.mercurial-scm.org/D4048
Martin von Zweigbergk <martinvonz@google.com> [Thu, 02 Aug 2018 13:35:13 -0700] rev 38810
help: add quotes to a few commands we point to
I didn't know that 'hg help "revsets.x or y"' was valid syntax, so the
quoting is extra useful here to make it clear that that is an actual
command.
Differential Revision: https://phab.mercurial-scm.org/D4059
Augie Fackler <augie@google.com> [Wed, 01 Aug 2018 23:25:35 -0400] rev 38809
linelog: port to Python 3
Differential Revision: https://phab.mercurial-scm.org/D4051
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Jul 2018 17:42:36 -0700] rev 38808
exchange: move simple narrow changegroup generation from extension
The narrow extension completely replaced the function generating the
changegroup part when a narrow changegroup was requested. Previous
commits have taught the in-core changegroup code how to filter files
based on a matcher. This commit teaches the in-core bundle2 part
generation code to construct a matcher based on arguments. It
will also emit a bundle2 part describing the narrow spec.
I believe the changegroup part generation code in the narrow extension
is now limited to ellipsis serving mode. i.e. core is now capable
of narrow changegroup generation when ellipsis mode is disabled.
Differential Revision: https://phab.mercurial-scm.org/D4014