Augie Fackler <augie@google.com> [Mon, 08 Apr 2019 10:56:55 -0400] rev 42094
remotefilelog: add tests of `hg grep -r 'wdir()'`
This demonstrates how remotefilelog breaks grepping dirtied working
directories. A future change will introduce a fix.
Differential Revision: https://phab.mercurial-scm.org/D6216
Martin von Zweigbergk <martinvonz@google.com> [Wed, 03 Apr 2019 16:03:41 -0700] rev 42093
config: read configs from directories in lexicographical order
Mercurial currently reads the .rc files specified in HGRCPATH (and the
system-default paths) in directory order, which is unspecified. My
team at work maintains a set of .rc files. So far there has been no
overlap between them, so we had not noticed this behavior. However, we
would now like to release some common .rc files and then have another
one per plaform with platform-specific overrides. It would be nice if
we can determine the load order by choosing names carefully. This
patch enables that by loading the .rc files in lexicographical order.
Before this patch, the added test case would consistently say "30" on
my file system (whatever I have -- some Linux FS).
Differential Revision: https://phab.mercurial-scm.org/D6193
Martin von Zweigbergk <martinvonz@google.com> [Wed, 03 Apr 2019 17:41:58 -0700] rev 42092
remotefilelog: fix crash on `hg addremove` of added-but-deleted file
If you `hg add` a file and then delete it from disk, and then run `hg
addremove`, the file ends up in the "removed" set that gets passed to
the findrenames() override. We then crash because the file is not in
the working copy parent. This patch fixes that.
Differential Revision: https://phab.mercurial-scm.org/D6194
Matt Harbison <matt_harbison@yahoo.com> [Fri, 05 Apr 2019 23:07:11 -0400] rev 42091
packaging: ensure that --python is an absolute path when building on Windows
For whatever reason, even though only python2 is on PATH, passing `python.exe`
causes the later check that it's not py3 to bail out.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 05 Apr 2019 22:47:45 -0400] rev 42090
packaging: don't crash building wix with python3.6 and earlier
`capture_output` was added in 3.7. I was tempted to just check and abort in
build.py, since Windows doesn't have the Linux problem where some distros only
ship an older python. But this is in a library that could be used elsewhere in
the future.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 03 Apr 2019 23:55:03 -0400] rev 42089
chistedit: add basic colours to diff view
This isn't complete, and it would be nice to show the exact same
colours that `hg diff` would show. That goal is too lofty, so this
just shows some basic colours, on the premise that a little is better
than nothing.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 05 Apr 2019 14:54:45 -0400] rev 42088
chistedit: use default curses colours
Terminals will define default colours (for example, white text on
black background), but curses doesn't obey those default colours
unless told to do so.
Calling `curses.use_default_colors` makes curses obey the default
terminal colours. One of the most obvious effects is that this allows
transparency on terminals that support it.
This also brings chistedit closer in appearance to crecord, which also
uses default colours.
The call may error out if the terminal doesn't support colors, but as
far as I can tell, everything still works. If we need a more careful
handling of lack of colours, blame me for not doing it now.
Denis Laxalde <denis@laxalde.org> [Sun, 07 Apr 2019 16:53:47 +0200] rev 42087
match: let regex match function return a boolean
Match function for regex pattern kind is built through
_buildregexmatch() and _buildmatch() using _rematcher() that returns a
re.match function, which either returns a match object or None. This
does not conform to Mercurial's matcher interface for __call__() or
exact(), which are expected to return a boolean value. We fix this by
building a lambda around _rematcher() in _buildregexmatch().
Accordingly, we update doctest examples to remove bool() calls that are
now useless.
Denis Laxalde <denis@laxalde.org> [Sun, 07 Apr 2019 17:16:58 +0200] rev 42086
match: make arguments of _expandsets() optional
Arguments 'ctx', 'listsubrepos' and 'badfn' are optional in function
body.
Denis Laxalde <denis@laxalde.org> [Sun, 07 Apr 2019 17:14:29 +0200] rev 42085
match: make _donormalize's auditor and warn arguments optional
Argument 'warn' is actually non-required, since there's a 'if warn:'
check before usage. Argument 'auditor' is passed to
pathutil.canonpath(), in which it is optional.
Denis Laxalde <denis@laxalde.org> [Mon, 08 Apr 2019 09:34:50 +0200] rev 42084
match: add doctest examples in match()
Make the docstring raw, as it now includes escape characters.
Denis Laxalde <denis@laxalde.org> [Sat, 06 Apr 2019 18:20:49 +0200] rev 42083
match: complete documentation of match() parameters
Denis Laxalde <denis@laxalde.org> [Sat, 06 Apr 2019 17:54:13 +0200] rev 42082
match: add doctest examples for patkind()
Denis Laxalde <denis@laxalde.org> [Sat, 06 Apr 2019 15:21:55 +0200] rev 42081
match: add a docstring with doctest examples to patternmatcher
Doctest examples aim at illustrating how __call__() and exact() are
different, depending on the pattern kind.
Denis Laxalde <denis@laxalde.org> [Sun, 07 Apr 2019 12:21:23 +0200] rev 42080
match: add doctest examples for exactmatcher
Make the docstring raw, since it now includes escape characters.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 05 Apr 2019 11:24:00 -0700] rev 42079
localrepo: don't allow lookup of working directory revision
It seems that repo.lookup(), which is what supports the "lookup" wire
protocol command, should not allow the working copy revision
input.
This fixes both the pull test and the convert test I just added.
Differential Revision: https://phab.mercurial-scm.org/D6215
Martin von Zweigbergk <martinvonz@google.com> [Fri, 05 Apr 2019 11:22:26 -0700] rev 42078
tests: demonstrate broken pull of "
ffffffffffff" revision
Differential Revision: https://phab.mercurial-scm.org/D6214
Martin von Zweigbergk <martinvonz@google.com> [Fri, 05 Apr 2019 11:12:08 -0700] rev 42077
tests: demonstrate broken `hg convert` if "
ffffffffffff" is in description
Differential Revision: https://phab.mercurial-scm.org/D6213
Martin von Zweigbergk <martinvonz@google.com> [Fri, 05 Apr 2019 11:08:17 -0700] rev 42076
tests: add test of for hash reference translation by `hg convert`
The convert extension translates commit references in the commit
message. We didn't have any explicit testing of this before, so let's
add a test.
Differential Revision: https://phab.mercurial-scm.org/D6212
Matt Harbison <matt_harbison@yahoo.com> [Fri, 05 Apr 2019 18:36:43 -0400] rev 42075
py3: write out hgextindex as bytes in setup.py
I hit this trying to build the py2exe target using python3, just to see what
would happen. After commenting out `py2exe.Distribution` in setup.py and
pointing to a local copy of py2exe that supports python3[1], it complained that
`out` was bytes, not str.
[1] https://github.com/albertosottile/py2exe/releases/tag/v0.9.3.0
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 04 Apr 2019 15:40:48 +0200] rev 42074
setup: fix a possible NameError on rust build
File "setup.py", line 975, in rustbuild
"command: %r, environment: %r" % (self.rustsrcdir, cmd, env))
NameError: global name 'cmd' is not defined
Arun Chandrasekaran <aruncxy@gmail.com> [Mon, 01 Apr 2019 22:11:54 -0700] rev 42073
crecord: new keys g & G to navigate to the top and bottom respectively
This patch introduces two new keys 'g' and 'G' that helps to navigate to the
top and bottom of the file/hunk/line respectively. This is inline with the shortcuts
used in man, less, more and such tools that makes it convenient to navigate
swiftly.
'g' or HOME navigates to the top most file in the ncurses window.
'G' or END navigates to the bottom most file/hunk/line depending on the whether
the fold is active or not.
If the bottom most file is folded, it navigates to that file and stops there.
If the bottom most file is unfolded, it navigates to the bottom most hunk in
that file and stops there. If the bottom most hunk is unfolded, it navigates to
the bottom most line in that hunk.
Differential Revision: https://phab.mercurial-scm.org/D6178
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 04 Apr 2019 10:41:55 -0400] rev 42072
chistedit: properly show verbose diffs
I'm not sure if that ever worked and it's an internal API breakage,
but `"verbose": True` is not correctly parsed, as most of these
options are parsed by diffopts, whereas verbose is a global option.
Setting the UI to verbose instead does work and does show a verbose
patch, with full commit message.
It also shows all files, which unfortunately are a bit hard to read on
a single line in the default verbose template. Thus, we also change
the default template to use the status template, which shows one file
per line as well as its modification state.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 04 Apr 2019 11:35:18 +0200] rev 42071
interactive: do not prompt about files given in command line
For commit and revert commands with --interactive and explicit files
given in the command line, we now skip the invite to "examine changes to
<file> ? [Ynesfdaq?]". The reason for this is that, if <file> is
specified by the user, asking for confirmation is redundant.
In patch.filterpatch(), we now use an optional "match" argument to
conditionally call the prompt() function when entering a new "header"
item. We use .exact() method to compare with files from the "header" in
order to only consider (rel)path patterns.
Add tests with glob patterns for commit and revert, to make sure we
still ask to examine files in these cases.