Thu, 26 Dec 2019 16:45:56 -0500 tests: convert the `root` arg of matchmod.match() to local path separators
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Dec 2019 16:45:56 -0500] rev 43964
tests: convert the `root` arg of matchmod.match() to local path separators This fixes tests that broke with 8b1a9ba375e5, complaining that "X not under root /repo". The vast majority of real uses are to pass `repo.root`, which is normalized by `wdirvfs.base` being set to the result of `os.path.realpath()`. Failure to convert looks like this: --- c:/Users/Matt/hg/tests/test-match.py.out +++ c:/Users/Matt/hg/tests/test-match.py.err @@ -0,0 +1,48 @@ +ERROR: testVisitchildrensetGlob (__main__.IncludeMatcherTests) + +Traceback (most recent call last): + File "c:\Users\Matt\hg\tests\test-match.py", line 180, in testVisitchildrensetGlob + m = matchmod.match(b'/repo', b'', include=[b'glob:dir/z*']) + File "c:\Users\Matt\hg\mercurial\match.py", line 271, in match + kindpats = normalize(include, b'glob', root, cwd, auditor, warn) + File "c:\Users\Matt\hg\mercurial\match.py", line 322, in _donormalize + pat = pathutil.canonpath(root, cwd, pat, auditor=auditor) + File "c:\Users\Matt\hg\mercurial\pathutil.py", line 251, in canonpath + _(b"%s not under root '%s'") % (myname, root), hint=hint +Abort: dir/z* not under root '/repo' +ERROR: testVisitdirGlob (__main__.IncludeMatcherTests) Differential Revision: https://phab.mercurial-scm.org/D7724
Fri, 27 Dec 2019 16:47:47 +0100 commitablectx: fix the default phase
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 27 Dec 2019 16:47:47 +0100] rev 43963
commitablectx: fix the default phase The code was ignoring the config option. Since the config option will control the actual phase of the committed result, we better take it in account early. Differential Revision: https://phab.mercurial-scm.org/D7726
Wed, 18 Dec 2019 14:07:58 -0800 fix: fix handling of merge commits by using overlayworkingctx
Kyle Lippincott <spectral@google.com> [Wed, 18 Dec 2019 14:07:58 -0800] rev 43962
fix: fix handling of merge commits by using overlayworkingctx Most of this code was conceptually copied from what rebase does, with one small difference: hgext.rebaserev.rebase uses branchmerge=True, while I had to use branchmerge=False, or else it got really confused about updating to the same revision in some situations. I believe that the difference is that rebase is always dealing with *some* form of update - it never gets to mergemod.update if the source and destination are the same, while we can encounter that situation with fix. This may imply that this code has some issues with named branches that should be investigated. Differential Revision: https://phab.mercurial-scm.org/D7703
Mon, 23 Dec 2019 10:02:50 -0800 rust-index: add a struct wrapping the C index
Georges Racinet <georges.racinet@octobus.net> [Mon, 23 Dec 2019 10:02:50 -0800] rev 43961
rust-index: add a struct wrapping the C index Implementing the full index logic in one go is journey larger than we would like. To achieve a smoother transition, we start with a simple Rust wrapper that delegates allwork to the current C implementation. Once we will have a fully working index object in Rust, we can easily start using more and more Rust Code with it. The object in this patch is functional and tested. However, multiple of the currently existing rust (in the `hg-cpython` crate) requires a `Graph`. Right now we build this `Graph` (as cindex::Index) using the C index passed as a PyObject. They will have to be updated to be made compatible. Differential Revision: https://phab.mercurial-scm.org/D7655
Thu, 12 Dec 2019 03:46:47 +0100 rust-index: add a `inner` method to the Index struct
Georges Racinet <georges.racinet@octobus.net> [Thu, 12 Dec 2019 03:46:47 +0100] rev 43960
rust-index: add a `inner` method to the Index struct We are about to introduce a Rust wrapper to the C index. It will be exposed as a Python object. As a start all call will be forwarded to an internal index object (as used now). For this forwarding to works, we need to access that index object (from the C extensions). We adds a method doing to on the existing `Index` rust struct. Differential Revision: https://phab.mercurial-scm.org/D7654
Wed, 27 Nov 2019 17:59:58 +0100 revlog: made C Capsule an array of function pointers
Georges Racinet <georges.racinet@octobus.net> [Wed, 27 Nov 2019 17:59:58 +0100] rev 43959
revlog: made C Capsule an array of function pointers Although it's perfectly valid to put a function pointer in a capsule, as we've been doing since the start of rust/hg-cpython, an array of function pointers has several advantages: - it can hold several functions. That's our main motivation here. We plan to expose index_length() and index_node(), which will be needed for a Rust implementation of nodemap. - it could also have data - (probably minor in the case of Mercurial) proper support for architectures for which data and code pointers don't have the same size. Differential Revision: https://phab.mercurial-scm.org/D7543
Sun, 22 Dec 2019 23:09:37 -0500 lfs: fix a discrepancy with a function wanting a filelog, but calling it rlog
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Dec 2019 23:09:37 -0500] rev 43958
lfs: fix a discrepancy with a function wanting a filelog, but calling it rlog This conceptually broke in 1541e1a8e87d when the filelog isa revlog relationship was changed to containment of the revlog. It was made more obvious in 62a532045e71 and related API simplification. It's resolved in favor of passing a revlog because the revlog verification code doesn't have a reference to a filelog. Differential Revision: https://phab.mercurial-scm.org/D7711
Sun, 22 Dec 2019 16:36:09 -0500 revlog: split the content verification of a node into a separate method
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Dec 2019 16:36:09 -0500] rev 43957
revlog: split the content verification of a node into a separate method This will be used by LFS to tune what is skipped. In the future, this could also be used by LFS to indicate which nodes tagged with `skipread` are simply in need of a blob fetch, so that they can be done in a batch later. (Currently, `skipread` also indicates censored data and errors.) Additionally, it could be used to cache the sha1 hash value for each blob so that large blobs don't need to be re-read and re-hashed if they are used by multiple nodes. Differential Revision: https://phab.mercurial-scm.org/D7710
Sun, 22 Dec 2019 00:47:33 -0500 verify: update comment to say that lfs doesn't need fulltext to check renames
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Dec 2019 00:47:33 -0500] rev 43956
verify: update comment to say that lfs doesn't need fulltext to check renames The reason is that `filelog.renamed()` indirectly calls `filelog.revision()`, which is what accesses the full text. However, LFS wraps `filelog.renamed()` and completely handles the case where an LFS blob is in play by using rawdata. I've got a test to demonstrate that this is the case, and prevent regressions. But the `skipread` flag is set on all lfs revisions when using `--no-lfs`, regardless of whether or not the blobs are local. Just above this, that flag is consulted, causing the rename checks to be skipped. That will need to be loosened up first. Differential Revision: https://phab.mercurial-scm.org/D7709
Wed, 18 Dec 2019 13:30:48 -0800 resourceutil: use `from importlib import resources`
Martin von Zweigbergk <martinvonz@google.com> [Wed, 18 Dec 2019 13:30:48 -0800] rev 43955
resourceutil: use `from importlib import resources` Without this patch, we get the following error from when trying to run hg with PyOxidizer: module 'importlib' has no attribute 'resources' I don't know what why that happens, but `from importlib import resources` is the form I would prefer anyway, so let's use that now that the impoort-checker has been fixed. Differential Revision: https://phab.mercurial-scm.org/D7701
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip