Fri, 30 Apr 2021 02:11:58 +0200 manifests: push down expected node length into the parser @default
Joerg Sonnenberger <joerg@bec.de> [Fri, 30 Apr 2021 02:11:58 +0200] rev 47043
manifests: push down expected node length into the parser This strictly enforces the node length in the manifest lines according to what the repository expects. One test case moves large hash testing into the non-treemanifest part as treemanifests don't provide an interface for overriding just the node length for now. Differential Revision: https://phab.mercurial-scm.org/D10533
Fri, 30 Apr 2021 03:19:45 +0200 core: don't hard-code node length
Joerg Sonnenberger <joerg@bec.de> [Fri, 30 Apr 2021 03:19:45 +0200] rev 47042
core: don't hard-code node length Differential Revision: https://phab.mercurial-scm.org/D10536
Fri, 30 Apr 2021 03:09:16 +0200 core: don't hard-code hex node lengths
Joerg Sonnenberger <joerg@bec.de> [Fri, 30 Apr 2021 03:09:16 +0200] rev 47041
core: don't hard-code hex node lengths Differential Revision: https://phab.mercurial-scm.org/D10535
Fri, 30 Apr 2021 02:25:10 +0200 tests: bump default timeout to 360s stable
Joerg Sonnenberger <joerg@bec.de> [Fri, 30 Apr 2021 02:25:10 +0200] rev 47040
tests: bump default timeout to 360s A number of tests hit or almost hit the default limit even on modern hardware. While the tests are ideally split into smaller pieces, that's non-trivial work. HyperThreading and similar technologies can trigger this often, even without any other load on the machine. Differential Revision: https://phab.mercurial-scm.org/D10534
Mon, 03 May 2021 02:33:00 +0200 enforcesinglehead-test: add the expected node output next to the error
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 03 May 2021 02:33:00 +0200] rev 47039
enforcesinglehead-test: add the expected node output next to the error this make it simpler to validate that the test is correct. Differential Revision: https://phab.mercurial-scm.org/D10545
Thu, 08 Apr 2021 00:34:16 +0200 revlog: code for `revlogv0` in its own module
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Apr 2021 00:34:16 +0200] rev 47038
revlog: code for `revlogv0` in its own module This code is mostly unused compatiblity code. Yet it take a prohiminent place in the `revlog.py` module. That module is already quite big, so we move all that code in a dedicated module. Differential Revision: https://phab.mercurial-scm.org/D10511
Thu, 01 Apr 2021 11:31:54 +0200 revlog: have an explicit "pack_header" method
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Apr 2021 11:31:54 +0200] rev 47037
revlog: have an explicit "pack_header" method Having to pass the version header when retrieving the binary version of every single entry is a bit silly. So we extract that special logic in its own method. This also prepare the move to newer revlog format, not storing the header within an actual entry… Differential Revision: https://phab.mercurial-scm.org/D10510
Sat, 01 May 2021 14:47:39 +0200 revlog: remove the revlogio class
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 01 May 2021 14:47:39 +0200] rev 47036
revlog: remove the revlogio class The class only contains a single `parseindex` method. Lets just make it a function and remove the `revlogio` class. It served us well but became thinner and thinner overtime. Differential Revision: https://phab.mercurial-scm.org/D10509
Sat, 01 May 2021 14:47:33 +0200 revlog: fix some comment style
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 01 May 2021 14:47:33 +0200] rev 47035
revlog: fix some comment style They displease check-code. Differential Revision: https://phab.mercurial-scm.org/D10542
Thu, 08 Apr 2021 00:01:11 +0200 revlog: add a `entry_binary` method on index
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Apr 2021 00:01:11 +0200] rev 47034
revlog: add a `entry_binary` method on index The revlog index is already responsible for unpacking the binary entry, it would be simpler to make it responsible for packing them. In practice the C version of the index is already doing this internally. We introduce a "entry_binary" method that return the binary version of an existing revision. The method currently need to also take the revlog header to deal with the "first revision" special case. We will introduce further refactor in a later changeset to split that logic out. Differential Revision: https://phab.mercurial-scm.org/D10508
Thu, 15 Apr 2021 12:08:34 +0200 template: make an explicit closure for formatting entry in peerurls
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 12:08:34 +0200] rev 47033
template: make an explicit closure for formatting entry in peerurls This is about to be become significantly more complicated as `ui.path[x]` will become a list. Differential Revision: https://phab.mercurial-scm.org/D10443
Thu, 15 Apr 2021 11:50:08 +0200 template: use `list_paths` in `peerurls`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 11:50:08 +0200] rev 47032
template: use `list_paths` in `peerurls` Using common code will make it simpler to update the logic behind the path definition and storage. Differential Revision: https://phab.mercurial-scm.org/D10442
Thu, 15 Apr 2021 11:48:29 +0200 paths: use `list_paths` in `hg paths`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 11:48:29 +0200] rev 47031
paths: use `list_paths` in `hg paths` Using common code will make it simpler to update the logic behind the path definition and storage. Differential Revision: https://phab.mercurial-scm.org/D10441
Thu, 15 Apr 2021 11:46:31 +0200 urlutil: introduce a new `list_paths` function
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 11:46:31 +0200] rev 47030
urlutil: introduce a new `list_paths` function This function will be useful for command and template that wants to display path related information. Differential Revision: https://phab.mercurial-scm.org/D10440
Thu, 15 Apr 2021 10:05:51 +0200 urlutil: deprecate `getpath`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 10:05:51 +0200] rev 47029
urlutil: deprecate `getpath` There as no remaining user of that function. Differential Revision: https://phab.mercurial-scm.org/D10439
Thu, 15 Apr 2021 10:01:44 +0200 urlutil: inline the relevant part of `getpath` in `get_push_paths`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 10:01:44 +0200] rev 47028
urlutil: inline the relevant part of `getpath` in `get_push_paths` The part that `get_push_paths` needs is quite simple, inclining will help us to deprecated `getpath`. Differential Revision: https://phab.mercurial-scm.org/D10438
Thu, 15 Apr 2021 09:50:56 +0200 url_util: introduce a `try_path` function
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 09:50:56 +0200] rev 47027
url_util: introduce a `try_path` function That function… try a build a path, returning None on failure. This helps us to simplify various part of the existing code. Differential Revision: https://phab.mercurial-scm.org/D10437
Tue, 20 Apr 2021 11:22:35 -0700 narrow: add more status messages when narrowing
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Apr 2021 11:22:35 -0700] rev 47026
narrow: add more status messages when narrowing Each of the steps I added status messages for in this patch frequently take minutes or tens of minutes for our internal users. It would be nice to also have a progress bar but that will have to come later. Differential Revision: https://phab.mercurial-scm.org/D10503
Tue, 20 Apr 2021 10:24:03 -0700 narrow: add progress-reporting when looking for local changes in `hg tracked`
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Apr 2021 10:24:03 -0700] rev 47025
narrow: add progress-reporting when looking for local changes in `hg tracked` Looking for local changes (changes not on the given remote) can take a long time, so we should have progress-reporting for it. Differential Revision: https://phab.mercurial-scm.org/D10501
Fri, 16 Apr 2021 16:21:26 -0700 chg: pass --no-profile to disable profiling when starting hg serve
Kyle Lippincott <spectral@google.com> [Fri, 16 Apr 2021 16:21:26 -0700] rev 47024
chg: pass --no-profile to disable profiling when starting hg serve If profiling is enabled via global/user config (as far as I can tell, this doesn't affect use of the --profile flag, but it probably does affect --config profiling.enabled=1), then the profiling data can be *cumulative* for the lifetime of the chg process. This leads to some "interesting" results where hg claims the walltime is something like 200s on a command that took only a second or two to run. Worse, however, is that with at least some profilers (such as the default "stat" profiler), this can cause a large slowdown while generating the profiler output. Differential Revision: https://phab.mercurial-scm.org/D10470
Fri, 16 Apr 2021 15:31:05 -0700 profiling: add --no-profile to disable profiling enabled via config
Kyle Lippincott <spectral@google.com> [Fri, 16 Apr 2021 15:31:05 -0700] rev 47023
profiling: add --no-profile to disable profiling enabled via config Differential Revision: https://phab.mercurial-scm.org/D10469
Fri, 16 Apr 2021 18:56:26 -0700 tests: fix test-chg to ignore a warning about being unable to set locale
Kyle Lippincott <spectral@google.com> [Fri, 16 Apr 2021 18:56:26 -0700] rev 47022
tests: fix test-chg to ignore a warning about being unable to set locale This is apparently coming from bash when bash is providing the sh that we're using to execute the .sh file generated by run-tests for this test. Bash on my machine: ``` $ sh --version GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. $ sh sh-5.1$ LC_CTYPE=unsupported_value echo hi sh: warning: setlocale: LC_CTYPE: cannot change locale (unsupported_value): No such file or directory hi ``` Differential Revision: https://phab.mercurial-scm.org/D10468
Tue, 27 Apr 2021 14:36:52 -0700 branch: delete obsolete message about changing branch of obsolete commit
Martin von Zweigbergk <martinvonz@google.com> [Tue, 27 Apr 2021 14:36:52 -0700] rev 47021
branch: delete obsolete message about changing branch of obsolete commit We now rely on `rewriteutil.precheck()` to check for divergence, so we don't need the extra check in `cmdutil.changebranch()`. The former check is a little less strict in that it allows you to rewrite a commit without non-obsolete successors. Differential Revision: https://phab.mercurial-scm.org/D10519
Tue, 23 Feb 2021 10:28:42 -0800 rewriteutil: check for divergence
Martin von Zweigbergk <martinvonz@google.com> [Tue, 23 Feb 2021 10:28:42 -0800] rev 47020
rewriteutil: check for divergence This code is adapted from the code in the evolve extension. It seems to be equivalent as far as the evolve extension's test suite can tell (the only impact when making their `precheck()` delegate to our version is that error messages are less detailed). I had to change the error message to work with "change branch of" being inserted as the action. Differential Revision: https://phab.mercurial-scm.org/D10518
Wed, 28 Apr 2021 08:48:10 -0700 rewriteutil: adapt "cannot %s while merging" to work with "change branch of"
Martin von Zweigbergk <martinvonz@google.com> [Wed, 28 Apr 2021 08:48:10 -0700] rev 47019
rewriteutil: adapt "cannot %s while merging" to work with "change branch of" `rewriteutil.precheck()` creates error messages by inserting a given verb into a sentence. The `hg branch -r` command passes in "change branch of" as the verb. That doesn't work well with "cannot %s while merging" (making it "cannot change branch of while merging"). Let's insert a "changeset" there to make it work better. Building sentences like this seems obviously bad for i18n, but fixing that is out of scope for this series, IMO. Differential Revision: https://phab.mercurial-scm.org/D10530
Thu, 11 Feb 2021 15:11:10 -0800 rewriteutil: point to help about instability when rewriting creates orphan
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Feb 2021 15:11:10 -0800] rev 47018
rewriteutil: point to help about instability when rewriting creates orphan This replicates the message from the evolve extension. Differential Revision: https://phab.mercurial-scm.org/D10517
Tue, 27 Apr 2021 14:59:45 -0700 help: add topic about evolution, based on text from evolve extension
Martin von Zweigbergk <martinvonz@google.com> [Tue, 27 Apr 2021 14:59:45 -0700] rev 47017
help: add topic about evolution, based on text from evolve extension I've taken the text produced by `hg help evolution` when the evolve extension is enabled and made that available by the same command with just hg core. Changes I've made: * Added "(EXPERIMENTAL)" to the title. (That doesn't hide the topic from `hg help`, though.) * Replaced old-style `experimental.evolution=<names>` config by new-style `experimental.evolution.<name>=true`. * Replaces a "obsolete markers" by "obsolescence markers". * Removed most content from "Current feature status". When the evolve extension is enabled, its help text takes precedence. Differential Revision: https://phab.mercurial-scm.org/D10516
Thu, 11 Feb 2021 15:02:57 -0800 rewriteutil: add devel warning if precheck is called with contexts
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Feb 2021 15:02:57 -0800] rev 47016
rewriteutil: add devel warning if precheck is called with contexts I'm trying to upstream parts from the evolve extension. This check exists there. Differential Revision: https://phab.mercurial-scm.org/D10515
Tue, 27 Apr 2021 11:02:41 -0700 rewriteutil: replace "null changeset" by "the null revision" in error message
Martin von Zweigbergk <martinvonz@google.com> [Tue, 27 Apr 2021 11:02:41 -0700] rev 47015
rewriteutil: replace "null changeset" by "the null revision" in error message The evolve extension uses "the null revision" and we seem to use that term much more frequently in core too. Differential Revision: https://phab.mercurial-scm.org/D10514
Tue, 20 Apr 2021 08:28:11 -0700 relnotes: copy contents of "next" to "5.8" and clear "next" stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Apr 2021 08:28:11 -0700] rev 47014
relnotes: copy contents of "next" to "5.8" and clear "next" The same procedure as every year^Wcycle. Unlike previous cycles, I haven't actually recorded the copy because we don't want to propagate further changes in "next" (from the stable branch) to "5.8". Differential Revision: https://phab.mercurial-scm.org/D10500
Tue, 20 Apr 2021 13:01:47 -0700 dirstateguard: use mktemp-like functionality to generate the backup filenames stable
Kyle Lippincott <spectral@google.com> [Tue, 20 Apr 2021 13:01:47 -0700] rev 47013
dirstateguard: use mktemp-like functionality to generate the backup filenames Previously these were generated with names like: `dirstate.backup.commit.<memory address of dirstateguard>` This could cause problems if two hg commands ran at the same time that used the same memory address, (which is apparently not uncommon if chg is involved), as memory addresses are not unique across processes. This issue was reported in the post-review comments on http://phab.mercurial-scm.org/D9952. Differential Revision: https://phab.mercurial-scm.org/D10504
Mon, 29 Mar 2021 01:52:06 +0200 node: replace nullid and friends with nodeconstants class
Joerg Sonnenberger <joerg@bec.de> [Mon, 29 Mar 2021 01:52:06 +0200] rev 47012
node: replace nullid and friends with nodeconstants class The introduction of 256bit hashes require changes to nullid and other constant magic values. Start pushing them down from repository and revlog where sensible. Differential Revision: https://phab.mercurial-scm.org/D9465
Sat, 24 Apr 2021 16:30:05 +0200 repoview: separate concerns in _filteredrepotypes comment stable
Georges Racinet <georges.racinet@octobus.net> [Sat, 24 Apr 2021 16:30:05 +0200] rev 47011
repoview: separate concerns in _filteredrepotypes comment The cited issue in Python bugtracker is closed, but hasn't been fixed. We've been able to use the attached example and reproduce it with Python 3.9. The point where it turns from needless stress on the GC to the an actual leak is when one factors in the fact that the GC was before Python 3.4 unable to collect some types (see PEP 442). Note that even with Python 2.7, the simple example of cycles due to __mro__ are collectable. This was seen again with the example attached on the CPython issue.
Fri, 23 Apr 2021 18:30:53 +0200 repoview: fix memory leak of filtered repo classes stable
Georges Racinet <georges.racinet@octobus.net> [Fri, 23 Apr 2021 18:30:53 +0200] rev 47010
repoview: fix memory leak of filtered repo classes The leak occurs in long-running server processes with extensions, and is measured at 110kB per request. Before this change, the contents of the `_filteredrepotypes` cache are not properly garbage collected, despite it begin a `WeakKeyDictionary`. Extensions have a tendency to generate a new repository class for each `localrepo` instantiation. Server processes based on `hgwebdir_mod` will instantiate a new `localrepo` for each HTTP request that involves a repository. As a result, with a testing process that repeatedly opens a repository with several extensions activated (`topic` notably among them), we see a steady increase in resident memory of 110kB per repository instantiation before this change. This is also true, if we call `gc.collect()` at each instantiation, like `hgwebdir_mod` does, or not. The cause of the leak is that the *values* aren't weak references. This change uses `weakref.ref` for the values, and this makes in our measurements the resident size increase drop to 5kB per repository instantiation, with no explicit call of `gc.collect()` at all. There is currently no reason to believe that this remaining leak of 5kB is related to or even due to Mercurial core. We've also seen evidence that `ui.ui` instances weren't properly garbage collected before the change (with the change, they are). This could explain why the figures are relatively high. In theory, the collection of weak references could lead to much more misses in the cache, so we measured the impact on the original case that was motivation for introducing that cache in 7e89bd0cfb86 (see also issue5043): `hg convert` of the mozilla-central repository. The bad news here is that there is a major memory leak there, both with and without the present changeset. There were no more cache misses, and we could see no more memory leak with this change: the resident size after importing roughly 100000 changesets was at 12.4GB before, and 12.5GB after. The small increase is mentioned for completeness only, and we believe that it should be ignored, at least as long as the main leak isn't fixed. At less than 1% of the main leak, even finding out whether it is merely noise would be wasteful. Original context where this was spotted and first mitigated: https://foss.heptapod.net/heptapod/heptapod/-/issues/466 The leak reduction was also obtained in Heptapod inner HTTP server, which amounts to the same as `hgwebdir_mod` for these questions. The measurements done with Python 3.9, similar figures seen with 3.8. More work on our side would be needed to give measurements with 2.7, because of testing server process does not support it.
Sat, 24 Apr 2021 15:46:39 +0200 repoview: style change in newtype() cache handling stable
Georges Racinet <georges.racinet@octobus.net> [Sat, 24 Apr 2021 15:46:39 +0200] rev 47009
repoview: style change in newtype() cache handling This way of writing it does not change the logic at all, but is more fit for the change we want to make in the next changeset. If anything, that's one dict lookup less in the hot path, but that should be non measurable.
Thu, 22 Apr 2021 02:57:30 +0200 tests: don't hard-code /bin/bash stable
Joerg Sonnenberger <joerg@bec.de> [Thu, 22 Apr 2021 02:57:30 +0200] rev 47008
tests: don't hard-code /bin/bash From Thomas Klausner in pkgsrc. Differential Revision: https://phab.mercurial-scm.org/D10507
Wed, 21 Apr 2021 17:59:14 +0200 lint: fix failing code check stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 21 Apr 2021 17:59:14 +0200] rev 47007
lint: fix failing code check 8d2b62d716b0 introduced code that `test-check-code.t` wasn't happy about, this fixes it. Differential Revision: https://phab.mercurial-scm.org/D10506
Wed, 14 Apr 2021 09:49:36 -0400 typing: enable pytype processing on mercurial/upgrade_utils/actions.py stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 14 Apr 2021 09:49:36 -0400] rev 47006
typing: enable pytype processing on mercurial/upgrade_utils/actions.py This was the suggested workaround for the pytype bug that caused this file to be processed forever. Differential Revision: https://phab.mercurial-scm.org/D10460
Sun, 18 Apr 2021 00:56:09 -0400 incoming: use bytes for an error message stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 18 Apr 2021 00:56:09 -0400] rev 47005
incoming: use bytes for an error message Caught by pytype. Differential Revision: https://phab.mercurial-scm.org/D10461
Wed, 21 Apr 2021 10:58:42 -0400 merge: stable heads stable
Augie Fackler <augie@google.com> [Wed, 21 Apr 2021 10:58:42 -0400] rev 47004
merge: stable heads I forgot to pull before rolling rc1, so we just have a couple of patches that missed the rc1 train. Mea culpa.
Wed, 21 Apr 2021 10:49:29 -0400 Added signature for changeset 8d2b62d716b0 stable
Augie Fackler <raf@durin42.com> [Wed, 21 Apr 2021 10:49:29 -0400] rev 47003
Added signature for changeset 8d2b62d716b0
Wed, 21 Apr 2021 10:49:28 -0400 Added tag 5.8rc1 for changeset 8d2b62d716b0 stable
Augie Fackler <raf@durin42.com> [Wed, 21 Apr 2021 10:49:28 -0400] rev 47002
Added tag 5.8rc1 for changeset 8d2b62d716b0
Tue, 20 Apr 2021 16:31:13 +0200 relnote: mention a nodemap bug fixes stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 16:31:13 +0200] rev 47001
relnote: mention a nodemap bug fixes The fix was in a3720569a43f. Differential Revision: https://phab.mercurial-scm.org/D10499
Tue, 20 Apr 2021 16:29:05 +0200 relnote: document the use of persistent-nodemap by default for Rust build stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 16:29:05 +0200] rev 47000
relnote: document the use of persistent-nodemap by default for Rust build Differential Revision: https://phab.mercurial-scm.org/D10498
Tue, 20 Apr 2021 16:18:43 +0200 relnode: document the move to `zstd` as default compression stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 16:18:43 +0200] rev 46999
relnode: document the move to `zstd` as default compression Differential Revision: https://phab.mercurial-scm.org/D10497
Tue, 20 Apr 2021 16:12:19 +0200 relnote: clarify the backward compatibility entry about p1/p2 swap stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 16:12:19 +0200] rev 46998
relnote: clarify the backward compatibility entry about p1/p2 swap The previous message might read a bit scary. So we clarify that the nodeid are not affected. Differential Revision: https://phab.mercurial-scm.org/D10496
Tue, 20 Apr 2021 23:31:36 -0400 mail: add a TODO about proper mbox locking stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Apr 2021 23:31:36 -0400] rev 46997
mail: add a TODO about proper mbox locking Per @nbjoerg in IRC, the mbox isn't locked correctly. Differential Revision: https://phab.mercurial-scm.org/D10505
Tue, 20 Apr 2021 20:35:46 +0200 packaging: extract pre-computed version when running from plain tarball stable 5.8rc1
Joerg Sonnenberger <joerg@bec.de> [Tue, 20 Apr 2021 20:35:46 +0200] rev 46996
packaging: extract pre-computed version when running from plain tarball The tarballs created by setup.py are not including the usual archive markers that `hg archive` leaves, so the rewrite of the version number computation actually left the empty version string around. This meant that installations from PyPI would use 0.0.0 as version string. Differential Revision: https://phab.mercurial-scm.org/D10502
Tue, 20 Apr 2021 11:12:20 -0400 Added signature for changeset f67b8946bb1b stable
Augie Fackler <raf@durin42.com> [Tue, 20 Apr 2021 11:12:20 -0400] rev 46995
Added signature for changeset f67b8946bb1b
Tue, 20 Apr 2021 11:12:19 -0400 Added tag 5.8rc0 for changeset f67b8946bb1b stable
Augie Fackler <raf@durin42.com> [Tue, 20 Apr 2021 11:12:19 -0400] rev 46994
Added tag 5.8rc0 for changeset f67b8946bb1b
Tue, 20 Apr 2021 11:01:06 -0400 merge: default into stable for 5.8 rc stable 5.8rc0
Augie Fackler <augie@google.com> [Tue, 20 Apr 2021 11:01:06 -0400] rev 46993
merge: default into stable for 5.8 rc
Mon, 19 Apr 2021 20:38:52 -0400 mail: force SMTPException to bytes before wrapping in error.Abort
Matt Harbison <matt_harbison@yahoo.com> [Mon, 19 Apr 2021 20:38:52 -0400] rev 46992
mail: force SMTPException to bytes before wrapping in error.Abort Pytype wasn't complaining about this for some reason, but PyCharm was and we already handle another instance of this exception the same way in this function. Differential Revision: https://phab.mercurial-scm.org/D10473
Mon, 19 Apr 2021 17:26:57 -0400 mail: split out the SMTP login to allow the keyring extension to wrap it
Matt Harbison <matt_harbison@yahoo.com> [Mon, 19 Apr 2021 17:26:57 -0400] rev 46991
mail: split out the SMTP login to allow the keyring extension to wrap it The keyring extension only needs to tweak this tiny section of the larger function. But without any place to intercept the username/password fetching, it copy/pasted the entire function, and has grown a bunch of compatibility hacks to support older versions of Mercurial as well. Differential Revision: https://phab.mercurial-scm.org/D10471
Tue, 20 Apr 2021 04:27:03 +0200 store: exclude `undo.` nodemap's file from `walk`
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 04:27:03 +0200] rev 46990
store: exclude `undo.` nodemap's file from `walk` There are "temporary" local file that we should not be transfered by `walk` user like local clone and stream clone. This fix the small issue that the new tests highlighted. Differential Revision: https://phab.mercurial-scm.org/D10482
Tue, 20 Apr 2021 05:08:55 +0200 streamclone: treat volatile file as "fullfile"
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 20 Apr 2021 05:08:55 +0200] rev 46989
streamclone: treat volatile file as "fullfile" The nodemap related file might change (or get deleted) during the stream clone in a way incompatible with the streaming process. So we introduce a new flag for this type of file and integrate it with the existing `revlog_type` field recently added to `store.walk` returns. We use that new flat to dispatch such file to the existing mechanism for "atomic replacement" file for the nodemap docket and datafile. This fix the bugs we have been adding tests for. Strictly speaking, the nodemap datafile is happened only a could maybe be used in a slightly more efficient way, however this is good enough for now. Differential Revision: https://phab.mercurial-scm.org/D10481
Mon, 19 Apr 2021 20:47:46 +0200 nodemap: add a test about nodemap "vacuum" during stream clone
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 20:47:46 +0200] rev 46988
nodemap: add a test about nodemap "vacuum" during stream clone When the nodemap "vacuum" it generate a new datafile, with a new unique name and delete the old one. This confuse the stream clone code and create the same kind of crash we were seeing in the previous patch. We build a test case where this happens. The next changeset will contains a fix We can also notice that we are, wrongfully exchanging `undo.*` files that the client will not be able to use. This will be dealt with soon. Differential Revision: https://phab.mercurial-scm.org/D10480
Mon, 19 Apr 2021 20:24:13 +0200 nodemap: add a test about racy commit during stream clone
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 20:24:13 +0200] rev 46987
nodemap: add a test about racy commit during stream clone That test show that the resulting client nodemap is different from the server one. This happens because the server one transferred a corrupted node map. The data file match the pre-commit content while the docket has post commit content. As the result the nodemap was detected invalid and recomputed. When running without the rust implementation, the code is also generating a new datafile unconditionally, This mean the older file is no longer there are transfer time, resulting in a crash. We will fix this issue later, but we start with writing tests highlighting the issue. Differential Revision: https://phab.mercurial-scm.org/D10479
Mon, 19 Apr 2021 19:12:28 +0200 streamclone: remove sleep based "synchronisation" in tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 19:12:28 +0200] rev 46986
streamclone: remove sleep based "synchronisation" in tests Sleep based test synchronisation does not work. Variation in machine performance and load can make the two process miss their windows. Instead we migrate to explicit signaling through the file system as other tests file are using. Differential Revision: https://phab.mercurial-scm.org/D10478
Mon, 19 Apr 2021 19:10:49 +0200 testing: add a `write_file` function
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 19:10:49 +0200] rev 46985
testing: add a `write_file` function The function is kinda trivial, but having a simple function avoid silly mistake. Differential Revision: https://phab.mercurial-scm.org/D10477
Mon, 19 Apr 2021 19:10:18 +0200 testing: add a utility function to wait for file create
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 19:10:18 +0200] rev 46984
testing: add a utility function to wait for file create This is similar to `tests/testlib/wait-on-file`, but for the python code Differential Revision: https://phab.mercurial-scm.org/D10476
Mon, 19 Apr 2021 19:09:18 +0200 streamclone: check the errors log in tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 19:09:18 +0200] rev 46983
streamclone: check the errors log in tests Code can be buggy, in that case having error message tend to help. Differential Revision: https://phab.mercurial-scm.org/D10475
Tue, 20 Apr 2021 00:23:56 -0400 mail: use a context manager when writing to mbox
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Apr 2021 00:23:56 -0400] rev 46982
mail: use a context manager when writing to mbox Differential Revision: https://phab.mercurial-scm.org/D10484
Mon, 19 Apr 2021 21:31:24 -0700 errors: remove unnecessary varargs handling from OutOfBandError
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Apr 2021 21:31:24 -0700] rev 46981
errors: remove unnecessary varargs handling from OutOfBandError In my recent D10465, I moved some code over from scmutil into `OutOfBandError.__init__`. The code was written to deal with an arbitrary number of `message` arguments to the constructor. It turns out that we only ever pass 0 or 1. Given that, let's simplify it. Differential Revision: https://phab.mercurial-scm.org/D10483
Mon, 19 Apr 2021 11:10:16 +0200 phab-refresh: use a special comment on the stable branch
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 11:10:16 +0200] rev 46980
phab-refresh: use a special comment on the stable branch Phabricator make it hard to spot the branch information. As a result patch intended for stable are consistently queued for default. We add a special command and flashy GIF to try to attract reviewer attention on the fact patch are intended for stable. Differential Revision: https://phab.mercurial-scm.org/D10464
Mon, 19 Apr 2021 11:04:11 +0200 phab-refresh: extract the comment in a variable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 19 Apr 2021 11:04:11 +0200] rev 46979
phab-refresh: extract the comment in a variable This make the script more readable and it is about to become more complex. Differential Revision: https://phab.mercurial-scm.org/D10463
Mon, 19 Apr 2021 16:53:45 -0700 tests: make test-archive.t pass on py3.9 (issue6504)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Apr 2021 16:53:45 -0700] rev 46978
tests: make test-archive.t pass on py3.9 (issue6504) Something got stricter at parsing URL query parameters and now the parameters need to be separated by "&"; ";" is no longer allowed. See issue6504 for details. Differential Revision: https://phab.mercurial-scm.org/D10472
Mon, 19 Apr 2021 12:52:23 -0700 errors: raise RemoteError in some places in exchange.py
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Apr 2021 12:52:23 -0700] rev 46977
errors: raise RemoteError in some places in exchange.py This is part of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan Differential Revision: https://phab.mercurial-scm.org/D10467
Mon, 19 Apr 2021 09:37:01 -0700 errors: introduce a class for remote errors
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Apr 2021 09:37:01 -0700] rev 46976
errors: introduce a class for remote errors Having an exception for remote errors makes it much easier to exit with the right detailed exit code. Differential Revision: https://phab.mercurial-scm.org/D10466
Mon, 19 Apr 2021 10:49:15 -0700 errors: make OutOfBandError extend Abort
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Apr 2021 10:49:15 -0700] rev 46975
errors: make OutOfBandError extend Abort I'm about to create a new `RemoteError` exception and make `OutOfBandError` extend it. This patch prepares for that. Differential Revision: https://phab.mercurial-scm.org/D10465
Mon, 05 Apr 2021 12:22:25 +0200 revlog: replace revlog._io.size with a new revlog.index.entry_size
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Apr 2021 12:22:25 +0200] rev 46974
revlog: replace revlog._io.size with a new revlog.index.entry_size The `revlogio` class is mostly a relic from the past. Once in charge of the full revlog related Input/Output code, that class gradually lost responsibilities to the point where more IO are now done by `revlog.index` objects or revlog objects themself. I would like to ultimately remove the `revlogio` class, to do so I start simple with move the "entry size" information on the index. (The index is already responsible of the binary unpacking, so it knows the size. Differential Revision: https://phab.mercurial-scm.org/D10309
Wed, 14 Apr 2021 20:32:53 +0200 perf-discovery: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:32:53 +0200] rev 46973
perf-discovery: use `get_unique_pull_path` This performance command now use the new API, unless the benchmarked Mercurial is older. Differential Revision: https://phab.mercurial-scm.org/D10423
Wed, 14 Apr 2021 00:38:25 +0800 help: clarify when `$HG_URL` and `$HG_SOURCE` are added in hooks
Aay Jay Chan <aayjaychan@itopia.com.hk> [Wed, 14 Apr 2021 00:38:25 +0800] rev 46972
help: clarify when `$HG_URL` and `$HG_SOURCE` are added in hooks Differential Revision: https://phab.mercurial-scm.org/D10400
Fri, 16 Apr 2021 15:39:00 +0200 nodemap: deal with data mmap error
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 15:39:00 +0200] rev 46971
nodemap: deal with data mmap error If the file is too small, the mmapread call would raise a ValueError. We catch that and ignore nodemap content (as we do without mmap). This make the repository slightly slower (until the next write) but usable. Unlike the current crash. Differential Revision: https://phab.mercurial-scm.org/D10458
Fri, 16 Apr 2021 14:59:13 +0200 nodemap: test various corruption scenario for the persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 14:59:13 +0200] rev 46970
nodemap: test various corruption scenario for the persistent nodemap Corruption can happens in the wild, either because some of our code is buggy or because repository were shared/transfered in a strange manners. Currently one of the corruption case (not enough data) lead to a crash. We add explicit tests for theses cases. Differential Revision: https://phab.mercurial-scm.org/D10457
Sat, 17 Apr 2021 00:28:21 -0400 cmdutil: fix an uninitialize variable usage in clearunfinished()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 17 Apr 2021 00:28:21 -0400] rev 46969
cmdutil: fix an uninitialize variable usage in clearunfinished() I happened to notice that PyCharm flagged this while looking for something else. I'm pretty sure it meant to check the current state in the iteration, and not keep reusing the last one in the previous iteration. Differential Revision: https://phab.mercurial-scm.org/D10459
Mon, 05 Apr 2021 14:19:17 +0800 help: document `$HG_NEW_OBSMARKERS` in pretxnclose hook
Aay Jay Chan <aayjaychan@itopia.com.hk> [Mon, 05 Apr 2021 14:19:17 +0800] rev 46968
help: document `$HG_NEW_OBSMARKERS` in pretxnclose hook Differential Revision: https://phab.mercurial-scm.org/D10399
Thu, 01 Apr 2021 22:43:55 +0800 help: prepend environment variables used in hooks with "$"
Aay Jay Chan <aayjaychan@itopia.com.hk> [Thu, 01 Apr 2021 22:43:55 +0800] rev 46967
help: prepend environment variables used in hooks with "$" Most of them have "$" prefix but some don't, so adding it for consistency. Differential Revision: https://phab.mercurial-scm.org/D10398
Thu, 15 Apr 2021 09:59:12 +0200 revset: drop an outdated comment
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 09:59:12 +0200] rev 46966
revset: drop an outdated comment There is not `ui.expandpath` call there anymore. Differential Revision: https://phab.mercurial-scm.org/D10435
Thu, 15 Apr 2021 01:03:12 +0200 ui: deprecated `ui.expandpath`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 01:03:12 +0200] rev 46965
ui: deprecated `ui.expandpath` This function return a single path, something incompatible with the coming change to `[paths]` definition to allow multiple associated urls. Now that all user got migrated, we deprecate the function. Differential Revision: https://phab.mercurial-scm.org/D10432
Wed, 14 Apr 2021 21:29:27 +0200 urlutil: remove usage of `ui.expandpath` in `get_clone_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:29:27 +0200] rev 46964
urlutil: remove usage of `ui.expandpath` in `get_clone_path` We want to deprecate `ui.expandpath` and simplify the code before adding more complexity in the form of `[paths]` entry pointing to multiple url. So we inline the relevant bits. Differential Revision: https://phab.mercurial-scm.org/D10431
Wed, 14 Apr 2021 21:27:00 +0200 urlutil: remove usage of `ui.expandpath` in `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:27:00 +0200] rev 46963
urlutil: remove usage of `ui.expandpath` in `get_unique_pull_path` We want to deprecate `ui.expandpath` and simplify the code before adding more complexity in the form of `[paths]` entry pointing to multiple url. So we inline the relevant bits. Differential Revision: https://phab.mercurial-scm.org/D10430
Wed, 14 Apr 2021 21:20:58 +0200 urlutil: remove usage of `ui.expandpath` in `get_pull_paths`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:20:58 +0200] rev 46962
urlutil: remove usage of `ui.expandpath` in `get_pull_paths` We want to deprecate `ui.expandpath` and simplify the code before adding more complexity in the form of `[paths]` entry pointing to multiple url. So we inline the relevant bits. Differential Revision: https://phab.mercurial-scm.org/D10429
Wed, 14 Apr 2021 21:15:53 +0200 debugbackupbundle: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:15:53 +0200] rev 46961
debugbackupbundle: use `get_unique_pull_path` This is the last known user of `ui.expandpath` outside of `urlutil`. Hooray. Differential Revision: https://phab.mercurial-scm.org/D10428
Wed, 14 Apr 2021 21:15:22 +0200 debugssl: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:15:22 +0200] rev 46960
debugssl: use `get_unique_pull_path` Let's move this code to the new API. Differential Revision: https://phab.mercurial-scm.org/D10427
Wed, 14 Apr 2021 21:11:39 +0200 debugdiscovery: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:11:39 +0200] rev 46959
debugdiscovery: use `get_unique_pull_path` Lets move this code to the new API. Differential Revision: https://phab.mercurial-scm.org/D10426
Wed, 14 Apr 2021 21:02:38 +0200 profiling: use `util.expandpath` instead of `ui.expandpath` for output
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 21:02:38 +0200] rev 46958
profiling: use `util.expandpath` instead of `ui.expandpath` for output Given we are talking about the path to an output file, I am fairly certain that the initial author meant to expand `~` and the like and not to resolve entry from `[paths]`. Differential Revision: https://phab.mercurial-scm.org/D10425
Wed, 14 Apr 2021 20:57:34 +0200 dispatch: use the new API to resolve --repository
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:57:34 +0200] rev 46957
dispatch: use the new API to resolve --repository An even weirder feature of Mercurial is the ability to use `[paths]` alias as value of `--repository`. The weird feature now use the new APIs. Differential Revision: https://phab.mercurial-scm.org/D10424
Wed, 14 Apr 2021 20:21:11 +0200 revset: use `get_unique_pull_path` for `remote(…)`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:21:11 +0200] rev 46956
revset: use `get_unique_pull_path` for `remote(…)` This one is also resolving path. For now we restrict the feature to a single destination. This might change in the future. Differential Revision: https://phab.mercurial-scm.org/D10422
Wed, 14 Apr 2021 20:15:09 +0200 remotefilelog: use `get_unique_pull_path` in `getflogheads`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 20:15:09 +0200] rev 46955
remotefilelog: use `get_unique_pull_path` in `getflogheads` Another command moved to the new API, hooray. Differential Revision: https://phab.mercurial-scm.org/D10421
Wed, 14 Apr 2021 19:30:48 +0200 summary: use the new APIs
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 19:30:48 +0200] rev 46954
summary: use the new APIs Summary can perform some incoming/outgoing queries (that should be common to the other command with the same needs, but that is another story). We now use the new APIs to do so. The current code behavior is a bit fishy, relying to the fact "default" will be picked as the destination in last resort. I did not altered that, but left various comment to highlight the issue. Differential Revision: https://phab.mercurial-scm.org/D10420
Wed, 14 Apr 2021 18:37:29 +0200 share: use `get_clone_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 18:37:29 +0200] rev 46953
share: use `get_clone_path` Since `hg share` is mostly like clone, do the same changes there. Differential Revision: https://phab.mercurial-scm.org/D10419
Wed, 14 Apr 2021 18:02:25 +0200 init: use `get_clone_path` when suitable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 18:02:25 +0200] rev 46952
init: use `get_clone_path` when suitable `hg init` has this weird feature were you can refer to `[paths]` entry select the path to initialize. We move that code to the new APIs. Differential Revision: https://phab.mercurial-scm.org/D10418
Wed, 14 Apr 2021 18:34:42 +0200 clone: use `get_clone_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 18:34:42 +0200] rev 46951
clone: use `get_clone_path` "Surprisingly", the new API is well suited for `hg clone` too. Differential Revision: https://phab.mercurial-scm.org/D10417
Wed, 14 Apr 2021 17:41:02 +0200 incoming: kill the `repo._subtoppath =` hack
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 17:41:02 +0200] rev 46950
incoming: kill the `repo._subtoppath =` hack We do the same as for `hg outgoing`, instead of relying on implicit passing value by monkey punching them onto the repo object, we pass equivalent information by argument to the proper function. This is way cleaner. Differential Revision: https://phab.mercurial-scm.org/D10416
Wed, 14 Apr 2021 17:29:27 +0200 identify: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 17:29:27 +0200] rev 46949
identify: use `get_unique_pull_path` The command only support a single destination. We use the associated API. Differential Revision: https://phab.mercurial-scm.org/D10415
Wed, 14 Apr 2021 17:02:20 +0200 bundle: support multiple destinations
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 17:02:20 +0200] rev 46948
bundle: support multiple destinations `hg outgoing` and `hg push` now support multiple destination. We do the same for `hg bundle`. Various other commands needs this kind of behavior and it would be create to factor this code out for their usage. However this is an adventure for another time. They are some minor change to the tests (in addition to the new test for the feature): * one because I updated a message to plurals, * another one because the error changed, and I actually find it clearer. Differential Revision: https://phab.mercurial-scm.org/D10414
Wed, 14 Apr 2021 14:35:13 +0200 lfs: use the new APIs
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 14:35:13 +0200] rev 46947
lfs: use the new APIs The part of the lfs store that requires a destination cannot operate on multiple destination (yet). So we move them to the dedicated APIs. Differential Revision: https://phab.mercurial-scm.org/D10413
Wed, 14 Apr 2021 13:06:09 +0200 fastannotate: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 13:06:09 +0200] rev 46946
fastannotate: use `get_unique_pull_path` The code does not support multiple destination yet, so lets move it to the dedicated API. Differential Revision: https://phab.mercurial-scm.org/D10412
Wed, 14 Apr 2021 12:57:55 +0200 remotefilelog: use the right expandpath in to expand `~`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 12:57:55 +0200] rev 46945
remotefilelog: use the right expandpath in to expand `~` Given the context where path is most likely a file system path, I suspect that the initial author confused ui.expandpath and util.expandpath (a proxy for os.path.expanduser and co) Differential Revision: https://phab.mercurial-scm.org/D10411
Fri, 16 Apr 2021 10:46:56 +0200 transplant: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 10:46:56 +0200] rev 46944
transplant: use `get_unique_pull_path` The command does not support multiple destination (yet). Differential Revision: https://phab.mercurial-scm.org/D10410
Fri, 16 Apr 2021 10:46:52 +0200 infinitepush: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 16 Apr 2021 10:46:52 +0200] rev 46943
infinitepush: use `get_unique_pull_path` The extension does not support multiple destination (yet). Differential Revision: https://phab.mercurial-scm.org/D10456
Wed, 14 Apr 2021 12:29:44 +0200 relink: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 12:29:44 +0200] rev 46942
relink: use `get_unique_pull_path` The code does not support multiple destination and will probably never do so. So lets use the dedicated API for this case. Differential Revision: https://phab.mercurial-scm.org/D10409
Wed, 14 Apr 2021 12:01:27 +0200 histedit: use `get_unique_push_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 12:01:27 +0200] rev 46941
histedit: use `get_unique_push_path` Same as for `pathbomb`, this code does not support multiple destinations yet. It might in the future, probably with code put in common with patchwork, but for now lets use the dedicated API. Differential Revision: https://phab.mercurial-scm.org/D10408
Wed, 14 Apr 2021 11:57:20 +0200 urlutil: add a new `get_unique_push_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 11:57:20 +0200] rev 46940
urlutil: add a new `get_unique_push_path` This function is dedicated to call that needs a single destination. Currently most caller actually need that since few actually support multiple destinations (the most importants `hg push` and `hg outgoing` do). So having a clear API point for that will be important when the time comes to have a single `[paths]` alias resolving to multiple urls. Differential Revision: https://phab.mercurial-scm.org/D10407
Wed, 14 Apr 2021 11:38:10 +0200 fetch: use `get_unique_pull_path` to retrieve the path
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 11:38:10 +0200] rev 46939
fetch: use `get_unique_pull_path` to retrieve the path The fetch command does not support multiple destination, so we use the new dedicated API for that. Differential Revision: https://phab.mercurial-scm.org/D10406
Wed, 14 Apr 2021 11:30:49 +0200 patchbomb: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 11:30:49 +0200] rev 46938
patchbomb: use `get_unique_pull_path` The patchbomb code does not support multiple destinations yet. It would not be too hard to implemented since `hg outgoing` does. However that is a bit too much of a detour right now. In addition that kind of "select outgoing changesets for processing" code exist for various commands so the best would be to factor it out later. Let us use the dedicated API until this is solved. This comes with a small output change in the test that I find more accurate. So I kept it. Differential Revision: https://phab.mercurial-scm.org/D10405
Wed, 14 Apr 2021 11:18:48 +0200 narrow: use `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 11:18:48 +0200] rev 46937
narrow: use `get_unique_pull_path` The narrow's `tracked` command does not support multiple destination, lets use the dedicated API then. Differential Revision: https://phab.mercurial-scm.org/D10404
Wed, 14 Apr 2021 11:15:54 +0200 urlutil: add a new `get_unique_pull_path`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 11:15:54 +0200] rev 46936
urlutil: add a new `get_unique_pull_path` This function is dedicated to call that needs a single destination. Currently most caller actually need that since few actually support multiple destinations (the most importants `hg push` and `hg outgoing` do). So having a clear API point for that will be important when the time comes to have a single `[paths]` alias resolving to multiple urls. Differential Revision: https://phab.mercurial-scm.org/D10403
Wed, 14 Apr 2021 10:51:31 +0200 mq: use the new `get_clone_path` to get the remote url
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 10:51:31 +0200] rev 46935
mq: use the new `get_clone_path` to get the remote url We stop using `ui.expandpath` to use a function with a more defined semantic. This will help us to make it an option to point [paths] entry to multiple destination. Differential Revision: https://phab.mercurial-scm.org/D10402
Wed, 14 Apr 2021 10:35:40 +0200 urlutil: add a `get_clone_path` function
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 10:35:40 +0200] rev 46934
urlutil: add a `get_clone_path` function We add a new function with a semantic focussed on `clone` operation (so without an existing repository). I am not certain the return type is the best, but this is what we need for now. Once all caller are migrated we might start thinking about that the API should be. For now that will do. Differential Revision: https://phab.mercurial-scm.org/D10401
Sun, 11 Apr 2021 19:18:54 +0200 outgoing: use `get_push_paths` in the revset too
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 11 Apr 2021 19:18:54 +0200] rev 46933
outgoing: use `get_push_paths` in the revset too The revsets now use the same code as everyone and is ready for entry in `[paths]` pointing to multiple entries. Differential Revision: https://phab.mercurial-scm.org/D10393
Wed, 14 Apr 2021 02:14:15 +0200 incoming: use `urlutil.get_pull_paths`
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 02:14:15 +0200] rev 46932
incoming: use `urlutil.get_pull_paths` Lets use the new method to increase code reuse. However I did not implement support for multiple source yet. It would be possible create multiple temporary bundle, but that is a bit too much work outside of my current route to make the detour. Differential Revision: https://phab.mercurial-scm.org/D10392
Wed, 14 Apr 2021 01:26:44 +0200 outgoing: accept multiple destinations
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Apr 2021 01:26:44 +0200] rev 46931
outgoing: accept multiple destinations This align the behavior of `hg outgoing` with the one of `hg incoming`. In addition this prepare the introduction of having simple `path` resolve to multiple destination in practice (eg: `default`) Differential Revision: https://phab.mercurial-scm.org/D10391
Thu, 15 Apr 2021 09:23:28 +0200 outgoing: pass subrepo path using function argument instead of abssource hack
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 09:23:28 +0200] rev 46930
outgoing: pass subrepo path using function argument instead of abssource hack This is clearer, remove the needs for the `repo._subtoppath` hack and will make our live easier when making `outgoing` accept multiple destinations. Differential Revision: https://phab.mercurial-scm.org/D10390
Thu, 15 Apr 2021 09:23:19 +0200 subrepo: introduce a `repo_rel_or_abs_source` function
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Apr 2021 09:23:19 +0200] rev 46929
subrepo: introduce a `repo_rel_or_abs_source` function The `subrepoutil` module has various function to compute the path of a sub-repository compared to the root of the top repository. However, they was no function available to compute the relative path of the repository "source". And we need this information for exchange operation (in our case, `hg outgoing`). The information is currently build using the `repo._subtoppath` hack. We reuse the same logic but in a dedicated function independent of the `repo._subtoppath` hack. Differential Revision: https://phab.mercurial-scm.org/D10434
Wed, 14 Apr 2021 22:50:41 -0400 urlutil: use bytes for Abort messages
Matt Harbison <matt_harbison@yahoo.com> [Wed, 14 Apr 2021 22:50:41 -0400] rev 46928
urlutil: use bytes for Abort messages Caught by pytype. Also fix a minor grammar issue in the second message. Differential Revision: https://phab.mercurial-scm.org/D10433
Thu, 08 Apr 2021 16:41:13 +0200 changegroup: update comment
Raphaël Gomès <rgomes@octobus.net> [Thu, 08 Apr 2021 16:41:13 +0200] rev 46927
changegroup: update comment Gratuitous fix, I stumbled upon this comment while reading code. Differential Revision: https://phab.mercurial-scm.org/D10339
Mon, 12 Apr 2021 23:31:54 -0400 re2: adjust local variable assignment scope
Matt Harbison <matt_harbison@yahoo.com> [Mon, 12 Apr 2021 23:31:54 -0400] rev 46926
re2: adjust local variable assignment scope Pytype flagged the exception handler where these are used as `[name-error]`, and PyCharm complained they may be used before assignment. Differential Revision: https://phab.mercurial-scm.org/D10376
Sat, 13 Mar 2021 09:50:34 +0100 rhg: Make `files` work on repo-relative paths when possible
Simon Sapin <simon.sapin@octobus.net> [Sat, 13 Mar 2021 09:50:34 +0100] rev 46925
rhg: Make `files` work on repo-relative paths when possible When the current directory is outside of the repository we need to turn everything into absolute filesystem paths in order to compute correct relative paths. This was previously done unconditionally, but is not necessary when the current directory is inside the repository. With this change `rhg files > /dev/null` at the root of a mozilla-central snapshot goes from ~150 ms to ~70 ms. My repository is located at a somewhat long path though (93 bytes). The effect may not be as pronounced at a shorter path. Differential Revision: https://phab.mercurial-scm.org/D10200
Mon, 12 Apr 2021 19:25:34 -0700 split: avoid strip if split is a no-op (identical to original)
Kyle Lippincott <spectral@google.com> [Mon, 12 Apr 2021 19:25:34 -0700] rev 46924
split: avoid strip if split is a no-op (identical to original) Differential Revision: https://phab.mercurial-scm.org/D10389
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 tip