Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 May 2022 01:40:37 +0100] rev 49217
copies-sdc: no longer suppress the upgrade output
To make sure the upgrade simplification we need are taken into account, we need
to see more of the output of `debugupgraderepo`. The --quiet flag simplify the
output a lot and globing the `preserved` field mean this output should remains
stable across (future) unrelated changes.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 19 May 2022 01:37:59 +0100] rev 49216
copies-sdc: no longer use revlogv2 in `test-copies-in-changeset.t`
We only need changelog-v2 and its usage is automatically inferred. So we can
simplify the test by dropping this.
This is important to test future simplification of the update process in the
coming changesets.
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 16 May 2022 23:12:49 +0100] rev 49215
fix-ci: backed out changeset 308e45f7b455
The chg variant of the CI see a failure on `tests/test-narrow-pull.t`.
Bisecting point the failure as starting at this small changeset…
Backing it out, restore the CI on default. It was never broken on
stable, which is even more puzzling.
Raphaël Gomès <rgomes@octobus.net> [Tue, 17 May 2022 12:05:09 +0100] rev 49214
branching: merge stable into default
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 May 2022 07:36:37 -0700] rev 49213
branching: merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 21 Apr 2022 10:39:52 -0700] rev 49212
rust-repo: make `Send` by not storing functions in `LazyCell`
We (Google) want to use `Repo` in a context where we can store it in
`Mutex<Repo>`. However, that currently doesn't work because it's not
`Send` because the `LazyCell` initialization functions are not
`Send`. It's easy to fix that by passing them to the `get_or_init()`
and `get_mut_or_init()` functions. We'll probably also want `Repo` to
be `Send` (and even `Sync`) in core later, so this seems like a step
in the right direction.
Differential Revision: https://phab.mercurial-scm.org/D12582
Augie Fackler <augie@google.com> [Thu, 05 May 2022 14:45:28 -0400] rev 49211
obsolete: remove two unused constants
I'm not sure what these constants were intended for, but they have no
users so it's time to say goodbye.
Differential Revision: https://phab.mercurial-scm.org/D12609
Augie Fackler <augie@google.com> [Thu, 05 May 2022 14:47:26 -0400] rev 49210
node: manually implement Debug
I got too irritated today with the default Debug implementation of
hg::revlog::Node while playing with a new parser. This isn't quite
what I wanted, but it wasn't much code and it at least gives you
output that's easy to visually compare to a node.hex()ed identifier
from the Python side of things.
Sadly, this doesn't influence the output in lldb or the VSCode
debugger extension that uses lldb under the covers, but it at least
means debug prints are a little more useful.
Differential Revision: https://phab.mercurial-scm.org/D12608
Arseniy Alekseyev <aalekseyev@janestreet.com> [Thu, 05 May 2022 15:38:29 +0100] rev 49209
censor: make rhg fall back to python when encountering a censored node
This is to make it support censor.policy=ignore without having
to duplicate that logic.
Also, change the censor test in such a way that it uses rhg now,
because extensions are disabled except when we call [hg censor].
Differential Revision: https://phab.mercurial-scm.org/D12607
Matt Harbison <matt_harbison@yahoo.com> [Wed, 04 May 2022 16:01:55 -0400] rev 49208
contrib: migrate off of a couple of bitbucket URLs
I noticed this when diffing the thg installer against Mercurial to see what was
missing. There are a handful of other URLs in i18n and extension example help
text if anyone cares to update those.
Differential Revision: https://phab.mercurial-scm.org/D12606
Matt Harbison <matt_harbison@yahoo.com> [Wed, 04 May 2022 13:39:49 -0400] rev 49207
diff: add help text to highlight the ability to do "merge diffs"
Differential Revision: https://phab.mercurial-scm.org/D12605
Anton Shestakov <av6@dwimlabs.net> [Mon, 02 May 2022 12:10:28 +0400] rev 49206
followlines: don't put Unicode directly into the .js file (issue6559)
Apparently some web server setups may serve this file in a different encoding
than UTF-8, and that results in visual garbage in the followlines button that
renders for every line in a file. So instead of using this Unicode character in
UTF-8 we can encode it as \u2212. Or, to be more explicit, we can use −
HTML entity, which resolves into exactly that character.
Since now we're using innerHTML property to set the minus part of the button,
let's use it to set the plus part as well (even though the plus sign was plain
ASCII). A wise man once said "A foolish consistency is the hobgob... eh,
whatever." Throw a brick at me if this makes things worse.
Differential Revision: https://phab.mercurial-scm.org/D12597
Matt Harbison <matt_harbison@yahoo.com> [Thu, 28 Apr 2022 11:20:17 -0400] rev 49205
wix: bump the minimum Windows required to 8.1
PyOxidizer binaries are built with py 3.9.6, so not even Windows 7 is supported.
Unfortunately, there don't appear to be more recent values for newer versions of
Windows, but at least Windows 8.1 is still in extended support for another 9
months or so.
Differential Revision: https://phab.mercurial-scm.org/D12596
Matt Harbison <matt_harbison@yahoo.com> [Thu, 28 Apr 2022 11:01:41 -0400] rev 49204
wix: drop python2 conditionals
Differential Revision: https://phab.mercurial-scm.org/D12595
Anton Shestakov <av6@dwimlabs.net> [Wed, 27 Apr 2022 19:45:19 +0400] rev 49203
tests: fix misspelling of supersede
Differential Revision: https://phab.mercurial-scm.org/D12589
Martin von Zweigbergk <martinvonz@google.com> [Tue, 26 Apr 2022 09:06:30 -0700] rev 49202
filemerge: add configs to disable some or all partial merge tools
When rolling out partial merge tools to users, it's useful to be able
to easily turn one or all of them off if a problem is discovered. This
patch adds support for that. They can of course also be useful for
individual users to be able to temporarily turn off a tool they are
otherwise using.
Differential Revision: https://phab.mercurial-scm.org/D12588
Raphaël Gomès <rgomes@octobus.net> [Wed, 04 May 2022 18:17:44 +0200] rev 49201
branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 25 Apr 2022 11:09:33 +0200] rev 49200
branching: merge stable into default
This also added the small fix need in Rust tests for the new
`DirstateMap::pack_v2` API change in stable.
Kyle Lippincott <spectral@google.com> [Tue, 19 Apr 2022 12:17:23 -0700] rev 49199
amend: move "return None for removed files" into block handling filestoamend
This is just a small logic cleanup from D12573, no change in behavior.
Differential Revision: https://phab.mercurial-scm.org/D12576
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:35:25 +0200] rev 49198
rust-dirstatemap: remove unused helper from the old API
Differential Revision: https://phab.mercurial-scm.org/D12541
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:35:02 +0200] rev 49197
rust-status: stop using `state()` in the dispatch logic
Let's use the new API.
Differential Revision: https://phab.mercurial-scm.org/D12540
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:34:18 +0200] rev 49196
rust-status: stop using `state()` in `handle_normal_file`
Let's use the new API
Differential Revision: https://phab.mercurial-scm.org/D12539
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:30:34 +0200] rev 49195
rust-dirstatemap: stop using `state()` in the cache logic
Let's use the new API
Differential Revision: https://phab.mercurial-scm.org/D12538
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 16:24:25 +0200] rev 49194
rust-dirstatemap: stop using `.state` in `is_from_other_parent`
This is a deprecated API and will be removed one day.
Differential Revision: https://phab.mercurial-scm.org/D12537
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:29:21 +0200] rev 49193
rust-dirstate-entry: add `modified` method
This will also be used in other places later in the series.
Differential Revision: https://phab.mercurial-scm.org/D12536
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:27:56 +0200] rev 49192
rust: remove use of `EntryState` in `DirsMultiset`
Let's use the new API.
Differential Revision: https://phab.mercurial-scm.org/D12535
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:26:23 +0200] rev 49191
rust: use `entry.tracked()` directly
This is the new API
Differential Revision: https://phab.mercurial-scm.org/D12534
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Apr 2022 17:25:38 +0200] rev 49190
rust-hg-cpython: remove use of `EntryState`
Let's use the new API
Differential Revision: https://phab.mercurial-scm.org/D12533
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 18:10:12 +0200] rev 49189
rust-dirstatemap: use a checked sub instead of a potentially underflowing one
This was missed in 2593873cda0f
Differential Revision: https://phab.mercurial-scm.org/D12532
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 17:55:03 +0200] rev 49188
rust-dirstatemap: add simpler version of `get_node_mut`
This will help reduce code and footgun potential for simpler callers.
Differential Revision: https://phab.mercurial-scm.org/D12531
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 17:22:39 +0200] rev 49187
rust-dirstatemap: use `get_node_mut` instead or `get_or_insert_node`
This (along with the docstring), makes it more obvious that we're not expecting
to insert a node here. This is less prone to bugs in later refactorings.
Differential Revision: https://phab.mercurial-scm.org/D12530
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:56:52 +0200] rev 49186
rust-dirstatemap: add `each_ancestor` argument to `get_node_mut`
This forces the callers to think about if the counters in the ancestors
need to be adjusted.
Differential Revision: https://phab.mercurial-scm.org/D12529
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:53:06 +0200] rev 49185
rust-dirstatemap: add simpler method `get_or_insert_node` for the common case
All but one case use the exact same input for most arguments, this simplifies
code and reduces footgun potential.
Differential Revision: https://phab.mercurial-scm.org/D12528
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:05:47 +0200] rev 49184
rust-dirstatemap: inline the last `get_or_insert` call
The `get_or_insert` method was dangerous because it did not take the
`DirstateMap` counters into account. This particular instance does not need
to update the counters.
Differential Revision: https://phab.mercurial-scm.org/D12527
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:04:17 +0200] rev 49183
rust-dirstatemap: add `set_cached_mtime` helper method
This will help remove the `get_or_insert` method, which is dangerous because it
does not take the `DirstateMap` counters into account
Differential Revision: https://phab.mercurial-scm.org/D12526
Raphaël Gomès <rgomes@octobus.net> [Fri, 08 Apr 2022 16:03:39 +0200] rev 49182
rust-dirstatemap: add `clear_cached_mtime` helper method
This will help remove the `get_or_insert` method, which is dangerous because it
does not take the `DirstateMap` counters into account.
Differential Revision: https://phab.mercurial-scm.org/D12525
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 18:21:40 +0200] rev 49181
rust-dirstatemap: add unit tests
These were missing and have already proven valuable since they have found
two bugs (fixed in previous patches).
There may be other behavior to test, but this gives us a decent coverage.
Differential Revision: https://phab.mercurial-scm.org/D12524
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 17:27:36 +0200] rev 49180
rust: add `Debug` trait to a bunch of structs
This is useful when... debugging. Right now the output is not in the most
readable state it could be, but this is very low effort and is good enough
for now. We may want to write a nicer custom debug formatter for some of those
structs in the future.
Differential Revision: https://phab.mercurial-scm.org/D12523
Raphaël Gomès <rgomes@octobus.net> [Wed, 30 Mar 2022 11:39:53 +0200] rev 49179
rust-dirstatemap: use `&HgPath` instead of `HgPathBuf` in `copy_map_insert`
No reason to require an owned path here.
Differential Revision: https://phab.mercurial-scm.org/D12522
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Mar 2022 17:23:24 +0200] rev 49178
rust-dirstatemap: use `DirstateEntry::tracked` directly
`state()` is a legacy API that will be removed at some point, let's use the
newer API.
Differential Revision: https://phab.mercurial-scm.org/D12521
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Apr 2022 10:53:58 -0400] rev 49139
merge with stable
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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