Tue, 29 Mar 2022 00:58:58 +0200 rust-cpython: remove unused API to `drop_entry_and_copy_source`
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 00:58:58 +0200] rev 49177
rust-cpython: remove unused API to `drop_entry_and_copy_source` This is not used anywhere anymore and its use cases are covered by the new API Differential Revision: https://phab.mercurial-scm.org/D12520
Tue, 29 Mar 2022 00:57:06 +0200 rust-dirstatemap: remove `set_dirstate_entry`/`set_entry` methods
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 00:57:06 +0200] rev 49176
rust-dirstatemap: remove `set_dirstate_entry`/`set_entry` methods These methods were needed crutches before the Rust implementation caught up to Python. Calling `set_entry` (whether from Python or Rust) was dangerous since it didn't update any of the counters of the DirstateMap data structure, while having no real way of knowing when to use it "correctly" except it you were one of the 3 people who looked deep enough into the soul of this code. Differential Revision: https://phab.mercurial-scm.org/D12519
Tue, 29 Mar 2022 00:53:11 +0200 rust-dirstatemap: implement part of the `setparents` logic
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 00:53:11 +0200] rev 49175
rust-dirstatemap: implement part of the `setparents` logic The Python code does many round-trip calls to the Rust dirstatemap when copy information needs to be dropped in `setparents`. This may result in improved performance on `commit`, `update` and other such commands, but was mostly done to drop the last use of `set_dirstate_item`. See inline comments for an asterisk about performance, and see next patch for why `set_dirstate_item` has to go. Differential Revision: https://phab.mercurial-scm.org/D12518
Mon, 28 Mar 2022 23:45:54 +0200 dirstate-item: add missing bit of docstring
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:45:54 +0200] rev 49174
dirstate-item: add missing bit of docstring Differential Revision: https://phab.mercurial-scm.org/D12517
Mon, 28 Mar 2022 23:42:16 +0200 dirstatemap: move `_dirs_incr` and `_dirs_decr` methods out of the common
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:42:16 +0200] rev 49173
dirstatemap: move `_dirs_incr` and `_dirs_decr` methods out of the common They are only used by the Python implementation now Differential Revision: https://phab.mercurial-scm.org/D12516
Mon, 28 Mar 2022 23:39:28 +0200 dirstatemap: move `_refresh_entry` out of the common methods
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:39:28 +0200] rev 49172
dirstatemap: move `_refresh_entry` out of the common methods This is only used in the Python implementation now Differential Revision: https://phab.mercurial-scm.org/D12515
Mon, 28 Mar 2022 23:38:05 +0200 dirstatemap: move `_drop_entry` out of the common methods
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:38:05 +0200] rev 49171
dirstatemap: move `_drop_entry` out of the common methods Only the Python implementation uses it. Differential Revision: https://phab.mercurial-scm.org/D12514
Mon, 28 Mar 2022 23:37:36 +0200 rust-dirstatemap: remove `_drop_entry`
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:37:36 +0200] rev 49170
rust-dirstatemap: remove `_drop_entry` This is not used anywhere anymore Differential Revision: https://phab.mercurial-scm.org/D12513
Mon, 28 Mar 2022 23:34:30 +0200 rust-dirstatemap: remove `__settitem__`
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 23:34:30 +0200] rev 49169
rust-dirstatemap: remove `__settitem__` This is not used anywhere now. Differential Revision: https://phab.mercurial-scm.org/D12512
Mon, 28 Mar 2022 18:30:08 +0200 rust-dirstatemap: remove unused `_refresh_entry` implementation
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:30:08 +0200] rev 49168
rust-dirstatemap: remove unused `_refresh_entry` implementation This was only used in the newer APIs, all of which have been rewritten in Rust Differential Revision: https://phab.mercurial-scm.org/D12511
Wed, 23 Mar 2022 17:19:32 +0100 rust-distatemap: remove `addfile` API
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:19:32 +0100] rev 49167
rust-distatemap: remove `addfile` API All of its users have been migrated to the new API Differential Revision: https://phab.mercurial-scm.org/D12510
Wed, 23 Mar 2022 17:16:10 +0100 rust-dirstatemap: remove `removefile` API
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:16:10 +0100] rev 49166
rust-dirstatemap: remove `removefile` API Its callers have been migrated to the newer dirstate API. Differential Revision: https://phab.mercurial-scm.org/D12509
Mon, 28 Mar 2022 18:26:24 +0200 rhg: use the new `set_clean` API
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:26:24 +0200] rev 49165
rhg: use the new `set_clean` API Differential Revision: https://phab.mercurial-scm.org/D12508
Mon, 28 Mar 2022 18:15:11 +0200 dirstatemap: move `set_untracked` out of the common methods
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:15:11 +0200] rev 49164
dirstatemap: move `set_untracked` out of the common methods There is a dedicated Rust implementation now Differential Revision: https://phab.mercurial-scm.org/D12507
Mon, 28 Mar 2022 18:13:58 +0200 rust-dirstatemap: add `set_untracked` method
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:13:58 +0200] rev 49163
rust-dirstatemap: add `set_untracked` method This is the new API that Python has already migrated to Differential Revision: https://phab.mercurial-scm.org/D12506
Mon, 28 Mar 2022 18:10:19 +0200 dirstatemap: move `set_possibly_dirty` out of the common methods
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:10:19 +0200] rev 49162
dirstatemap: move `set_possibly_dirty` out of the common methods There exists now a dedicated Rust implementation Differential Revision: https://phab.mercurial-scm.org/D12505
Mon, 28 Mar 2022 18:09:01 +0200 rust-dirstatemap: add `set_possibly_dirty` method
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:09:01 +0200] rev 49161
rust-dirstatemap: add `set_possibly_dirty` method This is the new API that Python has already migrated to. Differential Revision: https://phab.mercurial-scm.org/D12504
Mon, 28 Mar 2022 18:02:45 +0200 dirstatemap: move `set_clean` out of common methods
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:02:45 +0200] rev 49160
dirstatemap: move `set_clean` out of common methods This now has a dedicated Rust implementation Differential Revision: https://phab.mercurial-scm.org/D12503
Mon, 28 Mar 2022 18:02:50 +0200 rust-dirstatemap: add `set_clean` method
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:02:50 +0200] rev 49159
rust-dirstatemap: add `set_clean` method This is the new dirstate API that has already been moved to in Python. Differential Revision: https://phab.mercurial-scm.org/D12502
Wed, 23 Mar 2022 17:13:18 +0100 dirstatemap: remove `_insert_entry`
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:13:18 +0100] rev 49158
dirstatemap: remove `_insert_entry` This was needed as a compatibility layer for the Python and Rust implementations, but it is not called from anywhere in Rust anymore. The two remaining calls have been inlined. Differential Revision: https://phab.mercurial-scm.org/D12501
Wed, 23 Mar 2022 17:25:42 +0100 dirstatemap: move `reset_state` out of common methods
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:25:42 +0100] rev 49157
dirstatemap: move `reset_state` out of common methods Now that we have a Rust implementation, we defer to that accordingly. Differential Revision: https://phab.mercurial-scm.org/D12500
Wed, 23 Mar 2022 17:27:58 +0100 rust-dirstatemap: add Rust implementation of `reset_state`
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:27:58 +0100] rev 49156
rust-dirstatemap: add Rust implementation of `reset_state` This is the new API which has already been defined in Python Differential Revision: https://phab.mercurial-scm.org/D12499
Wed, 23 Mar 2022 17:38:59 +0100 rust-dirstate: introduce intermediate struct for dirstate-v2 data
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 17:38:59 +0100] rev 49155
rust-dirstate: introduce intermediate struct for dirstate-v2 data This is passed often as a long tuple that is not easy to know the form of, so we refactor everything in this struct. This also renames `wdir_tracked` to follow the Python `wc_tracked`, even though the on-disk format uses `WDIR_TRACKED`. I think a single naming scheme is better, but we can't easily break the Python impl now because of extensions, so this is low-effort enough and facilitates grepping. Differential Revision: https://phab.mercurial-scm.org/D12498
Wed, 23 Mar 2022 16:32:31 +0100 dirstatemap: remove unused parameter from `reset_state`
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 16:32:31 +0100] rev 49154
dirstatemap: remove unused parameter from `reset_state` This has no callers using it and is not used inside the method itself. Differential Revision: https://phab.mercurial-scm.org/D12497
Wed, 23 Mar 2022 15:19:43 +0100 dirstatemap: move `set_tracked` out of common methods and plug in Rust
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 15:19:43 +0100] rev 49153
dirstatemap: move `set_tracked` out of common methods and plug in Rust We now have a Rust-specific implementation of this method, it is no longer shared between both implementations. Differential Revision: https://phab.mercurial-scm.org/D12496
Wed, 23 Mar 2022 15:18:12 +0100 rust-dirstatemap: add `set_tracked` method
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 15:18:12 +0100] rev 49152
rust-dirstatemap: add `set_tracked` method This is the new dirstate API that has already been moved to in Python. It will be used in place of the old `addfile`/`removefile` one. Differential Revision: https://phab.mercurial-scm.org/D12495
Tue, 12 Apr 2022 23:15:25 -0700 changelog: avoid copying changeset data into `ChangesetRevisionData`
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Apr 2022 23:15:25 -0700] rev 49151
changelog: avoid copying changeset data into `ChangesetRevisionData` Differential Revision: https://phab.mercurial-scm.org/D12548
Fri, 08 Apr 2022 21:34:18 -0700 rust-nodemap: remove unnecessary explicit lifetime
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Apr 2022 21:34:18 -0700] rev 49150
rust-nodemap: remove unnecessary explicit lifetime Differential Revision: https://phab.mercurial-scm.org/D12486
Tue, 12 Apr 2022 21:56:57 -0700 rust-revlog: add tests for p1/p2 getters, as promised in D12442
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Apr 2022 21:56:57 -0700] rev 49149
rust-revlog: add tests for p1/p2 getters, as promised in D12442 Differential Revision: https://phab.mercurial-scm.org/D12565
Fri, 15 Apr 2022 18:20:41 -0700 rust-revlog: make `IndexEntryBuilder` build a whole entry
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Apr 2022 18:20:41 -0700] rev 49148
rust-revlog: make `IndexEntryBuilder` build a whole entry The `IndexEntryBuilder` we have in tests only built part of a revlog entry before this patch. It's more useful if it can build a full entry. As part of fixing that, I also added a (non-test) `IndexEntry::link_revision()`. Differential Revision: https://phab.mercurial-scm.org/D12564
Fri, 15 Apr 2022 17:06:10 -0700 rust-revlog: change default version from 2 to 1 in test builder
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Apr 2022 17:06:10 -0700] rev 49147
rust-revlog: change default version from 2 to 1 in test builder Version 1 is the only version we support, so it seems like the natural choice for making it easy to create valid revlogs. Differential Revision: https://phab.mercurial-scm.org/D12563
Fri, 15 Apr 2022 09:39:27 -0700 rust-repo: extract a function for checking nodemap requirement
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Apr 2022 09:39:27 -0700] rev 49146
rust-repo: extract a function for checking nodemap requirement Differential Revision: https://phab.mercurial-scm.org/D12562
Fri, 15 Apr 2022 09:37:13 -0700 rust-revlog: make `Changelog` and `ManifestLog` unaware of `Repo`
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Apr 2022 09:37:13 -0700] rev 49145
rust-revlog: make `Changelog` and `ManifestLog` unaware of `Repo` As with other recent patches, this makes the types easier to test and reuse. Differential Revision: https://phab.mercurial-scm.org/D12561
Tue, 12 Apr 2022 21:25:56 -0700 rust-revlog: make unaware of `Repo`
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Apr 2022 21:25:56 -0700] rev 49144
rust-revlog: make unaware of `Repo` Differential Revision: https://phab.mercurial-scm.org/D12547
Thu, 14 Apr 2022 09:09:45 -0700 rust-filelog: don't use persistent nodemap (to match Python)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Apr 2022 09:09:45 -0700] rev 49143
rust-filelog: don't use persistent nodemap (to match Python) Differential Revision: https://phab.mercurial-scm.org/D12558
Tue, 12 Apr 2022 11:40:37 -0700 rust-revlog: move check for nodemap requirement to caller
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Apr 2022 11:40:37 -0700] rev 49142
rust-revlog: move check for nodemap requirement to caller It's good for both making `Revlog` testable and reusable to have it not depend on the higher-level `Repo` type. This patch is one step in towards that. Additionally, this change in particular gives the callers more control over when to use a nodemap. Differential Revision: https://phab.mercurial-scm.org/D12546
Thu, 31 Mar 2022 22:54:33 -0700 rust-nodemap-docket: make unaware of `Repo`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Mar 2022 22:54:33 -0700] rev 49141
rust-nodemap-docket: make unaware of `Repo` Differential Revision: https://phab.mercurial-scm.org/D12545
Thu, 31 Mar 2022 22:59:19 -0700 rust-nodemap-docket: move check of nodemap requirement to caller
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Mar 2022 22:59:19 -0700] rev 49140
rust-nodemap-docket: move check of nodemap requirement to caller I think it's cleaner if `NodeMapDocket` doesn't know about the `Repo` type. That makes it more easily reusable and testable. This patch moves out one of the uses of `Repo` out of it. Differential Revision: https://phab.mercurial-scm.org/D12544
Tue, 19 Apr 2022 10:53:58 -0400 merge with stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Apr 2022 10:53:58 -0400] rev 49139
merge with stable
Fri, 15 Apr 2022 11:20:49 -0400 contrib: update python dependencies on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 15 Apr 2022 11:20:49 -0400] rev 49138
contrib: update python dependencies on Windows Differential Revision: https://phab.mercurial-scm.org/D12559
Fri, 15 Apr 2022 11:32:27 -0400 contrib: add a hint if the Windows dependency MSI is already installed
Matt Harbison <matt_harbison@yahoo.com> [Fri, 15 Apr 2022 11:32:27 -0400] rev 49137
contrib: add a hint if the Windows dependency MSI is already installed In the past, I've gotten confused when the script failed on seemingly random python installs (and thus the py3.8 install was commented out from the last time this happened to me, which has been reverted here). This particular error code means the package was already installed. For python, it means the major and minor version are the same, but the micro version may differ. In practice, ignoring the python installation failure will cause the pip installation that happens next to fail, because python.exe for that version is somewhere else on the system. This could probably be fixed by running py.exe with the major and minor version, but that is skipped during the install for some reason. I didn't feel like over complicating this though, and at least there's a better hint when the problem occurs. Differential Revision: https://phab.mercurial-scm.org/D12560
Mon, 18 Apr 2022 16:18:33 -0400 packaging: fix the type hint on the download_entry function
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 16:18:33 -0400] rev 49136
packaging: fix the type hint on the download_entry function Flagged by PyCharm. Differential Revision: https://phab.mercurial-scm.org/D12571
Mon, 18 Apr 2022 16:11:52 -0400 packaging: drop python27 references from the Windows instructions
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 16:11:52 -0400] rev 49135
packaging: drop python27 references from the Windows instructions I also diffed these two files and eliminated cosmetic differences to make it easier to ensure both are in alignment. Differential Revision: https://phab.mercurial-scm.org/D12570
Mon, 18 Apr 2022 15:27:12 -0400 packaging: add a missing parenthesis to help text
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 15:27:12 -0400] rev 49134
packaging: add a missing parenthesis to help text Differential Revision: https://phab.mercurial-scm.org/D12569
Mon, 18 Apr 2022 14:20:58 -0400 git: un-byteify the `mode` argument for the builtin `open()`
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 14:20:58 -0400] rev 49133
git: un-byteify the `mode` argument for the builtin `open()` I guess this was assuming `pycompat.open` was imported, but it's not here or elsewhere in the git extension. Differential Revision: https://phab.mercurial-scm.org/D12568
Mon, 18 Apr 2022 11:21:09 -0400 git: adapt to some recent dirstate API changes
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 11:21:09 -0400] rev 49132
git: adapt to some recent dirstate API changes There are still old methods like add() and drop(). I don't see anything that looks equivalent, so there's likely more work to do. But this allows diff and commit to work again on the simple webpage repo for thg. Differential Revision: https://phab.mercurial-scm.org/D12567
Mon, 18 Apr 2022 11:15:29 -0400 idirstate: add missing get_entry() method
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 Apr 2022 11:15:29 -0400] rev 49131
idirstate: add missing get_entry() method Differential Revision: https://phab.mercurial-scm.org/D12566
Wed, 13 Apr 2022 15:02:01 -0400 windows: disable pager when packaged with py2exe
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 15:02:01 -0400] rev 49130
windows: disable pager when packaged with py2exe With Windows and py3, all output that got directed to the pager was lost. It can be worked around by the user piping to `more`, but that's easy to forget, and can be dangerous if `hg diff` or similar incorrectly shows no changes. The problem appears to be the new WindowsConsoleIO in py3.6[1]. We've worked around it with PyOxidizer by setting the `Py_LegacyWindowsStdioFlag` interpreter option, and worked around it with `hg.bat` and `exewrapper.c` by internally setting `PYTHONLEGACYWINDOWSSTDIO=1`. Unfortunately, py2exe doesn't appear to be able to set the interpreter option, and somehow seems to also ignore the environment variable. The latter isn't a good fix anyway, since setting it in the environment would affect other python programs too. We can't install a global config for this because a config closer to the user (e.g. from before pager was turned on by default) can override it. [1] https://peps.python.org/pep-0528/ Differential Revision: https://phab.mercurial-scm.org/D12556
Wed, 13 Apr 2022 14:37:57 -0400 resourceutil: force filesystem access to resources when using py2exe
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 14:37:57 -0400] rev 49129
resourceutil: force filesystem access to resources when using py2exe I don't know why it doesn't work, but it avoids this fatal error on startup: > hg debugshell Traceback (most recent call last): File "hg", line 58, in <module> File "mercurial\dispatch.pyc", line 143, in run File "mercurial\dispatch.pyc", line 232, in dispatch File "mercurial\dispatch.pyc", line 254, in _rundispatch File "mercurial\ui.pyc", line 316, in load File "mercurial\rcutil.pyc", line 98, in rccomponents File "mercurial\rcutil.pyc", line 68, in default_rc_resources File "mercurial\utils\resourceutil.pyc", line 102, in contents File "<frozen zipimport>", line 775, in contents AssertionError I assume the py2 version of py2exe never hit this because `importlib.resources` failed to import. Differential Revision: https://phab.mercurial-scm.org/D12554
Wed, 13 Apr 2022 14:25:13 -0400 setup: fix the py2exe logic to work with py3
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Apr 2022 14:25:13 -0400] rev 49128
setup: fix the py2exe logic to work with py3 TortoiseHg still uses (the modernized) py2exe packaging, but the build was failing since `py2exe.Distribution` was removed. One thing to note is that later in this module, there's a hack to include `distutils` when building from a virtualenv. While `import distutils` works in `hg debugshell` when built with py2, it doesn't work in py3. I'm not sure why- I don't see it in `library.zip` either. It doesn't seem to break anything though. Differential Revision: https://phab.mercurial-scm.org/D12553
Wed, 13 Apr 2022 07:58:49 -0700 absorb: make `--edit-lines` imply `--apply-changes`
Martin von Zweigbergk <martinvonz@google.com> [Wed, 13 Apr 2022 07:58:49 -0700] rev 49127
absorb: make `--edit-lines` imply `--apply-changes` One of our users tried to use `hg absorb -e` but it seemed that it would only bring up the editor if there were no changes the command could automatically detect destination for. I spent probably half an hour debugging why it worked that way. I finally figured out that it does bring up the editor, but you have to answer "yes" to the "apply changes" prompt *first*. That seems very unintuitive. If the user wants to edit the changes, there seems to be little reason to present them with a prompt first, so let's have `-e/--edit-lines` imply `-a/--apply-changes`. All the tests using `-e` also already used `-a`. I changed them to rely on the implied `-a` so we get coverage of that. Differential Revision: https://phab.mercurial-scm.org/D12550
Wed, 13 Apr 2022 14:40:11 +0100 branchmap: add a test that shows bad interaction with strip
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 13 Apr 2022 14:40:11 +0100] rev 49126
branchmap: add a test that shows bad interaction with strip Differential Revision: https://phab.mercurial-scm.org/D12549
Tue, 12 Apr 2022 20:01:49 +0100 rhg: refactor to pass argv down, instead of caling args_os()
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 12 Apr 2022 20:01:49 +0100] rev 49125
rhg: refactor to pass argv down, instead of caling args_os() This refactoring makes it easy to patch some command-line preprocessing into rhg. We use this to support using rhg as a shebang interpreter, for example. Differential Revision: https://phab.mercurial-scm.org/D12543
Tue, 12 Apr 2022 19:40:37 +0100 narrow: support debugupgraderepo
Arseniy Alekseyev <aalekseyev@janestreet.com> [Tue, 12 Apr 2022 19:40:37 +0100] rev 49124
narrow: support debugupgraderepo Differential Revision: https://phab.mercurial-scm.org/D12542
Tue, 05 Apr 2022 12:06:32 -0700 rust-revlog: add methods for getting parent revs and entries
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Apr 2022 12:06:32 -0700] rev 49123
rust-revlog: add methods for getting parent revs and entries Differential Revision: https://phab.mercurial-scm.org/D12442
Tue, 05 Apr 2022 08:47:04 -0700 rust-changelog: start parsing changeset data
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Apr 2022 08:47:04 -0700] rev 49122
rust-changelog: start parsing changeset data This patch makes `ChangelogRevisionData` do some coarse, line-level splitting of the changeset data into manifest node, user, timestamp, files list, and description. There are no (in-tree) users of these functions yet, but I've added tests to prevent regressions. We'll surely add callers at some point. Differential Revision: https://phab.mercurial-scm.org/D12439
Mon, 04 Apr 2022 23:27:16 -0700 rust-changelog: remove special parsing of empty changelog data for null rev
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Apr 2022 23:27:16 -0700] rev 49121
rust-changelog: remove special parsing of empty changelog data for null rev For the null revision, `Revlog::get_rev_data()` will return an empty string (of bytes). We currently handle that case in `ChangelogRevisionData::manifest_node()`. However, it's going to be ugly to have special handling for the null revision for each future method on `ChangelogRevisionData`. This patch therefore restructures the code so we instead initialize the struct with valid data for the null revision. Differential Revision: https://phab.mercurial-scm.org/D12438
Thu, 31 Mar 2022 22:06:26 -0700 rust-changelog: don't skip empty lines when iterating over changeset lines
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Mar 2022 22:06:26 -0700] rev 49120
rust-changelog: don't skip empty lines when iterating over changeset lines The first empty line in the changeset indicates the end of headers and beginning of description. Callers can't know figure out where that position is if empty lines are skipped. Differential Revision: https://phab.mercurial-scm.org/D12426
Thu, 31 Mar 2022 22:02:46 -0700 rust-requirements: allow loading repos with `bookmarksinstore` requirement
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Mar 2022 22:02:46 -0700] rev 49119
rust-requirements: allow loading repos with `bookmarksinstore` requirement `rhg` does support bookmarks, so it can load repos with the `bookmarksinstore` requirement just as well as other repos. Differential Revision: https://phab.mercurial-scm.org/D12425
Sat, 09 Apr 2022 14:43:30 +0200 test: accept another error message on lack of TLS client certificate
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:43:30 +0200] rev 49118
test: accept another error message on lack of TLS client certificate Differential Revision: https://phab.mercurial-scm.org/D12492
Sat, 09 Apr 2022 14:41:55 +0200 sslutil: support TLSV1_ALERT_PROTOCOL_VERSION reason code
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:41:55 +0200] rev 49117
sslutil: support TLSV1_ALERT_PROTOCOL_VERSION reason code It looks like python 3.10 returns a different reason code on protocol version mismatch. Differential Revision: https://phab.mercurial-scm.org/D12491
Sat, 09 Apr 2022 14:28:17 +0200 test: override default cipher selection when connecting to TLS 1.0/1.1 servers
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:28:17 +0200] rev 49116
test: override default cipher selection when connecting to TLS 1.0/1.1 servers The default set of ciphers on python 3.10 is incompatible with old TLS versions. Differential Revision: https://phab.mercurial-scm.org/D12490
Sat, 09 Apr 2022 14:23:52 +0200 sslutil: be less strict about which ciphers are allowed when using --insecure
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:23:52 +0200] rev 49115
sslutil: be less strict about which ciphers are allowed when using --insecure Python 3.10 restricted which ciphers are enabled by default, leading to no available ciphers for TLS < 1.2. When using the --insecure flag we allow old TLS, so also adjust the cipher list to give connections a chance to work. On the server side, also loosen the cipher selection in tests (when using the devel.serverexactprotocol option). Differential Revision: https://phab.mercurial-scm.org/D12489
Sat, 09 Apr 2022 14:15:32 +0200 sslutil: avoid deprecation warnings from python 3.10's ssl module
Julien Cristau <jcristau@debian.org> [Sat, 09 Apr 2022 14:15:32 +0200] rev 49114
sslutil: avoid deprecation warnings from python 3.10's ssl module Use ssl.PROTOCOL_TLS_{CLIENT,SERVER} and SSLContext.{min,max}imum_version when supported (3.7+). And, catch deprecation warnings when the user asks for deprecated TLS versions (1.0 and 1.1). Differential Revision: https://phab.mercurial-scm.org/D12488
Wed, 06 Apr 2022 22:29:49 +0200 zeroconf: fix deprecation warning with python 3.10
Julien Cristau <jcristau@debian.org> [Wed, 06 Apr 2022 22:29:49 +0200] rev 49113
zeroconf: fix deprecation warning with python 3.10 threading.condition.notifyAll → threading.condition.notify_all Differential Revision: https://phab.mercurial-scm.org/D12487
Mon, 11 Apr 2022 11:14:55 +0200 test: deal with changed error message on python 3.10
Julien Cristau <jcristau@debian.org> [Mon, 11 Apr 2022 11:14:55 +0200] rev 49112
test: deal with changed error message on python 3.10 Differential Revision: https://phab.mercurial-scm.org/D12493
Mon, 02 Dec 2019 14:45:00 +0100 mail: don't complain about a multi-word email.method
Julien Cristau <jcristau@debian.org> [Mon, 02 Dec 2019 14:45:00 +0100] rev 49111
mail: don't complain about a multi-word email.method I want to be able to set email.method to "ssh relay /usr/sbin/sendmail" without needing an extra trivial shell script. This works fine since we pass the full command to a shell, except for validateconfig trying to find it in $PATH. Differential Revision: https://phab.mercurial-scm.org/D7542
Mon, 28 Mar 2022 18:53:55 +0200 rust-dirstate: don't return a state for untracked entries
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 18:53:55 +0200] rev 49110
rust-dirstate: don't return a state for untracked entries This `state` API is a remnant of the former API and is slated for removal at some point. Any caller of this function will expect an entry that is tracked in the larger sense. Differential Revision: https://phab.mercurial-scm.org/D12448
Tue, 22 Mar 2022 16:33:18 +0100 dirstate: remove v1_* methods from Python/C/Rust shared API
Raphaël Gomès <rgomes@octobus.net> [Tue, 22 Mar 2022 16:33:18 +0100] rev 49109
dirstate: remove v1_* methods from Python/C/Rust shared API These methods are used for v1 parsing by their respective implementations, but do not need to be shared between them. Differential Revision: https://phab.mercurial-scm.org/D12447
Mon, 28 Mar 2022 13:01:42 +0200 rust-dirstate-entry: fix typo in panic message
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 13:01:42 +0200] rev 49108
rust-dirstate-entry: fix typo in panic message Differential Revision: https://phab.mercurial-scm.org/D12446
Mon, 28 Mar 2022 13:00:57 +0200 test-issue660: add dirstate-v2 variant
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 13:00:57 +0200] rev 49107
test-issue660: add dirstate-v2 variant It's basically a dirstate test, so it makes sense to test out the new version. Differential Revision: https://phab.mercurial-scm.org/D12445
Mon, 28 Mar 2022 13:00:14 +0200 test-issue660: test inside a repository, not the test dir
Raphaël Gomès <rgomes@octobus.net> [Mon, 28 Mar 2022 13:00:14 +0200] rev 49106
test-issue660: test inside a repository, not the test dir This causes an issue with a temporary file showing up in test output when adding a dirstate-v2 variant of this test. Differential Revision: https://phab.mercurial-scm.org/D12444
Wed, 23 Mar 2022 15:15:17 +0100 dirstate: fix some typos in docstrings
Raphaël Gomès <rgomes@octobus.net> [Wed, 23 Mar 2022 15:15:17 +0100] rev 49105
dirstate: fix some typos in docstrings I was passing by and they've been bothering me. :) Differential Revision: https://phab.mercurial-scm.org/D12443
Mon, 04 Apr 2022 13:36:37 +0000 path: explicitly declare the `pushurl` suboption
Raphaël Gomès <rgomes@octobus.net> [Mon, 04 Apr 2022 13:36:37 +0000] rev 49104
path: explicitly declare the `pushurl` suboption This will help documentation and discovery. Differential Revision: https://phab.mercurial-scm.org/D12437
Thu, 07 Apr 2022 15:29:02 +0200 setup: fix incomplete implementation of Command
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Apr 2022 15:29:02 +0200] rev 49103
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
Mon, 04 Apr 2022 15:36:32 +0200 path: explicitly declare the `pushrev` suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Apr 2022 15:36:32 +0200] rev 49102
path: explicitly declare the `pushrev` suboptions This will help documentation and discovery. Differential Revision: https://phab.mercurial-scm.org/D12436
Mon, 04 Apr 2022 15:36:17 +0200 path: explicitly declare the `multi-urls` suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Apr 2022 15:36:17 +0200] rev 49101
path: explicitly declare the `multi-urls` suboptions This will help documentation and discovery. Differential Revision: https://phab.mercurial-scm.org/D12435
Mon, 04 Apr 2022 15:35:59 +0200 path: explicitly declare the `bookmarks.mode` suboptions
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Apr 2022 15:35:59 +0200] rev 49100
path: explicitly declare the `bookmarks.mode` suboptions This will help documentation and discovery. Differential Revision: https://phab.mercurial-scm.org/D12434
Mon, 04 Apr 2022 18:05:33 -0700 crecord: avoid duplicating lines when reverting noeol->eol change
Kyle Lippincott <spectral@google.com> [Mon, 04 Apr 2022 18:05:33 -0700] rev 49099
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
Tue, 05 Apr 2022 11:09:57 -0700 crecord: add test demonstrating issue when reverting noeol->eol change
Kyle Lippincott <spectral@google.com> [Tue, 05 Apr 2022 11:09:57 -0700] rev 49098
crecord: add test demonstrating issue when reverting noeol->eol change Differential Revision: https://phab.mercurial-scm.org/D12440
Mon, 28 Mar 2022 10:43:10 -0700 revert: ask user to confirm before tracking new file when interactive
Martin von Zweigbergk <martinvonz@google.com> [Mon, 28 Mar 2022 10:43:10 -0700] rev 49097
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
Mon, 28 Mar 2022 10:43:06 -0700 revert: use a `continue` to reduce indentation
Martin von Zweigbergk <martinvonz@google.com> [Mon, 28 Mar 2022 10:43:06 -0700] rev 49096
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
Fri, 25 Mar 2022 08:33:03 -0700 stringutil: try to avoid running `splitlines()` only to get first line
Martin von Zweigbergk <martinvonz@google.com> [Fri, 25 Mar 2022 08:33:03 -0700] rev 49095
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
Thu, 24 Mar 2022 22:05:49 -0700 logcmdutil: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:49 -0700] rev 49094
logcmdutil: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12412
Thu, 24 Mar 2022 22:05:36 -0700 filemerge: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:36 -0700] rev 49093
filemerge: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12411
Thu, 24 Mar 2022 22:05:27 -0700 absorb: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:27 -0700] rev 49092
absorb: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12410
Thu, 24 Mar 2022 22:05:13 -0700 extensions: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:13 -0700] rev 49091
extensions: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12409
Thu, 24 Mar 2022 22:04:38 -0700 bookmarks: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:04:38 -0700] rev 49090
bookmarks: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12408
Thu, 24 Mar 2022 20:31:44 -0700 help: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 20:31:44 -0700] rev 49089
help: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12407
Thu, 24 Mar 2022 16:55:09 -0700 histedit: remove an unnecessary default value of `b''` for commit message
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 16:55:09 -0700] rev 49088
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
Thu, 24 Mar 2022 16:51:20 -0700 histedit: use new function for getting first line of a string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 16:51:20 -0700] rev 49087
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
Thu, 24 Mar 2022 16:09:12 -0700 templates: extract function to `stringutil` for getting first line of text
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 16:09:12 -0700] rev 49086
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
Thu, 24 Mar 2022 15:41:29 -0700 templates: make `firstline` filter not keep '\v', '\f' and similar
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 15:41:29 -0700] rev 49085
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
Tue, 22 Mar 2022 11:22:09 -0400 pytype: drop py3.6 support
Matt Harbison <matt_harbison@yahoo.com> [Tue, 22 Mar 2022 11:22:09 -0400] rev 49084
pytype: drop py3.6 support Pytype 2022.01.07 only supports 3.7+. Differential Revision: https://phab.mercurial-scm.org/D12400
Sun, 13 Mar 2022 16:14:34 +0100 perf-util: add a `compare-discovery-case` script
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 13 Mar 2022 16:14:34 +0100] rev 49083
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
Mon, 14 Mar 2022 05:59:20 +0100 discovery: also audit the number of queries done
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 14 Mar 2022 05:59:20 +0100] rev 49082
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
Sun, 13 Mar 2022 16:10:53 +0100 search-discovery-case: display more information about the interresting case
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 13 Mar 2022 16:10:53 +0100] rev 49081
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
Mon, 21 Mar 2022 20:06:51 +0100 subsetmaker: rework the antichain generation to be usable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 21 Mar 2022 20:06:51 +0100] rev 49080
subsetmaker: rework the antichain generation to be usable Before this, antichain computation can run for 10s of hours without completion in sight. We use a more direct approach in the computation to keep the computation in complexity in check. With good result. We can now have a full antichain computation on mozilla-try in about one minute. Which is usable. Differential Revision: https://phab.mercurial-scm.org/D12396
Sun, 13 Mar 2022 16:24:01 +0100 subsetmaker: use SortedSet for the scratch variant
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 13 Mar 2022 16:24:01 +0100] rev 49079
subsetmaker: use SortedSet for the scratch variant This provides a massive speedup on wide repository with many heads. For example on mozilla-try, this move from un-usable slow to fairly instant. Differential Revision: https://phab.mercurial-scm.org/D12395
Sun, 13 Mar 2022 15:53:29 +0100 subsetmaker: stabilize the computation of `scratch` subset
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 13 Mar 2022 15:53:29 +0100] rev 49078
subsetmaker: stabilize the computation of `scratch` subset `heads` is set, order of the element are not deterministic and we need to stabilize that if we want to get reproducible results. Differential Revision: https://phab.mercurial-scm.org/D12394
Tue, 20 Jul 2021 15:07:10 +0200 revlog: recommit 49fd21f32695 with a fix for issue6528
Joerg Sonnenberger <joerg@bec.de> [Tue, 20 Jul 2021 15:07:10 +0200] rev 49077
revlog: recommit 49fd21f32695 with a fix for issue6528 `filelog.size` currently special cases two forms of metadata encoding: - copy data via the parent order as flag bit - censor data by peaking into the raw delta All other forms of metadata encoding including the empty metadata block are mishandled. In `basefilectx.cmp` the empty metadata block is explicitly checked to compensate for this. Restore 49fd21f32695, but disable it for filelog, so that the original flag bit use contines to work. Document all this mess for now in preparation of a proper rework. Differential Revision: https://phab.mercurial-scm.org/D11203
Fri, 18 Mar 2022 12:23:47 -0700 merge-lists: make it possible to specify pattern to match
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Mar 2022 12:23:47 -0700] rev 49076
merge-lists: make it possible to specify pattern to match The `merge-lists` tool doesn't know anything about Python other than its regex that attempts to match import lines. Let's make it possible to pass in a custom regex so it's easy to use the tool for e.g. C/C++ `#include` lines or Rust `use` lines (given the limited). Differential Revision: https://phab.mercurial-scm.org/D12392
Fri, 04 Mar 2022 16:12:56 -0800 contrib: add a partial-merge tool for sorted lists (such as Python imports)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 04 Mar 2022 16:12:56 -0800] rev 49075
contrib: add a partial-merge tool for sorted lists (such as Python imports) This is a pretty naive tool that uses a regular expression for matching lines. It is based on a Google-internal tool that worked in a similar way. For now, the regular expression is hard-coded to attempt to match single-line Python imports. The only commit I've found in the hg core repo where the tool helped was commit 9cd6292abfdf. I think that's because we often use multiple imports per import statement. I think this tool is still a decent first step (especially once the regex is made configurable in the next patch). The merging should ideally use a proper Python parser and do the merge at the AST (or CST?) level, but that's significantly harder, especially if you want to preserve comments and whitespace. It's also less generic. Differential Revision: https://phab.mercurial-scm.org/D12380
Tue, 05 Apr 2022 17:31:18 +0200 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Tue, 05 Apr 2022 17:31:18 +0200] rev 49074
branching: merge stable into default
Tue, 05 Apr 2022 11:09:03 +0200 merge: stable into default
Raphaël Gomès <rgomes@octobus.net> [Tue, 05 Apr 2022 11:09:03 +0200] rev 49073
merge: stable into default
Wed, 30 Mar 2022 00:57:08 -0400 tests: stop excluding the pycompat module from pyflakes
Matt Harbison <matt_harbison@yahoo.com> [Wed, 30 Mar 2022 00:57:08 -0400] rev 49072
tests: stop excluding the pycompat module from pyflakes I assume this was skipped because of all of the py2 stuff causing a lot of spew. The "unused" imports are left in place in case any 3rd party stuff is using it. I don't care about most of it, but TortoiseHg uses `io` and `queue`, so minimally I'd like to keep those. Differential Revision: https://phab.mercurial-scm.org/D12423
Wed, 30 Mar 2022 00:44:55 -0400 tests: drop some py2 specific pyflake failures
Matt Harbison <matt_harbison@yahoo.com> [Wed, 30 Mar 2022 00:44:55 -0400] rev 49071
tests: drop some py2 specific pyflake failures Differential Revision: https://phab.mercurial-scm.org/D12422
Tue, 29 Mar 2022 23:31:37 -0400 util: drop a duplicate import
Matt Harbison <matt_harbison@yahoo.com> [Tue, 29 Mar 2022 23:31:37 -0400] rev 49070
util: drop a duplicate import This was already imported several lines above. Differential Revision: https://phab.mercurial-scm.org/D12421
Tue, 29 Mar 2022 23:34:18 -0400 pycompat: drop the pickle import
Matt Harbison <matt_harbison@yahoo.com> [Tue, 29 Mar 2022 23:34:18 -0400] rev 49069
pycompat: drop the pickle import I suspect this is what df56e6bd37f6 meant to eliminate. Differential Revision: https://phab.mercurial-scm.org/D12420
Tue, 29 Mar 2022 22:22:36 -0400 util: restore the util.pickle symbol
Matt Harbison <matt_harbison@yahoo.com> [Tue, 29 Mar 2022 22:22:36 -0400] rev 49068
util: restore the util.pickle symbol This was accidently dropped in df56e6bd37f6, which started importing pickle directly. That commit explicitly says it will retain it for compatibility with external stuff though. The unused import in pycompat isn't flagged because that module is skipped. Just importing with a comment seemed cleaner than `import X as Y` and then assigning to a `pickle` variable, just to avoid the pyflakes warning. Differential Revision: https://phab.mercurial-scm.org/D12419
Tue, 29 Mar 2022 14:27:45 +0200 merge: stable into default
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 14:27:45 +0200] rev 49067
merge: stable into default
Thu, 24 Mar 2022 21:26:45 -0500 completion: install completers to conventional locations
Matthew Martin <phy1729@gmail.com> [Thu, 24 Mar 2022 21:26:45 -0500] rev 49066
completion: install completers to conventional locations Installs the bash and zsh completers to the convential locations so they will automatically be picked up without user intervention. The zsh completer on Debian is still installed to vendor-completions to match their policy. bash: https://github.com/scop/bash-completion#faq zsh: https://github.com/zsh-users/zsh/blob/57305cf245853b8b30895b41a90142dffab97e38/INSTALL#L254 Debian zsh: https://salsa.debian.org/debian/zsh/-/blob/5086b5356abcef8849dc8a09902b7c55f01db3c0/debian/README.Debian#L73
Wed, 23 Mar 2022 13:51:40 -0400 pytype: disable a few errors about Windows specific module attributes
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 Mar 2022 13:51:40 -0400] rev 49065
pytype: disable a few errors about Windows specific module attributes These were flagged by pytype 2022.03.21. Differential Revision: https://phab.mercurial-scm.org/D12401
Sat, 19 Mar 2022 15:44:38 +0100 rhg: sort unsupported extensions in error message
Raphaël Gomès <rgomes@octobus.net> [Sat, 19 Mar 2022 15:44:38 +0100] rev 49064
rhg: sort unsupported extensions in error message This caused some flakiness in test output, and is also just better for users. Differential Revision: https://phab.mercurial-scm.org/D12389
Sun, 13 Mar 2022 15:48:18 +0100 hgignore: ignore .testtimes in more location
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 13 Mar 2022 15:48:18 +0100] rev 49063
hgignore: ignore .testtimes in more location See the inline comment. Differential Revision: https://phab.mercurial-scm.org/D12393
Fri, 25 Mar 2022 11:33:12 -0400 merge: with stable
Augie Fackler <augie@google.com> [Fri, 25 Mar 2022 11:33:12 -0400] rev 49062
merge: with stable
Thu, 17 Mar 2022 11:19:06 -0700 partial-merge: add support for `.args` config (`$local` etc.)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 Mar 2022 11:19:06 -0700] rev 49061
partial-merge: add support for `.args` config (`$local` etc.) It will be useful to be able to define custom command-line arguments per partial merge tool just like we have for regular merge tools. In particular, I expect the same binary to handle multiple languages, so it will be useful to be able to pass some argument indicating the language, or perhaps simply an argument defining a regex that's used for finding lines to merge as a sorted set. Differential Revision: https://phab.mercurial-scm.org/D12383
Tue, 18 Jan 2022 13:05:21 -0800 filemerge: add support for partial conflict resolution by external tool
Martin von Zweigbergk <martinvonz@google.com> [Tue, 18 Jan 2022 13:05:21 -0800] rev 49060
filemerge: add support for partial conflict resolution by external tool A common class of merge conflicts is in imports/#includes/etc. It's relatively easy to write a tool that can resolve these conflicts, perhaps by naively just unioning the statements and leaving any cleanup to other tools to do later [1]. Such specialized tools cannot generally resolve all conflicts in a file, of course. Let's therefore call them "partial merge tools". Note that the internal simplemerge algorithm is such a partial merge tool - one that only resolves trivial "conflicts" where one side is unchanged or both sides change in the same way. One can also imagine having smarter language-aware partial tools that merge the AST. It may be useful for such tools to interactively let the user resolve any conflicts it can't resolve itself. However, having the option of implementing it as a partial merge tool means that the developer doesn't *need* to create a UI for it. Instead, the user can resolve any remaining conflicts with their regular merge tool (e.g. `:merge3` or `meld). We don't currently have a way to let the user define such partial merge tools. That's what this patch addresses. It lets the user configure partial merge tools to run. Each tool can be configured to run only on files matching certain patterns (e.g. "*.py"). The tool takes three inputs (local, base, other) and resolves conflicts by updating these in place. For example, let's say the inputs are these: base: ``` import sys def main(): print('Hello') ``` local: ``` import os import sys def main(): print('Hi') ``` other: ``` import re import sys def main(): print('Howdy') ``` A partial merge tool could now resolve the conflicting imports by replacing the import statements in *all* files by the following snippet, while leaving the remainder of the files unchanged. ``` import os import re import sys ``` As a result, simplemerge and any regular merge tool that runs after the partial merge tool(s) will consider the imports to be non-conflicting and will only present the conflict in `main()` to the user. Differential Revision: https://phab.mercurial-scm.org/D12356
Mon, 21 Mar 2022 10:55:50 +0100 branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 21 Mar 2022 10:55:50 +0100] rev 49059
branching: merge stable into default
Fri, 18 Mar 2022 17:39:06 +0100 rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net> [Fri, 18 Mar 2022 17:39:06 +0100] rev 49058
rhg: add support for ignoring all extensions Some workflows just want what `rhg` does and don't care about any extensions, this makes it easier. Differential Revision: https://phab.mercurial-scm.org/D12385
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 tip