D10962: rust: bump rust-cpython version for 0.6.0

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY That function as a nice `is_none` method on `PyObject` that we will put to use. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10961: rust-dirstate: make the MTIME_UNSET public

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We will use it in the cpython layer soon. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10961 AFFECTED FILES

D10959: dirstate-entry: restrict `from_p2` property to tracked file

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The other case is now handled in `from_p2_removed`, and should ideally be moved to a lower level. So we can drop the `state == 'n'` narrowing and move it in

D10960: rust-dirstatemap: expand the wrapping code a bit

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is easier to read. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10960 AFFECTED FILES

D10953: dirstate: move most of the `remove` logic with dirstatemap `removefile`

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This code deal with special logic to preserving "merged" and "from_p2" information when removing a file. These are implementation details that are more

D10958: dirstate-entry: `merged_removed` and `from_p2_removed` properties

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Lets start to define and use more semantic property. These two might be a bit too low level and could be shaved off later, however this seems an improvement

D10957: dirstate-entry: add a `removed` property

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Lets start to define and use more semantic property. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10957

D10956: dirstate-entry: add a `from_p2` property

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Lets start to define and use more semantic property. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10956

D10955: dirstate-entry: add a `merged` property

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Lets start to define and use more semantic property. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10955

D10954: dirstate-entry: add a `state` property (and use it)

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This replace the [0] access. Ultimately is we should probably get ride of this in its current form. However this is a good transitional solution to move away

D10952: dirstate: add a `in_merge` property

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This factor the "p2 is not null" check and is fairly simpler to read. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10951: dirstate-entry: introduce dedicated accessors for v1 serialization

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY In the spirit of changing the content and storage of the dirstate entry, we add new method that the code doing v1 serialisation can use. Adding such

D10950: dirstate-entry: goes through the `dirstatetuple` constructor in all cases

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We need to make sure we build an object. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10950 AFFECTED FILES

D10949: dirstate-entry: turn dirstate tuple into a real object (like in C)

2021-07-04 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With dirstate V2, the stored information and actual format will change. This mean we need to start an a better abstraction for a dirstate entry that a tuple

D10947: test: use a python script in `test-transaction-rollback-on-sigpipe.t`

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This still does not work on Windows, but at least this is a python script now. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10946: test: make sure we hit the SIGPIPE in test-transaction-rollback-on-sigpipe

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With a coming change, we might not hit the sig pipe without issue and extra line of output. We do this early to make the next change clearer. REPOSITORY

D10945: test: clarify some output in `test-transaction-rollback-on-sigpipe`

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We don't want a dirty transaction to remain, but need to check the transaction was aborted. Otherwise it is easy to have no abandoned transaction if the

D10943: run-tests: stop writing a `python3` symlink pointing to python2

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Having `python3` actually pointing to `python2` is bad. So we stop doing so. In addition we need to re-introduce a `python` executable since some of the

D10942: run-tests: avoid an early return

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY To fix the "python3 pointing to python2" we will also need to create a "python" pointer. So we will need to create multiple pointer. So we need to stop using

D10944: check-shbang: accept -S with env

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is useful to use `python3 -u` in a coming patch. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10944

D10941: run-tests: clarify pyexename assignement

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY That assignement is wrong, we clarify that it is wrong before starting to fix it. This will make the fix clearer. REPOSITORY rHG Mercurial BRANCH default

D10940: run-tests: factor appdata out

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is a gratuitous readability change. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10940 AFFECTED FILES

D10939: run-tests: unroll a non-so-one-liner

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10939 AFFECTED FILES

D10938: run-tests: unroll a non-so-one-liner

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and clearer. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10938 AFFECTED FILES

D10937: testing: fix _timeout_factor

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With `--debug`, `run-tests.py` set the timeout to 0... that breaks the logic in `mercurial.testing`. REPOSITORY rHG Mercurial BRANCH default REVISION

D10934: dirstate: split dirstatemap in its own file

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The dirstate file is large enough and the dirstatemap is quite insulated logic already. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10933: dirstate: explicitely deal with the `added` case in `_addpath`

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This special case is now directly handled, this clarify the possible value for the other options. REPOSITORY rHG Mercurial BRANCH default REVISION

D10932: dirstate: add an explicit `possibly_dirty` parameter to `_addpath`

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This lets says what we mean instead of using magic value. The lower level can then decide how to express that. REPOSITORY rHG Mercurial BRANCH default

D10935: dirstate: document the dirstatetuple content

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We are about to modify this, so let us document the existing code. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10930: dirstate: add default value to _addpath

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We want to remove the magic value usage from the higher level, so lets stop passing them explicitely when possible. REPOSITORY rHG Mercurial BRANCH

D10931: dirstate: add an explicit `from_p2` parameter to `_addpath`

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This lets says what we mean instead of using magic value. The lower level can then decide how to express that. REPOSITORY rHG Mercurial BRANCH default

D10929: dirstate: move the _rangemask filtering closer to its storage

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The goal is to get ready to move these kind of processing at a lower level. We start with move move _rangemask filtering close to where it is sent to the

D10928: dirstate: introduce a symbolic constant for the AMBIGUOUS_TIME marker

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is going to be clearer and easier to track than -1. Ultimately I would like to get ride of this special value everywhere but in the lower level, however

D10927: dirstate: introduce a symbolic constant for the NONNORMAL marker

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is going to be clearer and easier to track than -1. Ultimately I would like to get ride of this special value everywhere but in the lower level, however

D10926: dirstate: introduce a symbolic constant for the FROM_P2 marker

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is going to be clearer and easier to track than -2. Ultimately I would like to get ride of this special value everywhere but in the lower level, however

D10925: dirstate: split a not-so-one-liner

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and simpler to read. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10925 AFFECTED FILES

D10924: dirstate: split a not-so-one-liner

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is simpler to read. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10924 AFFECTED FILES

D10923: dirstate: split a not-so-one-liner

2021-07-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and simpler to read. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10923 AFFECTED FILES

D10905: stream: double check that self.vfs is *not* in the vfsmap

2021-06-24 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The stream clone logic allows for writing any content to any file under various vfs. This is *not* suitable for *vfs*, since writing in `.hg/` directly allow

D10904: censor: split the core of the logic into its own function

2021-06-22 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We now have a "generic" rewrite function (only able to do censoring for now) and a thin wrapper that implement the `censor` API with it. We are now ready

D10903: censor: migrate the logic to a set of `censor_revs`

2021-06-22 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Instead of considering a special unique censored revision within the code, we consider a set of revision (currently always of size 1). This make the main code

D10902: censor: rename `rl` to `revlog` in the main function

2021-06-22 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Now that the bulk of the code moved to smaller function we are less restricted on line length and we can use more explicite naming. REPOSITORY rHG Mercurial

D10901: censor: extract the part about creating and opening new files in a function

2021-06-22 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The v2_censor function is huge, now that its content has settled a bit it is a good time to split individual part inside dedicated function. The last part

D10896: revlog: rewrite `censors.py` to `rewrite.py`

2021-06-22 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The logic we use for censoring revision will be mostly common with the one we needs for stripping. So we rename the module

D10900: censor: extract the part about recomputing delta in a function

2021-06-22 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The v2_censor function is huge, now that its content has settled a bit it is a good time to split individual part inside dedicated function. It is now the

D10899: censor: extract the part about writing the other revision in a function

2021-06-22 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The v2_censor function is huge, now that its content has settled a bit it is a good time to split individual part inside dedicated function. We continue

D10898: censor: extract the part about writing the censored revision in a function

2021-06-22 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The v2_censor function is huge, now that its content has settled a bit it is a good time to split individual part inside dedicated function. We start with a

D10897: censor: put the tuple of open files in an explicit variable

2021-06-22 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This will be simpler to pass these file around in future changesets. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10889: revlog: factor the logic to determine the delta compression out

2021-06-21 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This make the logic clearly isolated and documented and it will help use to reuse it during censors/strip. REPOSITORY rHG

D10887: deltas: at a `target_rev` parameter to finddeltainfo

2021-06-20 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Otherwise, recomputing a delta for a revision might result in a delta against a later revision or a full snapshot thinking we are appending a new revision.

Re: How to fix integrity errors ?

2021-06-17 Thread Pierre-Yves David
now which of the above options are actually possible in your case. And I don't know which one will be the best. However we can probably get to a solution with some email roundtrips. Can you please have a look at the question I wrote earlier in this email? Cheers,

D10869: censor: implement censoring for revlogv2

2021-06-11 Thread marmoute (Pierre-Yves David)
diff --git a/mercurial/revlogutils/censor.py b/mercurial/revlogutils/censor.py --- a/mercurial/revlogutils/censor.py +++ b/mercurial/revlogutils/censor.py @@ -1,4 +1,5 @@ # censor code related to censoring revision +# coding: utf8 # # Copyright 2021 Pierre-Yves David # Copyrigh

D10868: revlog: list older-but-still-around file in `files`

2021-06-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY These older files will eventually be removed, but we have to take them in account until they are. So we update `files` to

D10867: revlog: add docket method to request new content files

2021-06-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If we want to write content into new files, we need to be able to ask for them. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10865: nodemap: fix some comment formatting

2021-06-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Black seems unhappy about it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10865 AFFECTED FILES

D10866: revlog: add a way to keep track of older uids in the docket

2021-06-11 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY When the revlog content is rewritten, we will use new files, to avoid truncating the previous ones. We need some way to keep track of the older files before

D10855: clone: reuse the stream clone logic for local clone

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Streaming clone and local (non `--pull`) clone do mostly the same thing, however they were using different logic to do so. This means the logic frequently

