Jun Wu <quark@fb.com> [Fri, 05 May 2017 16:48:58 -0700] rev 32189
diff: draw a table about binary diff behaviors
The table should make it easier to reason about future changes.
Jun Wu <quark@fb.com> [Wed, 03 May 2017 22:20:44 -0700] rev 32188
diff: use fctx.size() to test empty
fctx.size() could have a fast path that does not require loading content.
Jun Wu <quark@fb.com> [Wed, 03 May 2017 22:16:54 -0700] rev 32187
diff: use fctx.isbinary() to test binary
The end goal is to avoid calling fctx.data() when unnecessary. For example,
if diff.nobinary=1 and files are binary, the expected behavior is to print
"Binary file has changed". That could avoid reading fctx.data() sometimes.
This is mainly to enable an external LFS extension to skip expensive binary
file loading sometimes (read: most of the time with diff.nobinary=1 and
diff.text=0), without any behavior changes to mercurial (i.e. whether a file
is LFS or not does not change any behavior, LFS could be 100% transparent to
users).
Yuya Nishihara <yuya@tcha.org> [Thu, 20 Apr 2017 22:16:12 +0900] rev 32186
pycompat: extract helper to raise exception with traceback
It uses "raise excobj, None, tb" form which I think is simpler and more
useful than "raise exctype, args, tb".
Yuya Nishihara <yuya@tcha.org> [Thu, 04 May 2017 15:23:51 +0900] rev 32185
largefiles: make sure debugstate command is populated before wrapping
Copied the hack from
869d660b8669, which seemed the simplest workaround.
Perhaps debugcommands.py should have its own commands table.
Yuya Nishihara <yuya@tcha.org> [Mon, 01 May 2017 17:23:48 +0900] rev 32184
check-code: ignore re-exports of os.environ in encoding.py
These are valid uses of os.environ.
Yuya Nishihara <yuya@tcha.org> [Wed, 26 Apr 2017 21:51:19 +0900] rev 32183
check-code: exclude demandimport.py and policy.py from Python 3 checks
These modules can't depend on pycompat.py, which means we have to write Py3
hacks in them.
Yuya Nishihara <yuya@tcha.org> [Mon, 01 May 2017 17:10:22 +0900] rev 32182
check-code: rewrite py3 exclusion pattern with negative lookahead
I want to add more patterns, but negative lookbehind requires patterns of
the same length so not useful.
Yuya Nishihara <yuya@tcha.org> [Wed, 03 May 2017 11:16:55 +0900] rev 32181
cleanup: remove useless re-raises of KeyboardInterrupt
KeyboardInterrupt is no longer a subclass of Exception since Python 2.5.
https://docs.python.org/2/whatsnew/2.5.html#pep-352-exceptions-as-new-style-classes
Yuya Nishihara <yuya@tcha.org> [Fri, 12 Aug 2016 11:36:42 +0900] rev 32180
make: drop deprecated rule to process temporary copy of pure modules
Pure modules never be copied to mercurial/ since
511a4384b033.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 06 May 2017 02:33:00 +0900] rev 32179
help: describe about choice of :prompt as a fallback merge tool explicitly
"merge-tools" help topic has described that the merge of the file
fails if no tool is found to merge binary or symlink, since
c77f6276c9e7 (or Mercurial 1.7), which based on (already removed)
MergeProgram wiki page.
But even at that revision, and of course now, merge of the file
doesn't fail automatically for binary/symlink. ":prompt" (or
equivalent logic) is used, if there is no appropriate tool
configuration for binary/symlink.
Steve Borho <steve@borho.org> [Sat, 06 May 2017 10:18:34 -0500] rev 32178
wix: only one KeyPath is allowed per Component
Martin von Zweigbergk <martinvonz@google.com> [Fri, 05 May 2017 08:49:46 -0700] rev 32177
dirstate: optimize walk() by using match.visitdir()
We already have the logic for restricting directory walks in
match.visitdir() that we use for treemanifests. We should take
advantage of it when walking the working copy as well.
This speeds up "hg st -I rootfilesin:." on the Firefox repo from
0.587s to 0.305s on warm disk (and much more on cold disk). More time
is spent reading the dirstate than walking the working copy after.
I tried to find scenarios where calling match.visitdir() would be a
noticeable overhead, but I couldn't find any. I encourage the reader
to try for themselves, since this is performance-critical code.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 05 May 2017 08:49:07 -0700] rev 32176
match: optimize visitdir() for patterns matching only root directory
Because _rootsanddirs() returns a list of directories to visit
recursively and a list of directories to visit non-recursively. For
patterns such as 'rootfilesin:foo/bar', we clearly need to visit the
directory foo/bar, but we also need to visit its parents. The method
therefore uses util.dirs() to find the parent directories of
'foo/bar'. That method does not include the root directory, but since
we obviously need to visit the root directory, we always added '.' to
the set of directories to visit non-recursively.
The visitdir() method had special handling to consider set(['.']) to
mean that no includes had been specified and would thus visit all
directories. However, when the pattern is 'rootfilesin:.', set(['.'])
is actually the real set of directories to visit and the special
handling of that set meant that all directories got visited instead of
just the root directory.
The fix is simple: add '.' to the set of parent directories in
_rootsanddirs() and stop treating set(['.']) specially. This makes
hg files -r . -I rootfilesin:.
in a treemanifest version of the Firefox repo go from 1.5s to 0.26s on
warm disk (and a *much* bigger improvement on cold disk).
Note that the -I is necessary for no good reason. We just haven't
optimized visitdir() for regular (non-include, non-exclude) patterns
yet.
Martin von Zweigbergk <martinvonz@google.com> [Sat, 11 Mar 2017 12:25:56 -0800] rev 32175
rebase: don't update state dict same way for each root
The update statement does not depend on anything in the loop, so just
move it before the loop and do it once. There are no cases where
update would happen 0 times before (and 1 now); the function returns
early in all such cases.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 04 May 2017 21:11:40 -0700] rev 32174
forget: access status fields by name, not index
Phil Cohen <phillco@fb.com> [Wed, 03 May 2017 18:26:57 -0700] rev 32173
demandimport: add urwid.command_map to ignore list
The useful pudb debugger can be used with Mercurial, but its import of urwid
fails when demandimport is enabled. Add urwid.command_map to the ignore list so
pudb can be used with hg without disabling all of demandimport.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 05 May 2017 10:08:36 -0700] rev 32172
outgoing: run on filtered repo
outgoing has been using an unfiltered repo since
fe67107094fd (discovery:
outgoing pass unfiltered repo to findcommonincoming (
issue3776),
2013-01-28). If I'm reading code and history correctly, it should be
safe to run _outgoing() on a filtered repo since
c5456b64eb07
(discovery: run discovery on filtered repository, 2015-01-07). By
running _outgoing() on a filtered repo, we can also remove the
workaround there for ignoring filtered revisions.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 05 May 2017 14:10:58 -0700] rev 32171
manifest: remove check for non-contexts in _dirmancache
It looks like the _dirmancache has contained only manifest contexts
since
d79c141fdf41 (manifest: remove usages of manifest.read,
2016-11-10).
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 May 2017 12:48:45 +0200] rev 32170
bundle: factor the 'getchangegroup' out
The call in the two branches is identical, so we can just issue it outside of
the conditional.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 May 2017 12:47:27 +0200] rev 32169
bundle: avoid reset of the 'outgoing' variable
We have a cleaner way to achieve the same effect. Not resetting the variable
will help us to simplify the code.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 May 2017 12:43:41 +0200] rev 32168
changegroup: deprecate 'getlocalchangroup' (API)
We have 'getchangegroup' with a shorter name for the exactly same feature. Now
that all users are gone we can formally deprecate it.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 May 2017 12:41:50 +0200] rev 32167
tests: directly 'getchangegroup'
It is identical to 'getlocalchangegroup' with a shorter name.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 May 2017 12:41:36 +0200] rev 32166
exchange: directly 'getchangegroup'
It is identical to 'getlocalchangegroup' with a shorter name.