Thu, 20 Jan 2022 13:43:43 -0800 filemerge: set default labels a little earlier
Martin von Zweigbergk <martinvonz@google.com> [Thu, 20 Jan 2022 13:43:43 -0800] rev 48605
filemerge: set default labels a little earlier By setting the default labels a little earlier, we can rely on them always being set, as far as I can tell. It may actually even be fine to rely on that even if we don't set them earlier, but it makes more sense to me to do it. Differential Revision: https://phab.mercurial-scm.org/D12015
Thu, 20 Jan 2022 11:17:09 -0800 filemerge: remove unused arguments from `_merge()`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 20 Jan 2022 11:17:09 -0800] rev 48604
filemerge: remove unused arguments from `_merge()` Differential Revision: https://phab.mercurial-scm.org/D12014
Thu, 20 Jan 2022 11:00:30 -0800 simplemerge: take arguments as annotated context objects
Martin von Zweigbergk <martinvonz@google.com> [Thu, 20 Jan 2022 11:00:30 -0800] rev 48603
simplemerge: take arguments as annotated context objects The labels we put in conflict markers are formatted so the part before the ':' (typically says things like "local") is padded so the ':' is aligned among the labels. That means that if you specify a long label for "base" but the conflict marker style is "merge" (i.e. 2-way), the other two will have unwanted padding. We often don't specify a label for the base, so we don't notice the problem (and it may very well be that it didn't exist before my D11972). I think the best fix is to pass the labels along with the context objects, so the low-level code that switches on the marker style to use (i.e. `simplemerge`) can do the formatting. This patch starts doing that by passing a fully-formatted label to `simplemerge`. A coming patch will move the formatting to `simplemerge`. Differential Revision: https://phab.mercurial-scm.org/D12013
Thu, 20 Jan 2022 09:04:39 -0800 filemerge: make `labels` a required arg for `_premerge()`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 20 Jan 2022 09:04:39 -0800] rev 48602
filemerge: make `labels` a required arg for `_premerge()` We always pass labels, and it's always a non-empty list, so we can simplify a bit. Differential Revision: https://phab.mercurial-scm.org/D12012
Thu, 20 Jan 2022 14:46:16 -0800 filemerge: remove unnecessary check for empty string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 20 Jan 2022 14:46:16 -0800] rev 48601
filemerge: remove unnecessary check for empty string Looking at the statement just before, the string is clearly never empty (or otherwise falsy). Differential Revision: https://phab.mercurial-scm.org/D12011
Thu, 20 Jan 2022 23:07:35 -0800 tests: also test spaces in conflict marker labels
Martin von Zweigbergk <martinvonz@google.com> [Thu, 20 Jan 2022 23:07:35 -0800] rev 48600
tests: also test spaces in conflict marker labels Our fake merge tool printed the arguments using `$1` etc. without quotes, which means that the shell collapsed repeated spaces within the argument. That resulted in tests that did not pick up changes to the number of spaces. Differential Revision: https://phab.mercurial-scm.org/D12010
Mon, 17 Jan 2022 21:20:46 -0500 blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 17 Jan 2022 21:20:46 -0500] rev 48599
blackbox: change year in logs to ISO 8601 format AFAIK, year/month/day is not a format than anyone uses. It seems more sensible to me to use ISO 8601, as that's standard and unambiguously year-month-day. Compatibility-wise, I think it's acceptable to change the default format. It's most for human consumption. It's plausible that a few tools parse this format, but it has already changed in the past (for instance to add the current revision). Differential Revision: https://phab.mercurial-scm.org/D12006
Mon, 17 Jan 2022 21:00:33 -0500 blackbox: add milliseconds to blackbox logs by default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 17 Jan 2022 21:00:33 -0500] rev 48598
blackbox: add milliseconds to blackbox logs by default The current second granularity is often not specific enough to determine whether an hg command is happening before or after some other event. Given that starting a process takes on the order of 1ms (well, for native processes. It's quite a bit more for python processes), microseconds seems like unnecessary noise. This also lines up behavior with the rust version, where we already switched to millisecond precision. Differential Revision: https://phab.mercurial-scm.org/D12005
Mon, 17 Jan 2022 20:47:46 -0500 blackbox: correct date format doc
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 17 Jan 2022 20:47:46 -0500] rev 48597
blackbox: correct date format doc Differential Revision: https://phab.mercurial-scm.org/D12004
Tue, 18 Jan 2022 10:27:13 +0100 branching: merge with stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 18 Jan 2022 10:27:13 +0100] rev 48596
branching: merge with stable
Mon, 17 Jan 2022 12:50:13 +0100 rust: Fix outdated comments in OwningDirstateMap
Simon Sapin <simon.sapin@octobus.net> [Mon, 17 Jan 2022 12:50:13 +0100] rev 48595
rust: Fix outdated comments in OwningDirstateMap OwningDirstateMap used to own a PyBytes, but was generalized to be more generic when it was moved from hg-cpython to hg-core. This fixes some comments that were still referencing PyBytes. Differential Revision: https://phab.mercurial-scm.org/D12003
Fri, 14 Jan 2022 09:28:44 -0800 merge: consider the file merged when using :merge-{local,other}
Martin von Zweigbergk <martinvonz@google.com> [Fri, 14 Jan 2022 09:28:44 -0800] rev 48594
merge: consider the file merged when using :merge-{local,other} Returning `None` from `simplemerge()` means that the caller interprets it as "no merge was necessary (because two sides matched)". See 6217040b2780 and issue2680 for some background. However, `simplemerge()` shouldn't even get called in such scenarios, and returning `None` means that the file is not considered merged, even though the contents actually were. See the affected test cases. Differential Revision: https://phab.mercurial-scm.org/D11999
Fri, 14 Jan 2022 08:44:36 -0800 simplemerge: delete unused exception class `CantReprocessAndShowBase`
Martin von Zweigbergk <martinvonz@google.com> [Fri, 14 Jan 2022 08:44:36 -0800] rev 48593
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
Tue, 11 Jan 2022 22:13:56 -0800 simplemerge: change _minimize() to minimize a single conflict
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Jan 2022 22:13:56 -0800] rev 48592
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
Tue, 11 Jan 2022 22:03:55 -0800 simplemerge: make minimize() a free function
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Jan 2022 22:03:55 -0800] rev 48591
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
Tue, 11 Jan 2022 21:56:27 -0800 simplemerge: simplify and rename `render_markers()`
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Jan 2022 21:56:27 -0800] rev 48590
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
Tue, 11 Jan 2022 16:23:10 -0800 simplemerge: split out function for rendering :merge3 conflict markers
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Jan 2022 16:23:10 -0800] rev 48589
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
Fri, 07 Jan 2022 23:29:19 -0800 simplemerge: move default labels to simplemerge extension
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jan 2022 23:29:19 -0800] rev 48588
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
Fri, 07 Jan 2022 22:23:44 -0800 simplemerge: use same newline detection for :mergediff as for :merge[3]
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jan 2022 22:23:44 -0800] rev 48587
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
Tue, 11 Jan 2022 16:54:42 -0800 simplemerge: clarify names of functions that render conflict markers
Martin von Zweigbergk <martinvonz@google.com> [Tue, 11 Jan 2022 16:54:42 -0800] rev 48586
simplemerge: clarify names of functions that render conflict markers Differential Revision: https://phab.mercurial-scm.org/D11975
Fri, 07 Jan 2022 22:16:22 -0800 simplemerge: make merge_lines() a free function
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jan 2022 22:16:22 -0800] rev 48585
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
Fri, 07 Jan 2022 18:42:31 -0800 simplemerge: convert `merge_lines()` away from generator
Martin von Zweigbergk <martinvonz@google.com> [Fri, 07 Jan 2022 18:42:31 -0800] rev 48584
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
Tue, 14 Dec 2021 13:12:56 -0800 simplemerge: use 3-way markers if mode=='merge3', ignoring number of labels
Martin von Zweigbergk <martinvonz@google.com> [Tue, 14 Dec 2021 13:12:56 -0800] rev 48583
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
Fri, 14 Jan 2022 10:25:45 -0800 rust: upgrade `rand*` crates
Martin von Zweigbergk <martinvonz@google.com> [Fri, 14 Jan 2022 10:25:45 -0800] rev 48582
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
Thu, 06 Jan 2022 22:09:40 -0800 logcmdutil: raise `StateError` when file to follow doesn't exist
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Jan 2022 22:09:40 -0800] rev 48581
logcmdutil: raise `StateError` when file to follow doesn't exist Differential Revision: https://phab.mercurial-scm.org/D11969
Thu, 06 Jan 2022 22:03:21 -0800 logcmdutil: raise `InputError` on bad CLI arguments
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Jan 2022 22:03:21 -0800] rev 48580
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
Sun, 09 Jan 2022 13:35:30 +0100 tests: support pygments 2.11 (issue6628)
Cédric Krier <ced@b2ck.com> [Sun, 09 Jan 2022 13:35:30 +0100] rev 48579
tests: support pygments 2.11 (issue6628) Differential Revision: https://phab.mercurial-scm.org/D11970
Mon, 03 Jan 2022 01:09:56 +0100 exchange: add fast path for subrepo check on push
Joerg Sonnenberger <joerg@bec.de> [Mon, 03 Jan 2022 01:09:56 +0100] rev 48578
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
Wed, 05 Jan 2022 11:34:54 -0800 simplemerge: rewrite `merge_lines()` using `merge_groups()`
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Jan 2022 11:34:54 -0800] rev 48577
simplemerge: rewrite `merge_lines()` using `merge_groups()` Simple is better. Differential Revision: https://phab.mercurial-scm.org/D11967
Thu, 06 Jan 2022 09:03:17 -0800 simplemerge: make merge_groups() yield only 2-tuples
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Jan 2022 09:03:17 -0800] rev 48576
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
Fri, 07 Jan 2022 14:40:21 +0100 rhg: desambiguate status without decompressing filelog if possible
Simon Sapin <simon.sapin@octobus.net> [Fri, 07 Jan 2022 14:40:21 +0100] rev 48575
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
Thu, 06 Jan 2022 12:46:10 +0100 filelog: add a comment explaining a fast path in filerevisioncopied()
Simon Sapin <simon.sapin@octobus.net> [Thu, 06 Jan 2022 12:46:10 +0100] rev 48574
filelog: add a comment explaining a fast path in filerevisioncopied() Differential Revision: https://phab.mercurial-scm.org/D11964
Tue, 21 Dec 2021 21:26:14 +0100 rhg: Store p1, p2, and hash in RevlogEntry
Simon Sapin <simon.sapin@octobus.net> [Tue, 21 Dec 2021 21:26:14 +0100] rev 48573
rhg: Store p1, p2, and hash in RevlogEntry This avoids a duplicate index lookup Differential Revision: https://phab.mercurial-scm.org/D11963
Tue, 21 Dec 2021 21:23:46 +0100 rhg: RevlogEntry::uncompressed_len is signed
Simon Sapin <simon.sapin@octobus.net> [Tue, 21 Dec 2021 21:23:46 +0100] rev 48572
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
Tue, 21 Dec 2021 18:50:44 +0100 rhg: Expose FilelogEntry that wraps RevlogEntry
Simon Sapin <simon.sapin@octobus.net> [Tue, 21 Dec 2021 18:50:44 +0100] rev 48571
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
Tue, 21 Dec 2021 18:35:58 +0100 rhg: Add RevlogEntry::data that does delta resolution
Simon Sapin <simon.sapin@octobus.net> [Tue, 21 Dec 2021 18:35:58 +0100] rev 48570
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
Tue, 21 Dec 2021 15:57:30 +0100 rhg: Rename some revlog-related types and methods
Simon Sapin <simon.sapin@octobus.net> [Tue, 21 Dec 2021 15:57:30 +0100] rev 48569
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
Wed, 05 Jan 2022 13:36:05 -0500 git: add opener attribute to gitstore
Augie Fackler <augie@google.com> [Wed, 05 Jan 2022 13:36:05 -0500] rev 48568
git: add opener attribute to gitstore Differential Revision: https://phab.mercurial-scm.org/D11958
Thu, 06 Jan 2022 09:55:28 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Thu, 06 Jan 2022 09:55:28 +0100] rev 48567
branching: merge stable into default
Thu, 23 Dec 2021 14:49:28 +0100 dirstate: remove deprecated API
Raphaël Gomès <rgomes@octobus.net> [Thu, 23 Dec 2021 14:49:28 +0100] rev 48566
dirstate: remove deprecated API Differential Revision: https://phab.mercurial-scm.org/D11953
Thu, 23 Dec 2021 14:49:05 +0100 discovery: remove deprecated API
Raphaël Gomès <rgomes@octobus.net> [Thu, 23 Dec 2021 14:49:05 +0100] rev 48565
discovery: remove deprecated API Differential Revision: https://phab.mercurial-scm.org/D11952
Thu, 23 Dec 2021 14:48:31 +0100 revlog: remove deprecated APIs
Raphaël Gomès <rgomes@octobus.net> [Thu, 23 Dec 2021 14:48:31 +0100] rev 48564
revlog: remove deprecated APIs Differential Revision: https://phab.mercurial-scm.org/D11951
Thu, 23 Dec 2021 14:47:52 +0100 urls: remove deprecated APIs
Raphaël Gomès <rgomes@octobus.net> [Thu, 23 Dec 2021 14:47:52 +0100] rev 48563
urls: remove deprecated APIs Differential Revision: https://phab.mercurial-scm.org/D11950
Thu, 23 Dec 2021 14:47:33 +0100 remotefilelog: remove deprecated API
Raphaël Gomès <rgomes@octobus.net> [Thu, 23 Dec 2021 14:47:33 +0100] rev 48562
remotefilelog: remove deprecated API Differential Revision: https://phab.mercurial-scm.org/D11949
Tue, 07 Dec 2021 16:44:22 +0100 exchangev2: remove it
Raphaël Gomès <rgomes@octobus.net> [Tue, 07 Dec 2021 16:44:22 +0100] rev 48561
exchangev2: remove it As discussed on the mailing list, this is incomplete and unused with little hope of revival. Differential Revision: https://phab.mercurial-scm.org/D11954
Thu, 30 Dec 2021 13:25:44 +0100 rust: fix build errors on darwin
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Thu, 30 Dec 2021 13:25:44 +0100] rev 48560
rust: fix build errors on darwin I'm not all _that_ versed in Rust, but I think the root cause is that some constants are u16 rather than u32 on Darwin. I checked that the code still compiles on the latest Ubuntu. Differential Revision: https://phab.mercurial-scm.org/D11955
Tue, 04 Jan 2022 14:21:22 -0500 merge: with stable
Augie Fackler <augie@google.com> [Tue, 04 Jan 2022 14:21:22 -0500] rev 48559
merge: with stable
Fri, 15 Feb 2019 17:20:32 -0500 help: properly document the default pattern
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 15 Feb 2019 17:20:32 -0500] rev 48558
help: properly document the default pattern The default isn't to glob. It's relpath, which does no globbing at all. Thus most commands and options like -X/-I and hg files require `glob:` in front of them to actually do any globbing. I think long ago the default was to glob, but that hasn't been true for a long time.
(0) -30000 -10000 -3000 -1000 -300 -100 -48 +48 +100 +300 +1000 +3000 tip