Yuya Nishihara <yuya@tcha.org> [Wed, 14 Feb 2018 21:29:27 +0900] rev 36201
py3: stringify IOError/OSError without loosing local character
Follows up
fa4d333cac58. An environment error may contain non-ascii characters
on Windows, which should be encoded to a platform-native string.
Yuya Nishihara <yuya@tcha.org> [Fri, 26 Jan 2018 19:48:39 +0900] rev 36200
dirstate: drop explicit files that shouldn't match (BC) (
issue4679)
Before, wctx.walk() could include files excluded by -X pattern, which
disagrees with wctx.matches() and ctx.walk()/matches() behavior. This patch
fixes the problem by testing stat results against the matcher if the matcher
may contain false paths.
I have no idea if the fix should be made before the workaround for case-
insensitive filesystems, but that shouldn't matter since match.anypats()
means 'not match.isexact()'.
This patch also makes narrow and sparse extensions to not exclude explicit
paths on walk() because they appear to depend on the buggy behavior.
More detailed analysis about this issue by Martin von Zweigbergk:
"I think it's just an unintended consequence of how the dirstate walk works,
but I'm not sure. The exception for explicit files also bothered me when I
was working on the matcher code a year or so ago. I actually added the
exception to the matcher code because I thought it was always working like
that (not just for dirstate) in
a83a7d27911e (match: handle excludes using
new differencematcher, 2017-05-16). It was only recently that Yuya realized
that it used to be inconsistent and that I probably made it consistently bad
because I didn't realize it was inconsistent to start with, see
821d8a5ab4ff
(match: do not weirdly include explicit files excluded by -X option,
2018-01-16)."
.. bc::
Working-directory commands now respect ``-X PATTERN`` no matter if PATTERN
matches explicitly-specified FILEs. For example, ``hg add foo -X foo`` no
longer add the file ``foo``.
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jan 2018 17:04:42 +0900] rev 36199
log: add TODO comments about --line-range processing
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jan 2018 16:15:20 +0900] rev 36198
log: factor out function to feed revisions to displayer
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jan 2018 16:04:59 +0900] rev 36197
graphlog: unblock --line-range option
It should work now.
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jan 2018 16:03:14 +0900] rev 36196
graphlog: deduplicate preprocessing of log command
Anton Shestakov <av6@dwimlabs.net> [Wed, 14 Feb 2018 20:32:32 +0800] rev 36195
hgweb: show users recorded in obsolescence markers
It's useful to see who obsoleted a commit, because it's not always done by its
author (hg-committed is a good example, because people rebase stacks of commits
made by various people).
Usernames are obfuscated, but look correct (e.g. "test" is
"test").
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 14 Feb 2018 14:12:05 +0100] rev 36194
revert: use an exact matcher in interactive diff selection (
issue5789)
When going through _performrevert() in the interactive case, we build a
matcher with files to revert and pass it patch.diff() for later
selection of diff hunks to revert. The files set used to build the
matcher comes from dirstate and accounts for patterns explicitly passed
to revert ('hg revert -i <file>') and, in case of nonexistent pattern,
this set is empty (which is expected). Unfortunately, the matcher built
from scmutil.match(ctx, []) is wrong as it leads patch.diff() to rebuild
a 'changes' tuple with dirstate information, ignoring user-specified
pattern. This leads to the situation described in
issue5789, where
one gets prompted about reverting files unrelated to specified patterns
because they made a typo or so.
We fix this by building an exact matcher with the correct set of file
paths (built earlier). Thanks to Yuya Nishihara for suggesting the
correct fix.
Denis Laxalde <denis@laxalde.org> [Sun, 11 Feb 2018 20:37:44 +0100] rev 36193
tests: add a test demonstrate that 'revert -i' ignores nonexistent patterns
As described in
issue5789, when revert is called through:
hg revert -i <some file that does not exist>
we'd expect the command to abort early. Currently, it just warns about
missing file but prompt about files unrelated to user arguments.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 17:44:54 +0530] rev 36192
py3: slice over bytes to prevent getting ascii values
Differential Revision: https://phab.mercurial-scm.org/D2271
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 17:44:19 +0530] rev 36191
py3: converts bytes to pycompat.bytestr to get bytechrs while enumerating
Differential Revision: https://phab.mercurial-scm.org/D2270
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 17:42:14 +0530] rev 36190
py3: use pycompat.{bytes|str}kwargs in transplant.py
Differential Revision: https://phab.mercurial-scm.org/D2268
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 17:41:27 +0530] rev 36189
py3: replace file() with open() in transplant.py
Differential Revision: https://phab.mercurial-scm.org/D2267
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 17:40:51 +0530] rev 36188
py3: use "%d" for converting int to bytes in transplant.py
Differential Revision: https://phab.mercurial-scm.org/D2266
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 17:39:56 +0530] rev 36187
py3: open files in bytes mode in transplant.py
Differential Revision: https://phab.mercurial-scm.org/D2265
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 17:06:20 +0530] rev 36186
py3: use pycompat.bytestr instead of str
Differential Revision: https://phab.mercurial-scm.org/D2264
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 17:05:33 +0530] rev 36185
py3: use "%d" to convert integers to bytes
Differential Revision: https://phab.mercurial-scm.org/D2263
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 16:38:15 +0530] rev 36184
py3: add couple of missing b'' in fakemergerecord.py
# skip-blame as we are just adding b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D2262
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 16:06:54 +0530] rev 36183
py3: add b'' to make sure regex pattern are bytes in hgweb/webutil.py
# skip-blame because we are just adding b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D2260
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 15:58:11 +0530] rev 36182
py3: add b'' prefixes in test-worker.t
# skip-blame because we are just adding b''
Differential Revision: https://phab.mercurial-scm.org/D2258
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 15:46:57 +0530] rev 36181
py3: add b'' prefixes to make printrevset.py work in test-glog.t
# skip-blame because we are just adding b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D2257
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 15:43:03 +0530] rev 36180
py3: slice over bytes to prevent getting ascii values
Differential Revision: https://phab.mercurial-scm.org/D2256
Augie Fackler <augie@google.com> [Wed, 14 Feb 2018 00:18:35 -0500] rev 36179
python3: whitelist another 5 passing tests
Differential Revision: https://phab.mercurial-scm.org/D2252
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 23:00:01 -0700] rev 36178
py3: introduce and use pycompat.getargspec
This is getfullargspec on py3, which means we can't use namedtuple
named accessors for all fields (eg keywords from getargspec is varkw
from getfullargspec, with the same meaning). Solves some warning
issues on Python 3.
I didn't clean up httpclient because that's vendored code I think we
should probably discard, and I didn't touch the manpage generator for
now either.
Differential Revision: https://phab.mercurial-scm.org/D2251
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 23:37:58 -0500] rev 36177
merge: coerce nodes to bytes, not str
Differential Revision: https://phab.mercurial-scm.org/D2250
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 19:12:44 -0500] rev 36176
py3: whitelist more passing tests
I had some good success tonight with histedit
tests. test-histedit-fold.t is now low-hanging fruit: it is only
failing because the logic for setting environment variables in hook.py
is slightly busted. Specifically, hook.py line 142 should be making
sure it puts strings in the env dict, not bytes, to avoid b'' goo in
environment variables.
Differential Revision: https://phab.mercurial-scm.org/D2249
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 18:46:47 -0500] rev 36175
histedit: binascii.unhexlify (aka node.bin) throws new exception type on py3
Lucky for us, the exception type exists on 2.7, so we can include it
in the except block without any extra work.
Differential Revision: https://phab.mercurial-scm.org/D2244
Martin von Zweigbergk <martinvonz@google.com> [Tue, 13 Feb 2018 13:23:18 -0800] rev 36174
treemanifest: add an optimized __nonzero__()
We use bool(manifest) in at least some places:
localrepo.py:1730
hgweb/webcommands.py:524
Since the treemanifest class doesn't define __nonzero__() (before this
patch), bool(manifest) will instead call __len__(), which can be slow
for treemanifests. This patch may make a noticeable difference in the
localrepo case above, but that only happens when committing a merge
and I haven't timed it.
Note that Durham already added a __nonzero__ implementation to
manifestdict in
b19291e5d506 (manifest: add __nonzero__ method,
2016-11-03).
Differential Revision: https://phab.mercurial-scm.org/D2232
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 18:49:06 -0500] rev 36173
tests: port fakemergerecord to python3
Differential Revision: https://phab.mercurial-scm.org/D2248
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 18:48:47 -0500] rev 36172
tests: add some b-prefixes on local script in test-histedit-arguments
# skip-blame its just more b prefixes and a file in binary mode
Differential Revision: https://phab.mercurial-scm.org/D2247