FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 21 Feb 2017 01:20:59 +0900] rev 31050
txnutil: factor out the logic to read file in according to HG_PENDING
This patch adds new file txnutil.py, because:
- transaction.py is too large to import small utility logic
- scmutil.py or so causes cyclic importing in phases.py
mayhavepending() is defined separately for convenience in subsequent
patch.
Stanislau Hlebik <stash@fb.com> [Mon, 20 Feb 2017 01:54:07 -0800] rev 31049
repoview: separate cache hash computation from cache reading
This change will make it easier for extensions to use another cache hash.
Dr Rainer Woitok <rainer.woitok@gmail.com> [Mon, 20 Feb 2017 18:27:29 +0100] rev 31048
tests: make test suite more immune to environment variables
Plenty of tests break when "make tests" is run while environment
variables "HGPLAIN" or "HGPLAINEXCEPT" are set (test "test-obsolete-
checkheads.t" is just a single example).
This patch causes script "run-tests.py" to also remove these two
variables from the environment the tests are executed in.
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:08:49 -0500] rev 31047
version: enable pager if --verbose is specified
`hg version` output is very short without --verbose, but with
--verbose it tends to scroll off the user's screen.
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:07:16 -0500] rev 31046
tags: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:06:59 -0500] rev 31045
summary: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:06:32 -0500] rev 31044
status: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:06:10 -0500] rev 31043
resolve: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:06:01 -0500] rev 31042
paths: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:04:44 -0500] rev 31041
outgoing: enable pager
The structure here is similar to incoming, and requires similar treatment.
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:04:26 -0500] rev 31040
manifest: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:04:10 -0500] rev 31039
locate: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:03:48 -0500] rev 31038
incoming: enable pager
The design of incoming means we have to activate the pager in several
places, depending on which codepath gets chosen.
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:09:21 -0500] rev 31037
help: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:09:15 -0500] rev 31036
grep: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:02:48 -0500] rev 31035
files: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:01:42 -0500] rev 31034
config: activate pager if not starting an editor
This demonstrates the power of the non-attend-based pager API.
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:57:21 -0500] rev 31033
qdiff: migrate to modern pager API
This results in the default pager-attend list being empty. Sadly, we
can't let the code be that way, because some legacy extensions depend
on hooking the pager's attend list at import time (and we'd like to
not break them), and if the list is actually *empty* that triggers
magic behavior in the extension that attends everything. Instead, we
put a long, improbable command name as the only entry in the attend
list.
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:59:25 -0500] rev 31032
log: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:58:54 -0500] rev 31031
export: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:58:26 -0500] rev 31030
diff: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:57:52 -0500] rev 31029
cat: migrate to modern pager API
Augie Fackler <augie@google.com> [Sun, 19 Feb 2017 15:09:41 -0500] rev 31028
annotate: start pager after we're sure we wont abort
This avoids needlessly putting a short error message into the pager.
Augie Fackler <augie@google.com> [Sun, 19 Feb 2017 20:16:11 -0500] rev 31027
dispatch: consolidate pager flag handling to a single place
This makes a little more sense, thanks to Martin for suggesting it.
Augie Fackler <augie@google.com> [Sun, 19 Feb 2017 20:12:52 -0500] rev 31026
ui: rename neverpager to disablepager
I agree this is a clearer name for this method.
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 20:00:18 +0900] rev 31025
scmutil: proxy revrange() through repo to break import cycles
This was one of the hardest import cycles as scmutil is widely used and
revset functions are likely to depend on a variety of modules.
New repo.anyrevs() does not expand user aliases by default to copy the
behavior of the existing repo.revs(). I don't want to add new function to
localrepository, but this function is quite similar to repo.revs() so it
won't increase the complexity of the localrepository class so much.
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 18:19:33 +0900] rev 31024
revset: split language services to revsetlang module (API)
New revsetlang module hosts parser, tokenizer, and miscellaneous functions
working on parsed tree. It does not include functions for evaluation such as
getset() and match().
2288 mercurial/revset.py
684 mercurial/revsetlang.py
2972 total
get*() functions are aliased since they are common in revset.py.
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 18:16:09 +0900] rev 31023
revset: import set classes directly from smartset module
Follows up
1be65deb3d54.
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Feb 2017 18:00:01 +0900] rev 31022
help: add pointer how to narrow list of resolved/unresolved files (
issue5469)
liscju <piotr.listkiewicz@gmail.com> [Sun, 19 Feb 2017 10:56:08 +0100] rev 31021
shelve: add -n/--name option to unshelve (
issue5475)
This makes using shelve/unshelve more consistent because
shelving can be done using name option and unshelving as
well. Author of the idea of this improvement and solution is
joshgold.
Jun Wu <quark@fb.com> [Sat, 18 Feb 2017 17:23:43 -0800] rev 31020
smartset: use native set operations as fast paths
For set operations like "&" and "-", where we know both basesets have their
sets ready, and the first set is sorted, use the native Python set
operations as a fast path.
Note: "+" is not optimized as that will break the ordering.
This leads to noticeable improvements on performance:
revset | before | after | delta
----------------------------------------------------------------
draft() & draft() & draft() & draft() | 776 | 477 | -39%
draft() + draft() + draft() + draft() | 2849 | 2864 |
draft() - draft() + draft() - draft() | 943 | 240 | -75%
draft() - draft() - draft() - draft() | 557 | 197 | -64%
(time measured in microseconds)
Jun Wu <quark@fb.com> [Sat, 18 Feb 2017 16:30:07 -0800] rev 31019
smartset: add some doctests
Add doctests explaining the set / list behavior. This will make the
following changes more confident.