Commit message Age Author Refs
r53521:cdbfe5e7
git: handle octopus merges Octopus merges in git are merge commits with more than 2 parents. To make them fit into mercurial core's assumption about commits having 0-2 parents, the git indexing code creates "sythetic" commits to represent the octopus commit as a sequence of regular 2-parent commits. The synthetic commit hashes are just an incrementing commit number (which is the same as the generated rev number). The last commit in the sequence of commits uses the actual git commit hash. As a result, `hg checkout -r <commit>` produces the same working directory as `git checkout <commit>` for all git commit hashes. The synthetic commit hashes are stored in the changelog table as any other commit - with the two parents - but they also contain the commit hash of the octopus merge commit. For example, given the git DAG (manually pruned `git log --graph`): *-. commit 23480d86e2689703b33f693907c40fbe6e1620e4 Merge branches... |\ \ | | | | | * commit 2eda9984b06c75448598ec6c0a9028e49dacf616 C | | | | * | commit 5e634a12f12fedaf7b8ef0f0fcdbb07222871953 B | |/ | | * | commit 8883a1296c5ae323a1b18d1f6410398ce43ebd3a D |/ | * commit 95f241588fded9554cae91be0fefd576f61ebfc6 A Where M is the octopus merge commit with 3 parents, the corresponding mercurial DAG is: $ hg log -G -T '{node} {desc}' @ 23480d86e2689703b33f693907c40fbe6e1620e4 Merge branches 'abc' and 'def' |\ | o 0000000000000000000000000000000000000004 Merge branches 'abc' and 'def' | |\ | | o 8883a1296c5ae323a1b18d1f6410398ce43ebd3a D | | | o---+ 2eda9984b06c75448598ec6c0a9028e49dacf616 C / / o / 5e634a12f12fedaf7b8ef0f0fcdbb07222871953 B |/ o 95f241588fded9554cae91be0fefd576f61ebfc6 A
Josef 'Jeff' Sipek
0
r53520:4e2ea270
git: move file indexing into a helper This reduces the length of the ever growing _index_repo function.
Josef 'Jeff' Sipek
0
r53519:aa5844ad
git: speed up possible head processing during indexing by ~100x Benchmarking of 50 iterations of indexing (see below) shows that there is essentially no difference for small repos (<1k commits), similarly medium repos (~12k commits) see some benefit but other overheads completely overwhelm it, but for large repos (~122k commits) the 80-100x speedup is clearly visible to the user. All of the numbers are in seconds and were measured with time.time() calls placed in _index_repo(). The times exclude the time taken by changedfiles processing. Small repo (guilt, 553 commits, 1 head): Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0008781 0.0009274 0.0009800 0.0012285 0.0014637 0.0024107 (before) 0.0003092 0.0003281 0.0003519 0.0003777 0.0003927 0.0006843 (after) Medium repo (hamlib, 12k commits, 53 heads): Min. 1st Qu. Median Mean 3rd Qu. Max. 0.04881 0.05135 0.07632 0.06672 0.08042 0.09415 (before) 0.004249 0.004420 0.004799 0.004809 0.005051 0.006416 (after) Large repo (qemu, 122k commits, 50 heads): Min. 1st Qu. Median Mean 3rd Qu. Max. 4.274 4.595 4.832 6.578 8.397 9.721 (before) 0.05180 0.05643 0.05865 0.06130 0.06712 0.06872 (after)
Josef 'Jeff' Sipek
0
r53518:ab4fb2d1
git: add stub for gitdirstate.running_status
Josef 'Jeff' Sipek
0
r53517:2b65c922
git: add parents property to gittreemanifestctx
Josef 'Jeff' Sipek
0
r53516:b9f47b68
git: add stubs for gittreemanifestctx methods $ hg log ** unknown exception encountered, please report by visiting ** https://mercurial-scm.org/wiki/BugTracker ** Python 3.11.10 (main, Oct 31 2024, 01:10:40) [Clang 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15 ** Mercurial Distributed SCM (version 6.9.post1.dev337+hg.72af9fa34832) ** Extensions loaded: absorb, churn, git (pygit2 1.14.1), githelp, gpg, hgk, histedit, patchbomb, rebase Traceback (most recent call last): File "/home/jeffpc/src/oss/hg-gitext-test/../hg-gitext/hg", line 61, in <module> dispatch.run() ... File "/usr/home/jeffpc/src/oss/hg-gitext/hgext/git/gitlog.py", line 564, in get return gitmanifest.gittreemanifestctx(self.gitrepo, t) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Can't instantiate abstract class gittreemanifestctx with abstract methods node, read_any_fast_delta, read_delta_new_entries, read_delta_parents, readdelta
Josef 'Jeff' Sipek
0
r53515:143063a9
git: implement baselogindex.{rev,get_rev}
Josef 'Jeff' Sipek
0
r53514:a26c5da9
git: add stubs for filelog methods $ hg log ** unknown exception encountered, please report by visiting ** https://mercurial-scm.org/wiki/BugTracker ** Python 3.11.10 (main, Oct 31 2024, 01:10:40) [Clang 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15 ** Mercurial Distributed SCM (version 6.9.post1.dev337+hg.72af9fa34832) ** Extensions loaded: absorb, churn, git (pygit2 1.14.1), githelp, gpg, hgk, histedit, patchbomb, rebase Traceback (most recent call last): File "/home/jeffpc/src/oss/hg-gitext-test/../hg-gitext/hg", line 61, in <module> dispatch.run() ... File "/usr/home/jeffpc/src/oss/hg-gitext/mercurial/tags.py", line 507, in _readtagcache if not len(repo.file(b'.hgtags')): ^^^^^^^^^^^^^^^^^^^^^ File "/usr/home/jeffpc/src/oss/hg-gitext/hgext/git/__init__.py", line 138, in file return gitlog.filelog(self.store.git, self.store._db, path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Can't instantiate abstract class filelog with abstract methods addgroup, addrevision, censorrevision, children, commonancestorsheads, descendants, emitrevisions, files, getstrippoint, heads, iscensored, parentrevs, rawdata, revision, revs, size, storageinfo, strip, verifyintegrity
Josef 'Jeff' Sipek
0
r53513:b798ad65
git: add stubs for dirstate methods $ hg log ** unknown exception encountered, please report by visiting ** https://mercurial-scm.org/wiki/BugTracker ** Python 3.11.10 (main, Oct 31 2024, 01:10:40) [Clang 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15 ** Mercurial Distributed SCM (version 6.9.post1.dev337+hg.72af9fa34832) ** Extensions loaded: absorb, churn, git (pygit2 1.14.1), githelp, gpg, hgk, histedit, patchbomb, rebase Traceback (most recent call last): File "/home/jeffpc/src/oss/hg-gitext-test/../hg-gitext/hg", line 61, in <module> dispatch.run() ... File "/usr/home/jeffpc/src/oss/hg-gitext/mercurial/localrepo.py", line 1789, in changelog repo.dirstate.prefetch_parents() ^^^^^^^^^^^^^ File "/usr/home/jeffpc/src/oss/hg-gitext/mercurial/localrepo.py", line 225, in __get__ return super(unfilteredpropertycache, self).__get__(unfi) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/home/jeffpc/src/oss/hg-gitext/mercurial/util.py", line 1822, in __get__ result = self.func(obj) ^^^^^^^^^^^^^^ File "/usr/home/jeffpc/src/oss/hg-gitext/mercurial/localrepo.py", line 1802, in dirstate self._dirstate = self._makedirstate() ^^^^^^^^^^^^^^^^^^^^ File "/usr/home/jeffpc/src/oss/hg-gitext/hgext/git/__init__.py", line 311, in _makedirstate return dirstate.gitdirstate( ^^^^^^^^^^^^^^^^^^^^^ TypeError: Can't instantiate abstract class gitdirstate with abstract methods _checkexec, _ignorefileandline, changing_files, clear, copy, hasdir, invalidate, is_changing_files, rebuild, verify
Josef 'Jeff' Sipek
0
r53512:78b2894c
rust-pyo3-sharedref: demonstrate SharedByPyObject borrow unsafety We take the existing doc-comment from rust-cpython and make it compile (validated by `cargo test`). With the added explanations, the ordinary comment was no longer useful, we could therefore remove it. The new explanation stresses that "not leaking the internal faked reference" is definitely not enough, because the problem is about *all references* that can be derived from it. We ended up duplicating the explanation, because that is a way to ensure that people do not miss it. Also, it was a bit misleading that the previous example was for `try_borrow_mut()`, so we made a similar, simpler one for `try_borrow()`.
Georges Racinet
0
< 1 .. 3 4 5 6 7 .. 5353 >