Sun, 30 May 2021 17:11:49 +0200 revlog: use the `entry` function in bundlerepo
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 17:11:49 +0200] rev 47398
revlog: use the `entry` function in bundlerepo We can use some of the default value again! Differential Revision: https://phab.mercurial-scm.org/D10796
Sun, 30 May 2021 17:11:21 +0200 revlog: use entry in revlogv0.py
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 17:11:21 +0200] rev 47397
revlog: use entry in revlogv0.py This make things clearer and we can reply on some of the default value directly. Differential Revision: https://phab.mercurial-scm.org/D10795
Sun, 30 May 2021 17:11:10 +0200 revlog: use the new `entry` function in revlog.py
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 17:11:10 +0200] rev 47396
revlog: use the new `entry` function in revlog.py This just make the construction of the tuple clearer. Differential Revision: https://phab.mercurial-scm.org/D10794
Sun, 30 May 2021 17:10:56 +0200 revlog: add a function to build index entry tuple
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 17:10:56 +0200] rev 47395
revlog: add a function to build index entry tuple Keeping index entry as tuple make sense for performance reason, however it does not means we need to manually build that tuple for all piece of python code that are not performance critical. So we add a nice function responsible to build the tuple using argument using explicit keyword argument. Differential Revision: https://phab.mercurial-scm.org/D10793
Sun, 30 May 2021 16:19:36 +0200 revlog: move `offset_type` to `revlogutils`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 30 May 2021 16:19:36 +0200] rev 47394
revlog: move `offset_type` to `revlogutils` This multiple module are using this so it make sense to move it at the utility level. Differential Revision: https://phab.mercurial-scm.org/D10792
Sat, 22 May 2021 00:06:22 +0200 revlog: move entry documentation alongside new related constants
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 22 May 2021 00:06:22 +0200] rev 47393
revlog: move entry documentation alongside new related constants Accessing individual index-entry element is usually done using integer directly. This is presumably for "performance reasons". However as the index entry gain more and more element it seems useful to get the option to use symbolic constant to access item, for both clarify and versatility. We will probably keep using integer for performance critical path, but less critical code may start using them now that they are declared. Differential Revision: https://phab.mercurial-scm.org/D10791
Fri, 21 May 2021 20:08:11 +0200 censor: drop size limitation on the tombstone
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 21 May 2021 20:08:11 +0200] rev 47392
censor: drop size limitation on the tombstone This limitation seems to date back from a previous implementation of censors, were the revision were censored" in place. For a long while the implementation actually involved rewriting the revlog before replacing the original data. So it looks like we can safely remove this limitation. The tests suite agrees. Differential Revision: https://phab.mercurial-scm.org/D10790
Sat, 29 May 2021 00:11:56 +0200 revlog: move censoring code in a dedicated module
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 29 May 2021 00:11:56 +0200] rev 47391
revlog: move censoring code in a dedicated module This code is quite specific and we are about to add more of it for revlog-v2 (and other derived version). So we move this code in a dedicated module in `mercurial/revlogutils/`. This looks like a good fit. The diff is huge because I used `hg copy` to create the new file so that we keep the history of the censor code. Differential Revision: https://phab.mercurial-scm.org/D10789
Sat, 29 May 2021 00:11:32 +0200 censor: reduce risk of censor test blowing up output limit
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 29 May 2021 00:11:32 +0200] rev 47390
censor: reduce risk of censor test blowing up output limit The censored file is really big, and we keep using `hg cat` on it, with the assumption that it is censored. However, when it is not censored, the amount of extra line output is huge and quickly saturate the backlog of terminal and CI system. Differential Revision: https://phab.mercurial-scm.org/D10788
Fri, 28 May 2021 23:41:17 +0200 revlog: store sidedata in their own file
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 28 May 2021 23:41:17 +0200] rev 47389
revlog: store sidedata in their own file This makes sidedata manipulation simpler and results in more compact data when traversing either data or sidedata. Differential Revision: https://phab.mercurial-scm.org/D10787
Fri, 28 May 2021 23:41:12 +0200 revlog: fix docket.date_filepath docstring
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 28 May 2021 23:41:12 +0200] rev 47388
revlog: fix docket.date_filepath docstring This was copy-pasted too quickly. Differential Revision: https://phab.mercurial-scm.org/D10786
Thu, 27 May 2021 04:09:30 +0200 revlog: use dedicated code for reading sidedata
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 May 2021 04:09:30 +0200] rev 47387
revlog: use dedicated code for reading sidedata We are about to introduce a new, dedicated, file to store sidedata. Before doing so, we make sidedata reading go through different code as reading data chunk. This will simplify some of the complexity of the next changesets. The reading is very simple right now and will need some improvement later to reuse some of the caching strategy we use for the data file. Differential Revision: https://phab.mercurial-scm.org/D10785
Thu, 27 May 2021 04:09:10 +0200 revlog: simplify "partial read" error message
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 May 2021 04:09:10 +0200] rev 47386
revlog: simplify "partial read" error message We are about to reuse this message in more places and the current handling is pretty hard to read. So we eat two pie with one stone and clean up this. Differential Revision: https://phab.mercurial-scm.org/D10784
Thu, 27 May 2021 03:41:02 +0200 revlog: no longer return sidedata from `_revisiondata`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 May 2021 03:41:02 +0200] rev 47385
revlog: no longer return sidedata from `_revisiondata` All users have been migrated. When they was introduced sidedata where grouped with the actual revision data and unpacking one came with the other. Sidedata moved be stored "independently" and it no longer make sense to retrieve both at the same time unconditionnaly. Differential Revision: https://phab.mercurial-scm.org/D10783
Thu, 27 May 2021 03:28:15 +0200 revlog: use `self.sidedata` directly in `revlog.clone`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 May 2021 03:28:15 +0200] rev 47384
revlog: use `self.sidedata` directly in `revlog.clone` We want to change `revlog._revisiondata` signature, so we need to migrate users away. Differential Revision: https://phab.mercurial-scm.org/D10782
Thu, 27 May 2021 03:23:34 +0200 revlog: use `self.sidedata` directly to construct changelogrevision
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 May 2021 03:23:34 +0200] rev 47383
revlog: use `self.sidedata` directly to construct changelogrevision We want to change `revlog._revisiondata` signature, so we need to migrate users away. Differential Revision: https://phab.mercurial-scm.org/D10781
Thu, 27 May 2021 03:21:53 +0200 revlog: implement sidedata without using _revisiondata
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 27 May 2021 03:21:53 +0200] rev 47382
revlog: implement sidedata without using _revisiondata When they was introduced sidedata where grouped with the actual revision data and unpacking one came with the other. Sidedata moved be stored "independently" and it no longer make sense to retrieve both at the same time unconditionnaly. We start with changeset the implementation of the `revlog.sidedata` command to no longer use `self._revisiondata`. More users need to be migrated to direct usage of this `revlog.sidedata` method. This will be done in the coming changesets. Differential Revision: https://phab.mercurial-scm.org/D10780
Fri, 28 May 2021 23:44:58 +0200 revlogv2: drop "sidedatacompression" from the list of todos
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 28 May 2021 23:44:58 +0200] rev 47381
revlogv2: drop "sidedatacompression" from the list of todos This was implemented in c4dbb7636a12 and 07641bafa646, but I forgot to drop it from the todo-list. Differential Revision: https://phab.mercurial-scm.org/D10779
Wed, 02 Jun 2021 10:00:50 +0200 rust: Use a maintained crate for SHA-1 hashing
Simon Sapin <simon.sapin@octobus.net> [Wed, 02 Jun 2021 10:00:50 +0200] rev 47380
rust: Use a maintained crate for SHA-1 hashing https://crates.io/crates/rust-crypto hasn’t been updated in 5 years. This doesn’t neccesarily mean there’s anything wrong with it, but if something comes up it’s preferable to rely on libraries that have active maintainers. Use https://crates.io/crates/sha-1 from https://github.com/RustCrypto instead Differential Revision: https://phab.mercurial-scm.org/D10835
Wed, 02 Jun 2021 18:03:43 +0200 rust: Parse "subinclude"d files along the way, not later
Simon Sapin <simon.sapin@octobus.net> [Wed, 02 Jun 2021 18:03:43 +0200] rev 47379
rust: Parse "subinclude"d files along the way, not later When parsing a `.hgignore` file and encountering an `include:` line, the included file is parsed recursively right then in a depth-first fashion. With `subinclude:` however included files were parsed (recursively) much later. This changes it to be expanded during parsing, like `.hgignore`. The motivation for this is an upcoming changeset that needs to detect changes in which files are ignored or not. The plan is to hash all ignore files while they are being read, and store that hash in the dirstate (in v2 format). In order to allow a potential alternative implementations to read that format, the algorithm to compute that hash must be documented. Having a well-defined depth-first ordering for the tree of (sub-)included files makes that easier. Differential Revision: https://phab.mercurial-scm.org/D10834
Wed, 02 Jun 2021 18:14:44 +0200 rust: Make some file path parameters less generic
Simon Sapin <simon.sapin@octobus.net> [Wed, 02 Jun 2021 18:14:44 +0200] rev 47378
rust: Make some file path parameters less generic These are not widely used APIs that benefit from being maximally flexible, taking an explicit `&Path` borrow is fine and simplifies their internals. Differential Revision: https://phab.mercurial-scm.org/D10833
Mon, 26 Apr 2021 22:59:56 +0200 convert-bazaar: use breezy package instead of old bzr one
Raphaël Gomès <rgomes@octobus.net> [Mon, 26 Apr 2021 22:59:56 +0200] rev 47377
convert-bazaar: use breezy package instead of old bzr one Breezy is the most recent of the two, and works on Python 3 while being compatible with the (old) Bazaar file format. This patch contains a variety of unicode <-> bytes changes, API breakage fixing, restoring failing imports and changing the executable from `bzr` to `brz`. I recommend using the debian packages for `brz` and `python3-breezy` (3.1+), because the pip package seems to be haunted by radioactive dragons. Differential Revision: https://phab.mercurial-scm.org/D10513
Wed, 21 Apr 2021 10:58:21 +0200 bzr: only support bzr conversion on Python3
Raphaël Gomès <rgomes@octobus.net> [Wed, 21 Apr 2021 10:58:21 +0200] rev 47376
bzr: only support bzr conversion on Python3 Python 2 support will be dropped from Mercurial before anyone needs to do a bzr -> hg conversion on Python 2 again. Bazaar tests were broken with the new lib anyway, which we'll get into in the next patches. Differential Revision: https://phab.mercurial-scm.org/D10512
Tue, 01 Jun 2021 22:38:29 -0700 rewriteutil: add pointer to help text when rewrite would cause divergence
Martin von Zweigbergk <martinvonz@google.com> [Tue, 01 Jun 2021 22:38:29 -0700] rev 47375
rewriteutil: add pointer to help text when rewrite would cause divergence The evolve extension's version of the hint has this pointer. I missed it when I moved it to core. This is pretty much the same as D10723. Turns out I missed two places :( Differential Revision: https://phab.mercurial-scm.org/D10832
Tue, 25 May 2021 09:20:30 +0200 rhg: Add support for dirstate-v2
Simon Sapin <simon.sapin@octobus.net> [Tue, 25 May 2021 09:20:30 +0200] rev 47374
rhg: Add support for dirstate-v2 Differential Revision: https://phab.mercurial-scm.org/D10804
Wed, 26 May 2021 11:53:37 +0200 rhg: Remove some intermediate Vecs in `rhg files`
Simon Sapin <simon.sapin@octobus.net> [Wed, 26 May 2021 11:53:37 +0200] rev 47373
rhg: Remove some intermediate Vecs in `rhg files` Instead of calling `parse_dirstate` which then calls `parse_dirstate_entries`, call the latter directly in order to skip some intermediate steps. Differential Revision: https://phab.mercurial-scm.org/D10803
Tue, 01 Jun 2021 15:19:08 -0700 merge: make applyupdates() not mutate mresult argument
Martin von Zweigbergk <martinvonz@google.com> [Tue, 01 Jun 2021 15:19:08 -0700] rev 47372
merge: make applyupdates() not mutate mresult argument We have an extension at work that overrides `merge.applyupdates()` to make it skip some writes and instead instruct the virtual filesystem we use to get a different version. That override doesn't work correctly when doing `hg co -m` and there's a modified file in the dirstate that's deleted in the destination. That's because `applyupdates()` mutates its `mresult` argument and our extension had passed in a modified copied of `mresult` to the overridden function, which resulted in the mutation not having any effect. This patch fixes that by letting the caller (i.e. `merge._update()`) update `mresult` with the extra actions instead. Besides fixing our internal extension, that seems cleaner to me anyway (better to not mutate `mresult` only in some cases and we can skip some of the logic if we're not going to update the dirstate anyway). Differential Revision: https://phab.mercurial-scm.org/D10830
Thu, 03 Jun 2021 16:12:03 +0200 index: use an explicit constant for INDEX_HEADER format and use it for docket
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 03 Jun 2021 16:12:03 +0200] rev 47371
index: use an explicit constant for INDEX_HEADER format and use it for docket This avoid leaking python-3.6 compatibility details too much. Differential Revision: https://phab.mercurial-scm.org/D10831
Tue, 01 Jun 2021 09:18:27 +0200 verify: use some intermediate variables instead of a multi-liner
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 01 Jun 2021 09:18:27 +0200] rev 47370
verify: use some intermediate variables instead of a multi-liner This is shorter and easier to read as the indentation remains the same. Differential Revision: https://phab.mercurial-scm.org/D10822
Tue, 01 Jun 2021 09:18:20 +0200 verify: use some intermediate variables instead of a multi-liner
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 01 Jun 2021 09:18:20 +0200] rev 47369
verify: use some intermediate variables instead of a multi-liner This is shorter and easier to read as the indentation remains the same. We extract the long message in a module level constant for clarity. Differential Revision: https://phab.mercurial-scm.org/D10821
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip