Mads Kiilerich <madski@unity3d.com> [Thu, 11 May 2017 17:18:40 +0200] rev 32205
graft: fix graft across merges of duplicates of grafted changes
Graft used findmissingrevs to find the candidates for graft duplicates in the
destination. That function operates with the constraint:
1. N is an ancestor of some node in 'heads'
2. N is not an ancestor of any node in 'common'
For our purpose, we do however have to work correctly in cases where the graft
set has multiple roots or where merges between graft ranges are skipped. The
only changesets we can be sure doesn't have ancestors that are grafts of any
changeset in the graftset, are the ones that are common ancestors of *all*
changesets in the graftset. We thus need:
2. N is not an ancestor of all nodes in 'common'
This change will graft more correctly, but it will also in some cases make
graft slower by making it search through a bigger and unnecessary large sets of
changes to find duplicates. In the general case of grafting individual or
linear sets, we do the same amount of work as before.
Mads Kiilerich <madski@unity3d.com> [Tue, 09 May 2017 00:11:30 +0200] rev 32204
graft: test coverage of grafts and how merges can break duplicate detection
This demonstrates unfortunate behaviour: extending the graft range cause the
graft to behave differently. When the graft range includes a merge, we fail to
detect duplicates that are ancestors of the merge.
Yuya Nishihara <yuya@tcha.org> [Wed, 26 Apr 2017 22:05:59 +0900] rev 32203
mpatch: proxy through mdiff module
See the previous commit for why.
Yuya Nishihara <yuya@tcha.org> [Wed, 26 Apr 2017 22:03:37 +0900] rev 32202
bdiff: proxy through mdiff module
See the previous commit for why.
mdiff seems a good place to host bdiff functions. bdiff.bdiff was already
aliased as textdiff, so we use it.
Yuya Nishihara <yuya@tcha.org> [Wed, 26 Apr 2017 21:56:47 +0900] rev 32201
base85: proxy through util module
I'm going to replace hgimporter with a simpler import function, so we can
access to pure/cext modules by name:
# util.py
base85 = policy.importmod('base85') # select pure.base85 or cext.base85
# cffi/base85.py
from ..pure.base85 import * # may re-export pure.base85 functions
This means we'll have to use policy.importmod() function in place of the
standard import statement, but we wouldn't want to write it every place where
C extension modules are used. So this patch makes util host base85 functions.
Yuya Nishihara <yuya@tcha.org> [Tue, 02 May 2017 17:05:22 +0900] rev 32200
mdiff: move re-exports to top
This style seems more common in our codebase.
Yuya Nishihara <yuya@tcha.org> [Tue, 02 May 2017 19:10:55 +0900] rev 32199
test-commit-interactive-curses: remove unused import of parsers
Matt Harbison <matt_harbison@yahoo.com> [Mon, 08 May 2017 23:05:01 -0400] rev 32198
churn: use the non-deprecated template option in the examples
Durham Goode <durham@fb.com> [Mon, 08 May 2017 11:35:23 -0700] rev 32197
strip: make tree stripping O(changes) instead of O(repo)
The old tree stripping logic iterated over every tree revlog in the repo looking
for commits that had revs to be stripped. That's very inefficient in large
repos. Instead, let's look at what files are touched by the strip and only
inspect those revlogs.
I don't have actual perf numbers, since internally we don't use a true
treemanifest, but simply iterating over hundreds of thousands of revlogs takes
many, many seconds, so this should help tremendously when stripping only a few
commits.
Durham Goode <durham@fb.com> [Mon, 08 May 2017 11:35:23 -0700] rev 32196
strip: move tree strip logic to it's own function
This will allow external extensions to modify tree strip behavior more
precisely.
Martin von Zweigbergk <martinvonz@google.com> [Mon, 08 May 2017 09:39:21 -0700] rev 32195
manifest: remove unused property _oldmanifest
The last use seems to have gone away in
7c7d845f8b64 (manifest: make
manifestlog use it's own cache, 2016-11-10).
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 08 May 2017 09:30:26 -0700] rev 32194
sslutil: reference fingerprints config option properly (
issue5559)
The config option is "host:fingerprints" not "host.fingerprints".
This warning message is bad and misleads users.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 05 May 2017 04:48:42 +0530] rev 32193
py3: convert key to str to make kwargs.pop work in mq
The keys are passed here and there as unicodes and our transformer make things
bytes. Due to that, mq was not poped and this results in error on Py3.
Here we abuse r'' to make that str on Python 3.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 05 May 2017 04:41:45 +0530] rev 32192
py3: convert kwargs' keys to str before passing in cmdutil.getcommiteditor
Jun Wu <quark@fb.com> [Wed, 03 May 2017 23:50:41 -0700] rev 32191
diff: add a fast path to avoid loading binary contents
When diffing binary contents, with certain configs, we can show
"Binary file <name> has changed" without actual content.
That allows a fast path where we could avoid providing actual binary
contents. Note: in that case we still need to test if two contents are the
same, that's done by using "filectx.cmp", which could have its own fast
path.
Jun Wu <quark@fb.com> [Fri, 05 May 2017 17:20:32 -0700] rev 32190
diff: correct binary testing logic
This seems to be more correct given the table drawn in the previous patch.
Namely, "losedatafn" and "opts.git" are removed, "not opts.text" is added.
- losedatafn: diff output (binary) should not be affected by "losedatafn"
- opts.git: binary testing is helpful for detecting a fast path in the
next path. the fast path can also be used if opts.git is False
- opts.text: if it's set, we should treat the content as non-binary
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