Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 19 May 2021 16:55:36 +0200] rev 47324
revlogv2: use a unique filename for data
Having a unique data will allow for ambiguity less rewriting of revlog content,
something useful to clarify handling of some operation like censoring or
stripping.
Differential Revision: https://phab.mercurial-scm.org/D10772
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 18 May 2021 15:07:17 +0200] rev 47323
revlogv2: use a unique filename for index
Having a unique index will allow for ambiguity less rewriting of revlog content,
something useful to clarify handling of some operation like censoring or
stripping.
Differential Revision: https://phab.mercurial-scm.org/D10771
Simon Sapin <simon.sapin@octobus.net> [Sat, 22 May 2021 17:35:54 +0200] rev 47322
rhg: A missing .hg/dirstate file is not an error
Instead treat it as like an empty file
Differential Revision: https://phab.mercurial-scm.org/D10766
Simon Sapin <simon.sapin@octobus.net> [Sat, 22 May 2021 17:32:09 +0200] rev 47321
rhg: Sort `rhg status` output correctly
* The relative order of states is:
modified, added, removed, deleted, unknown, ignored, clean
* Files in the same state should be sorted by name, regardless of whether
or not the were in "unsure" state based on metadata alone.
Differential Revision: https://phab.mercurial-scm.org/D10765
Simon Sapin <simon.sapin@octobus.net> [Wed, 19 May 2021 18:35:43 +0200] rev 47320
dirstate-v2: Add `hg debugupgraderepo` command support
This command changes changes the file formats used inside an existing
repository to what they would be in a new repository with the current config.
For example:
hg debugupgraderepo --config format.exp-dirstate-v2=1 --run
hg debugupgraderepo --config format.exp-dirstate-v2=0 --run
If a repository has a dirstate in v1 format, the first command would upgrade it
to dirstate-v2. Conversely, if a repository has a dirstate in v2 format, the
second command would downgrade it to v1. (Both may also run some unrelated
upgrades.)
Since `format.exp-dirstate-v2` is currently disabled by default, not specifying
it in `--config` or any configuration file would result in the second command.
Differential Revision: https://phab.mercurial-scm.org/D10769
Simon Sapin <simon.sapin@octobus.net> [Fri, 21 May 2021 17:12:47 +0200] rev 47319
upgrade: Use `improvement` subclasses everywhere, not instances
This changes the source definition of optimizations to match that of formats:
a subclass with a decorator, instead of an instance passed to a function call.
Not having any instance removes the confusion between class attributes and
instance attributes, which were used interchangeably.
Differential Revision: https://phab.mercurial-scm.org/D10768
Matt Harbison <matt_harbison@yahoo.com> [Thu, 20 May 2021 14:20:39 -0400] rev 47318
tests: monkeypatch `util.get_password()` to avoid deadlocks on Windows
This should have been part of
5b3513177f2b.
Differential Revision: https://phab.mercurial-scm.org/D10759
Raphaël Gomès <rgomes@octobus.net> [Tue, 04 May 2021 10:46:50 +0200] rev 47317
rust-status: fix ignore and include not composing (
issue6514)
While the fix is pretty simple, the overall dispatch logic has become kind of
ugly. Thankfully we're currently upstreaming a better algorithm, this code is
temporary anyway.
Differential Revision: https://phab.mercurial-scm.org/D10639
Raphaël Gomès <rgomes@octobus.net> [Tue, 04 May 2021 10:33:36 +0200] rev 47316
rust-status: highlight a bug in Rust-augmented status
This was reported in
issue6514, confirmed with this test reproduction.
This will be fixed with the next changeset.
Differential Revision: https://phab.mercurial-scm.org/D10638
Matt Harbison <matt_harbison@yahoo.com> [Tue, 11 May 2021 01:05:38 -0400] rev 47315
exewrapper: avoid directly linking against python3X.dll
Subsequent code calls `LoadLibrary()` to attempt to load the DLL, but because of
this symbol reference, there is an attempt to load the DLL used during the build
prior to `_main()` running. This causes the whole process to fail if the DLL
isn't in the standard search path. That also means it will never load the DLL
for HackableMercurial. (Maybe we should get rid of that for py3, since you can
install python for a user without admin rights?)
This could also be resolved by calling `GetProcAddress()` on the symbol and
dereferencing it, but using the environment variable is consistent with the
*.bat file since
fc8a5c9ecee0. (The environment variable persists after the
interpreter is initialized.)
Far more concerning is somehow I've gotten my system into a state where setting
the flag causes any output to the pager to be lost (as if it wasn't set at all)
in MSYS, cmd.exe, WSL, and PowerShell using py3.9.0, but the environment
variable works properly. I'm sure this flag worked on some versions of py3, so
I'm not sure what's going on here. This is might be related to init config
related changes in 3.8[1], since it works with 3.7.8, but fails with 3.8.1.
Somebody who understands encoding issues better than I do should give some
thought to if we need to make some changes to our encoding strategy on Windows
with py3.
With or without the flag/envvar, there is proper output if the command is
directly paged by piping to `more.com` (in any environment) or `less` (in MSYS
and WSL), or if paging is disabled with `--pager=no`. Legacy mode is required
though when Mercurial decides to spin up a pager.
[1] https://bugs.python.org/
issue41941
Differential Revision: https://phab.mercurial-scm.org/D10756
Matt Harbison <matt_harbison@yahoo.com> [Thu, 20 May 2021 19:59:03 -0400] rev 47314
tests: partially fix test-transaction-rollback-on-revlog-split.t on Windows
For whatever reason, the extra space causes different output on Windows:
$ printf '% 20d' '1' | xxd -
0000000: 2020 2020 2020 2020 2020 2020 2020 2020
0000010: 2020 2020 31 1
vs WSL:
/mnt/c/Users/Matt/hg/tests$ printf '% 20d' '1' | xxd -
00000000: 2020 2020 2020 2020 2020 2020 2020 2020
00000010: 2020 2031
Without the space, they both agree the last word is 2031. There are other
failures on Windows that I don't understand that are introduced by
46b828b85eb7
and
18415fc918a1.
Differential Revision: https://phab.mercurial-scm.org/D10763
Matt Harbison <matt_harbison@yahoo.com> [Thu, 20 May 2021 19:30:56 -0400] rev 47313
tests: fix test-transaction-safety.t on Windows
Mostly this is about `C:\dir\sub` style paths being turned into `C:dirsub` by
MSYS, and not being about to execute shell scripts in hooks directly. See also
a12819559ccb::
9e3979a25bfe.
Differential Revision: https://phab.mercurial-scm.org/D10762