Martin von Zweigbergk <martinvonz@google.com> [Fri, 14 Jan 2022 08:44:36 -0800] rev 48565
simplemerge: delete unused exception class `CantReprocessAndShowBase`
The only user was removed in
f18830651811 (simplemerge: burn "minimal"
feature to the ground, 2014-08-05).
Differential Revision: https://phab.mercurial-scm.org/D11998
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Jan 2022 22:13:56 -0800] rev 48564
simplemerge: change _minimize() to minimize a single conflict
`_minimize()` is weird in that it changes `a_lines` and `b_lines` but
leaves `base_lines` unchanged, which means they'll be
inconsistent. That was fine because the caller never used
`base_lines`. With the recent refactorings of this code, we can now
make this function cleaner by having it minimize a single conflict and
not care about `base_lines`.
This also makes the code simpler and makes the code for each
`render_*()` function more similar.
Differential Revision: https://phab.mercurial-scm.org/D11981
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Jan 2022 22:03:55 -0800] rev 48563
simplemerge: make minimize() a free function
IMO, `Merge3Text` should be about merging text without knowing about
conflict markers. "Conflict minimization" is about making conflict
markers smaller, so it should be moved out. This patch does that. I'll
refactor it next.
Differential Revision: https://phab.mercurial-scm.org/D11980
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Jan 2022 21:56:27 -0800] rev 48562
simplemerge: simplify and rename `render_markers()`
`render_markers()` now always renders minimized 2-way markers, so
let's simplify and rename it accordingly.
Differential Revision: https://phab.mercurial-scm.org/D11979
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Jan 2022 16:23:10 -0800] rev 48561
simplemerge: split out function for rendering :merge3 conflict markers
The results in some duplicate, but the code is very straight-forward
and I think it's worth it to have each conflict marker style in a
separate function.
Differential Revision: https://phab.mercurial-scm.org/D11978
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jan 2022 23:29:19 -0800] rev 48560
simplemerge: move default labels to simplemerge extension
I want to remove knowledge of paths from the `simplemerge` core
module. As part of that, let's move the default labels from the core
module to the extension.
Differential Revision: https://phab.mercurial-scm.org/D11977
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jan 2022 22:23:44 -0800] rev 48559
simplemerge: use same newline detection for :mergediff as for :merge[3]
The `:merge` and `:merge3` markers used the newline style detected
from the base input. The `:mergediff` style always used LF as newline
character. This patch teaches `:mergediff` to use the same detection
as the others did.
Differential Revision: https://phab.mercurial-scm.org/D11976
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Jan 2022 16:54:42 -0800] rev 48558
simplemerge: clarify names of functions that render conflict markers
Differential Revision: https://phab.mercurial-scm.org/D11975
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jan 2022 22:16:22 -0800] rev 48557
simplemerge: make merge_lines() a free function
IMO, the rendering of a conflict as text with merge markers should be
separate from the code for resolving conflicts. The latter is what
`Merge3Text` is mostly about already.
Differential Revision: https://phab.mercurial-scm.org/D11974
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jan 2022 18:42:31 -0800] rev 48556
simplemerge: convert `merge_lines()` away from generator
We always consume all the lines and put them in a list anyway. By
making the function not a generator, we can later make it return an
additional value (to indicate if there were conflicts).
Differential Revision: https://phab.mercurial-scm.org/D11973
Martin von Zweigbergk <martinvonz@google.com> [Tue, 14 Dec 2021 13:12:56 -0800] rev 48555
simplemerge: use 3-way markers if mode=='merge3', ignoring number of labels
Before this patch, we use a combination of `mode` and `labels` to
decide which marker style to use. That's mostly my own fault because I
was the one who added the `mergediff` as a "mode" instead of adding a
separate argument for marker style. Still, let's make these arguments
more orthogonal by ignoring the number of labels when deciding which
marker style to use.
This refactoring makes it a little clearer in the simplemerge
*extension* that passing more than 2 `--label` arguments changes the
marker style.
Differential Revision: https://phab.mercurial-scm.org/D11972
Martin von Zweigbergk <martinvonz@google.com> [Fri, 14 Jan 2022 10:25:45 -0800] rev 48554
rust: upgrade `rand*` crates
`test-check-cargo-lock.t` is failing for me and I was hoping this
would help. It doesn't, but we might as well take the upgrade now that
I've done the (small amount of) work for it.
Differential Revision: https://phab.mercurial-scm.org/D12000
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Jan 2022 22:09:40 -0800] rev 48553
logcmdutil: raise `StateError` when file to follow doesn't exist
Differential Revision: https://phab.mercurial-scm.org/D11969
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Jan 2022 22:03:21 -0800] rev 48552
logcmdutil: raise `InputError` on bad CLI arguments
Apparently there were no tests for any of these errors.
Differential Revision: https://phab.mercurial-scm.org/D11968
Matt Harbison <matt_harbison@yahoo.com> [Mon, 10 Jan 2022 18:04:41 -0500] rev 48551
subrepo: make -S work again on Windows for incoming/outgoing to remote repos
While it worked fine for the top level repo, the remote path for the subrepo got
mangled to something like "https://server/prefix\repo\subrepo", which I've seen
result in both a 400 and a 404, depending on the server. We need to `normpath`
at least the `subpath` because of "http://user:***@localhost:$HGPORT/main/../sub"
in `test-subrepo-relative-path.t`. Keep the `os.path` flavor for handling
filesystem based remote repos, since this string is also displayed.
This is one case where the automatic substitution of '\' for '/' and rematching
done by the test runner is unfortunate- I don't see how to write a test to catch
this.
Differential Revision: https://phab.mercurial-scm.org/D11971
Cédric Krier <ced@b2ck.com> [Sun, 09 Jan 2022 13:35:30 +0100] rev 48550
tests: support pygments 2.11 (
issue6628)
Differential Revision: https://phab.mercurial-scm.org/D11970
Joerg Sonnenberger <joerg@bec.de> [Mon, 03 Jan 2022 01:09:56 +0100] rev 48549
exchange: add fast path for subrepo check on push
Try to check if .hgsub and .hgsubstate exist at all before looking
for them in every changeset to be pushed. The latter can be quite
expensive for large repositories and the existance check is almost free.
Differential Revision: https://phab.mercurial-scm.org/D11956
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Jan 2022 11:34:54 -0800] rev 48548
simplemerge: rewrite `merge_lines()` using `merge_groups()`
Simple is better.
Differential Revision: https://phab.mercurial-scm.org/D11967
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Jan 2022 09:03:17 -0800] rev 48547
simplemerge: make merge_groups() yield only 2-tuples
`merge_groups()` currently yields 2-tuples or 4-tuples, making the
callers check the first element to decide how to interpret the
rest. Let's make it yield only 2-tuples, thereby simplifying life a
little for the callers.
Differential Revision: https://phab.mercurial-scm.org/D11966
Simon Sapin <simon.sapin@octobus.net> [Fri, 07 Jan 2022 14:40:21 +0100] rev 48546
rhg: desambiguate status without decompressing filelog if possible
When status is unsure based on `stat()` and the dirstate if a file is clean
or modified, we need to compare it against the filelog.
This comparison can skip looking at contents if the lengths differ.
This changeset optimize this further to deduce what we can about the length
if the filelog without decompressing it or resolving deltas.
Differential Revision: https://phab.mercurial-scm.org/D11965
Simon Sapin <simon.sapin@octobus.net> [Thu, 06 Jan 2022 12:46:10 +0100] rev 48545
filelog: add a comment explaining a fast path in filerevisioncopied()
Differential Revision: https://phab.mercurial-scm.org/D11964
Simon Sapin <simon.sapin@octobus.net> [Tue, 21 Dec 2021 21:26:14 +0100] rev 48544
rhg: Store p1, p2, and hash in RevlogEntry
This avoids a duplicate index lookup
Differential Revision: https://phab.mercurial-scm.org/D11963
Simon Sapin <simon.sapin@octobus.net> [Tue, 21 Dec 2021 21:23:46 +0100] rev 48543
rhg: RevlogEntry::uncompressed_len is signed
The corresponding Python code appears to explicitly check for non-negative values.
Differential Revision: https://phab.mercurial-scm.org/D11962
Simon Sapin <simon.sapin@octobus.net> [Tue, 21 Dec 2021 18:50:44 +0100] rev 48542
rhg: Expose FilelogEntry that wraps RevlogEntry
This can be later extended to access metadata such as `uncompressed_len` without
necessarily resolving deltas.
Differential Revision: https://phab.mercurial-scm.org/D11961
Simon Sapin <simon.sapin@octobus.net> [Tue, 21 Dec 2021 18:35:58 +0100] rev 48541
rhg: Add RevlogEntry::data that does delta resolution
This requires keeping a `&Revlog` reference inside the `RevlogEntry` struct.
This struct already had the appropriate lifetime parameter.
Differential Revision: https://phab.mercurial-scm.org/D11960
Simon Sapin <simon.sapin@octobus.net> [Tue, 21 Dec 2021 15:57:30 +0100] rev 48540
rhg: Rename some revlog-related types and methods
Use "data chunck" and "data" for a revlog entry’s data before and after
resolving deltas (if any), repsectively.
The former `FilelogEntry` actually only contains data, rename it to
`FilelogRevisionData` accordingly. This leaves room to later have a
`FilelogEntry` type that wraps `RevlogEntry`.
Differential Revision: https://phab.mercurial-scm.org/D11959
Augie Fackler <augie@google.com> [Wed, 05 Jan 2022 13:36:05 -0500] rev 48539
git: add opener attribute to gitstore
Differential Revision: https://phab.mercurial-scm.org/D11958
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jan 2022 09:55:28 +0100] rev 48538
branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Wed, 05 Jan 2022 17:53:57 +0100] rev 48537
Added signature for changeset
799fdf4cca80
Raphaël Gomès <rgomes@octobus.net> [Wed, 05 Jan 2022 17:53:03 +0100] rev 48536
Added tag 6.0.1 for changeset
799fdf4cca80