Raphaël Gomès <rgomes@octobus.net> [Mon, 04 Apr 2022 13:36:37 +0000] rev 49039
path: explicitly declare the `pushurl` suboption
This will help documentation and discovery.
Differential Revision: https://phab.mercurial-scm.org/D12437
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Apr 2022 15:29:02 +0200] rev 49038
setup: fix incomplete implementation of Command
`test-install.t` fails without the `get_outputs` method being implemented,
which is used when, `self.report` is `True`.
When
8d7eaff92f9c introduced this change, they probably ran `test-install.t`
without `HGTESTS_ALLOW_NETIO=1`, which does not trigger this codepath.
Differential Revision: https://phab.mercurial-scm.org/D12482
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Apr 2022 15:36:32 +0200] rev 49037
path: explicitly declare the `pushrev` suboptions
This will help documentation and discovery.
Differential Revision: https://phab.mercurial-scm.org/D12436
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Apr 2022 15:36:17 +0200] rev 49036
path: explicitly declare the `multi-urls` suboptions
This will help documentation and discovery.
Differential Revision: https://phab.mercurial-scm.org/D12435
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Apr 2022 15:35:59 +0200] rev 49035
path: explicitly declare the `bookmarks.mode` suboptions
This will help documentation and discovery.
Differential Revision: https://phab.mercurial-scm.org/D12434
Kyle Lippincott <spectral@google.com> [Mon, 04 Apr 2022 18:05:33 -0700] rev 49034
crecord: avoid duplicating lines when reverting noeol->eol change
When reversing a patch that looks like this while using crecord:
```
@@ -301,4 +302,4 @@ zza
zzb
zzc
zzd
-zze
\ No newline at end of file
+zze
```
we would previously reverse the `-zze` line to be an add, encounter the "no
newline" line and stop inspecting lines. This caused us to duplicate the line,
producing `zzezze` (still without a newline).
`break` is the correct action if we know there will be no lines afterwards, as
would be the case in an eol -> noeol transition. It is incorrect if there are
lines afterward, such as if both sides are missing the newline or if only the
lhs is missing the newline.
Differential Revision: https://phab.mercurial-scm.org/D12441
Kyle Lippincott <spectral@google.com> [Tue, 05 Apr 2022 11:09:57 -0700] rev 49033
crecord: add test demonstrating issue when reverting noeol->eol change
Differential Revision: https://phab.mercurial-scm.org/D12440
Martin von Zweigbergk <martinvonz@google.com> [Mon, 28 Mar 2022 10:43:10 -0700] rev 49032
revert: ask user to confirm before tracking new file when interactive
If interactively reverting from a commit with `hg revert -i -r`, we
would unconditionally add files from that commit that are not already
tracked in the working copy. We have prompts for adding back files
removed in the working copy, but that's specific to such files and
does not apply to adding files from another revision.
Differential Revision: https://phab.mercurial-scm.org/D12416
Martin von Zweigbergk <martinvonz@google.com> [Mon, 28 Mar 2022 10:43:06 -0700] rev 49031
revert: use a `continue` to reduce indentation
I'm about to add more code in the block I'm modifying here.
Differential Revision: https://phab.mercurial-scm.org/D12415
Martin von Zweigbergk <martinvonz@google.com> [Fri, 25 Mar 2022 08:33:03 -0700] rev 49030
stringutil: try to avoid running `splitlines()` only to get first line
It's wasteful to call `splitlines()` and only get the first line from
it. However, Python doesn't seem to provide a built-in way of doing
just one split based on the set of bytes used by `splitlines()`. As a
workaround, we do an initial split on just LF and then call
`splitlines()` on the result. Thanks to Joerg for this suggestion. I
didn't bother to also split on CR, so users with old Mac editors (or
repos created by such editors) will not get this performance
improvement.
Differential Revision: https://phab.mercurial-scm.org/D12413
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:49 -0700] rev 49029
logcmdutil: use new function for getting first line of string
Differential Revision: https://phab.mercurial-scm.org/D12412
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:36 -0700] rev 49028
filemerge: use new function for getting first line of string
Differential Revision: https://phab.mercurial-scm.org/D12411
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:27 -0700] rev 49027
absorb: use new function for getting first line of string
Differential Revision: https://phab.mercurial-scm.org/D12410
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:13 -0700] rev 49026
extensions: use new function for getting first line of string
Differential Revision: https://phab.mercurial-scm.org/D12409
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:04:38 -0700] rev 49025
bookmarks: use new function for getting first line of string
Differential Revision: https://phab.mercurial-scm.org/D12408
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 20:31:44 -0700] rev 49024
help: use new function for getting first line of string
Differential Revision: https://phab.mercurial-scm.org/D12407
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 16:55:09 -0700] rev 49023
histedit: remove an unnecessary default value of `b''` for commit message
I don't think `ctx.description()` is ever anything falsy other than
`b''`. I think the comment added in
4c4232e51167 (histedit: extract
common summary code into method, 2016-05-27) is mistaken (I don't see
any code following that pattern before the function was added).
Differential Revision: https://phab.mercurial-scm.org/D12406
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 16:51:20 -0700] rev 49022
histedit: use new function for getting first line of a string
This fixes a crash you can run into if you enter a commit message
that's just a "newline-like" byte, like a form feed byte (`hg ci -m
\x0f` in Fish). That bug is the motivation for this series.
Differential Revision: https://phab.mercurial-scm.org/D12405
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 16:09:12 -0700] rev 49021
templates: extract function to `stringutil` for getting first line of text
It's surprisingly hard to get the first line from a string, so let's
have our own function in `stringutil` for it.
Differential Revision: https://phab.mercurial-scm.org/D12404
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 15:41:29 -0700] rev 49020
templates: make `firstline` filter not keep '\v', '\f' and similar
In
b288b4bb8448 (hide some functions behind lambdas, so demandload is
useful., 2006-02-28), `x.splitlines(1)[0]` was replaced by
`x.splitlines(1)[0].rstrip('\r\n')`, i.e. stripping trailing '\r' and
'\n'. Combined with the "truthy" `1` passed to `splitlines()` to get
it to keep line endings, that results in e.g. trailing '\v' (Line
Tabulation) and '\f' (Form Feed) being preserved. I can't see why one
would want that, and I doubt that was the intention; I suspect the
author just didn't think to instead remove the `1` argument. Perhaps
they thought the 1 being passed there - added by themselves in
a7e416bf3c1d (improve templating., 2006-02-27) - was to limit the
number of splits to 1 (i.e. thinking about it as `maxsplit=1` rather
than `keepends=1`).
Differential Revision: https://phab.mercurial-scm.org/D12403
Matt Harbison <matt_harbison@yahoo.com> [Tue, 22 Mar 2022 11:22:09 -0400] rev 49019
pytype: drop py3.6 support
Pytype 2022.01.07 only supports 3.7+.
Differential Revision: https://phab.mercurial-scm.org/D12400
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 13 Mar 2022 16:14:34 +0100] rev 49018
perf-util: add a `compare-discovery-case` script
This script run the same discovery case using multiple variants of the algorithm
and report differences in behavior, especially regarding the numbers of roundtrip.
Differential Revision: https://phab.mercurial-scm.org/D12399
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 14 Mar 2022 05:59:20 +0100] rev 49017
discovery: also audit the number of queries done
In addition to the number of roundtrip, we now also track the number of queries
we perform, this is useful to assert the tradeoff between number of roundtrip and
the number of queries.
Differential Revision: https://phab.mercurial-scm.org/D12398
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 13 Mar 2022 16:10:53 +0100] rev 49016
search-discovery-case: display more information about the interresting case
We display information about the total number of revs and the common/missing
numbers. This is useful to spot the interresting case.
Differential Revision: https://phab.mercurial-scm.org/D12397