D10858: revlogv2: fix `hg verify` with revlog v2

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We added a bunch of new files but we never teached some internal about it. This is now fixed. REPOSITORY rHG Mercurial

D10857: revlogv2: also test that local clone works

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is now the case so lets add a test. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10857 AFFECTED FILES

D10853: copyfile: add a option callback for failed hardlinking

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Local clone, adjust its UI depending on the success of using hardlinking, so we add a small callback making it possible for `copyfile` to signal if the

D10854: copyfiles: add a way to relax the file system checking for hardlink

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is critical for transaction file, less for hardlink/copy clone as we are about to do. Since `pure` build does not have a `getfstype` implementation this

D10856: clone: also report the bookmark file as copied

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is a small UI adjustement, but this is easy enough to do. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10850: clone: use "official" API to create local clone destination

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This make sure we have a properly created, fully functional repository early. This will be useful to simply the hardlink/copy phases of the local clone to

D10852: streamingclone: extract the scanning part from the generation part

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We will reuse the scanning part for local clone, so we need it in a dedicated function. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10849: localrepo: introduce a clone_requirements function

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This function take a source repository and return a relevant set of requirements that should be used by a copy clone. This will help make the creation of

D10851: vfs: add a `register_file` method on the vfs class

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is used by the fncache vfs to register new file. Until now, `fncache` have been doing this "automatically" by monitoring write pattern. However this is

D10848: createrepository: allow to directly pass the target requirements

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is useful when doing a local clone that copies store contents, it will requires the destination to use the very same store requirements so directly

D10847: copyfile: add overlay in the whitelist for hardlink

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is the "default" file system for docker. We don't know if the hardlink will actually succeed, but the odds are good it will. They are a second layer of

D10845: transaction: narrow the error filtering when failing to rename undo file

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Having inconsistent "undo" files can be quite serious so we narrow the error filtering to the intent that the comment explain. (This is an opportunity

D10846: transaction: simplify `undo.backupfiles` file creation with a variable

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This make the code shorter and clearer. (This is an opportunity improvement while looking at something next to that.) REPOSITORY rHG Mercurial BRANCH

D10841: copyfiles: deal with existing file when hardlinking

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY If the hardlinking fails, we fallback to `shutil.copy`, but do not consider future hardlinking doomed. This is a slight improvement from the current

D10844: transaction: clarify a conditionnal about version check

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Let us move the short branch early. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10844 AFFECTED FILES

D10843: transaction: extract message about different version in a constants

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This make the code a bit simpler and clearer. (This is an opportunity improvement while looking at something next to that.) REPOSITORY rHG Mercurial

D10842: transaction: explain why some recovery failed

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Right now we issue a message about failing to recover some file, but not why. It seems useful to add some information about that. (This is an opportunity

D10840: clone: cleanup the "cleanup dir" logic used during local clone

2021-06-09 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY With the previous code, there was a small windows were we could delete too much data. This should no longer be the case. (This is an opportunity

D10831: index: use an explicit constant for INDEX_HEADER format and use it for docket

2021-06-02 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This avoid leaking python-3.6 compatibility details too much. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10822: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10821: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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. REPOSITORY

D10820: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10819: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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. REPOSITORY

D10818: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10817: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10816: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10815: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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. REPOSITORY

D10814: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10813: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10812: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10811: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10810: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY 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. REPOSITORY

D10809: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10808: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10807: verify: use some intermediate variables instead of a multi-liner

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is shorter and easier to read as the indentation remains the same. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10806: verify: expand a one liner into explicit commands

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The result is not longer, but it is more edible. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10806 AFFECTED

D10805: verify: align a comment line

2021-06-01 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This argument description is back with it comrade. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10805

D10802: revlogv2: make sure bundling pick a compatible bundle format

2021-05-30 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Before this change, revlog-v2 repository where bundled using the incompatible "v1" format. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL

D10801: censor: do not process sidedata of censored revision while bundling

2021-05-30 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The revision is censored, we should ignore it. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10801 AFFECTED

D10797: revlog: move `revisioninfo` in `revlogutils`

2021-05-30 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY We will need it in other utility module. So lets extract it from `revlog.py`, the module is too large already anyway.

D10800: revlog: allow to pass an existing docket to `_loadindex()`

2021-05-30 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: indygreg. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This will be when switching undelying files, for examples during censors and strip operation with rvlog-v2. REPOSITORY rHG

D10798: util: add `nb_bytes` argument to `copyfile` to partially copy a file

2021-05-30 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY When set, this allow to copy only the first `nb_bytes` of a file. This will be useful for censor/strip operation with revlogv2. REPOSITORY rHG Mercurial

D10799: revlog: add a ways to blacklist some revision when searching for a delta

2021-05-30 Thread marmoute (Pierre-Yves David)
marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This will be useful to recompute appropriate deltas one the fly during censor/strip operation with revlog-v2. REPOSITORY rHG Mercurial BRANCH default

<    3   4   5   6   7   8   9   10   11   12   >