# HG changeset patch # User Pierre-Yves David # Date 1679664375 0 # Node ID 94d459a374941784ee27d7506096ead1d050986c # Parent 8a77122959e43e4fbf457d6cf0fcef1513d44ce4# Parent 64012821d6b036717c47ecbb977829d7c31d09e3 branching: merge with stable diff -r 8a77122959e4 -r 94d459a37494 .hgtags --- a/.hgtags Thu Mar 16 19:26:45 2023 -0300 +++ b/.hgtags Fri Mar 24 13:26:15 2023 +0000 @@ -104,3 +104,4 @@ 569e09c61c4f0f78b5bb581b02583fc7139470d7 10.5.3 6b128ae8e2ade0b781eb8c0f7411db3f090d26f7 11.0.0rc0 eb221b2c1f8196effb48a61d9d83565b878308fd 11.0.0 +33f24dd8cfa2c57a7da2fa6757ba41ffc69da794 11.0.1 diff -r 8a77122959e4 -r 94d459a37494 CHANGELOG --- a/CHANGELOG Thu Mar 16 19:26:45 2023 -0300 +++ b/CHANGELOG Fri Mar 24 13:26:15 2023 +0000 @@ -10,6 +10,15 @@ * drop compatibility with Mercurial 4.8 +11.0.1 -- 2023-03-23 +-------------------- + + * compatibility with Mercurial 6.4 + +topic (1.0.1) + + * compatibility with Mercurial 6.4 + 11.0.0 -- 2023-02-26 -------------------- diff -r 8a77122959e4 -r 94d459a37494 Makefile --- a/Makefile Thu Mar 16 19:26:45 2023 -0300 +++ b/Makefile Fri Mar 24 13:26:15 2023 +0000 @@ -25,7 +25,7 @@ .PHONY: install-home install-home: - $(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force + $(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force --old-and-unmanageable --single-version-externally-managed .PHONY: doc doc: diff -r 8a77122959e4 -r 94d459a37494 debian/changelog --- a/debian/changelog Thu Mar 16 19:26:45 2023 -0300 +++ b/debian/changelog Fri Mar 24 13:26:15 2023 +0000 @@ -1,3 +1,9 @@ +mercurial-evolve (11.0.1-1) unstable; urgency=medium + + * new upstream release + + -- Anton Shestakov Thu, 23 Mar 2023 10:36:12 -0300 + mercurial-evolve (11.0.0-1) unstable; urgency=medium * new upstream release diff -r 8a77122959e4 -r 94d459a37494 hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Thu Mar 16 19:26:45 2023 -0300 +++ b/hgext3rd/evolve/cmdrewrite.py Fri Mar 24 13:26:15 2023 +0000 @@ -1007,13 +1007,23 @@ # changed changedfiles.extend(repo[rev].files()) + need_write = True + if util.safehasattr(repo.dirstate, 'changing_parents'): + changing_parents = repo.dirstate.changing_parents(repo) + else: + # hg <= 6.3 (7a8bfc05b691) + need_write = False + changing_parents = util.nullcontextmanager() + # reset files that only changed in the dirstate too dirstate = repo.dirstate dirchanges = compat.dirchanges(dirstate) changedfiles.extend(dirchanges) - repo.dirstate.rebuild(newnode.node(), newnode.manifest(), - changedfiles) - dirstate.write(tr) + with changing_parents: + repo.dirstate.rebuild(newnode.node(), newnode.manifest(), + changedfiles) + if need_write: + dirstate.write(tr) else: bookactive = repo._activebookmark # Active bookmark that we don't want to delete (with -B option) @@ -1143,7 +1153,7 @@ # Set the right branch # XXX-TODO: Find a way to set the branch without altering the dirstate - repo.dirstate.setbranch(ctx.branch()) + compat.setbranch(repo, ctx.branch()) if pats: # refresh the wctx used for the matcher @@ -1242,7 +1252,7 @@ tr.close() finally: # Restore the old branch - repo.dirstate.setbranch(savedbranch) + compat.setbranch(repo, savedbranch) lockmod.release(tr, lock, wlock) @@ -1411,7 +1421,7 @@ newnode = repo.commit(text=origctx.description(), user=origctx.user(), date=origctx.date(), extra=origctx.extra()) - repo.dirstate.setbranch(origctx.branch()) + compat.setbranch(repo, origctx.branch()) if pickstate: pickstate.delete() diff -r 8a77122959e4 -r 94d459a37494 hgext3rd/evolve/compat.py --- a/hgext3rd/evolve/compat.py Thu Mar 16 19:26:45 2023 -0300 +++ b/hgext3rd/evolve/compat.py Fri Mar 24 13:26:15 2023 +0000 @@ -529,6 +529,15 @@ context.overlayworkingctx._markdirty = fixedmarkdirty +def setbranch(repo, branch): + # this attribute was introduced at about the same time dirstate.setbranch() + # was modified + # hg <= 6.3 (e9379b55ed80) + if util.safehasattr(dirstate, 'requires_changing_files_or_status'): + repo.dirstate.setbranch(branch, repo.currenttransaction()) + else: + repo.dirstate.setbranch(branch) + if util.safehasattr(dirstate.dirstate, 'get_entry'): def dirchanges(dirstate): return [ diff -r 8a77122959e4 -r 94d459a37494 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Thu Mar 16 19:26:45 2023 -0300 +++ b/hgext3rd/evolve/evolvecmd.py Fri Mar 24 13:26:15 2023 +0000 @@ -791,7 +791,7 @@ # preserved pass elif basebranch == divbranch and basebranch != othbranch: - repo.dirstate.setbranch(othbranch) + compat.setbranch(repo, othbranch) else: # all the three branches are different index = repo.ui.promptchoice(_(b"content divergent changesets on " @@ -802,11 +802,11 @@ (basebranch, divbranch, othbranch), 0) if index == 0: - repo.dirstate.setbranch(basebranch) + compat.setbranch(repo, basebranch) elif index == 1: pass elif index == 2: - repo.dirstate.setbranch(othbranch) + compat.setbranch(repo, othbranch) def mergecommitmessages(ui, basedesc, divdesc, othdesc): """merges the commit messages and return the new merged message and whether @@ -999,7 +999,7 @@ if repo[b'.'].rev() != dest.rev(): compat._update(repo, dest, branchmerge=False, force=True) if keepbranch: - repo.dirstate.setbranch(orig.branch()) + compat.setbranch(repo, orig.branch()) if util.safehasattr(repo, 'currenttopic'): # uurrgs # there no other topic setter yet diff -r 8a77122959e4 -r 94d459a37494 hgext3rd/evolve/metadata.py --- a/hgext3rd/evolve/metadata.py Thu Mar 16 19:26:45 2023 -0300 +++ b/hgext3rd/evolve/metadata.py Fri Mar 24 13:26:15 2023 +0000 @@ -6,6 +6,6 @@ # GNU General Public License version 2 or any later version. __version__ = b'11.1.0.dev0' -testedwith = b'4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.3' +testedwith = b'4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4' minimumhgversion = b'4.9' buglink = b'https://bz.mercurial-scm.org/' diff -r 8a77122959e4 -r 94d459a37494 hgext3rd/evolve/rewind.py --- a/hgext3rd/evolve/rewind.py Thu Mar 16 19:26:45 2023 -0300 +++ b/hgext3rd/evolve/rewind.py Fri Mar 24 13:26:15 2023 +0000 @@ -159,12 +159,19 @@ # changed changedfiles.extend(ctx.files()) + if util.safehasattr(repo.dirstate, 'changing_parents'): + changing_parents = repo.dirstate.changing_parents(repo) + else: + # hg <= 6.3 (7a8bfc05b691) + changing_parents = util.nullcontextmanager() + # reset files that only changed in the dirstate too dirstate = repo.dirstate dirchanges = compat.dirchanges(dirstate) changedfiles.extend(dirchanges) - repo.dirstate.rebuild(newctx.node(), newctx.manifest(), - changedfiles) + with changing_parents: + repo.dirstate.rebuild(newctx.node(), newctx.manifest(), + changedfiles) # TODO: implement restoration of copies/renames # Ideally this step should be handled by dirstate.rebuild diff -r 8a77122959e4 -r 94d459a37494 hgext3rd/evolve/rewriteutil.py --- a/hgext3rd/evolve/rewriteutil.py Thu Mar 16 19:26:45 2023 -0300 +++ b/hgext3rd/evolve/rewriteutil.py Fri Mar 24 13:26:15 2023 +0000 @@ -23,6 +23,7 @@ node, obsolete, obsutil, + pycompat, revset, rewriteutil as corerewriteutil, scmutil, @@ -60,12 +61,11 @@ can be used to control the commit message. """ # hg <= 6.1 (d4752aeb20f1) - code = corerewriteutil.precheck.__code__ - if r'check_divergence' in code.co_varnames[:code.co_argcount]: + args = pycompat.getargspec(corerewriteutil.precheck).args + if r'check_divergence' in args: return corerewriteutil.precheck(repo, revs, action, check_divergence=check_divergence) - # hg <= 5.8 (d90f6237) if node.nullrev in revs: msg = _(b"cannot %s the null revision") % (action) hint = _(b"no changeset checked out") diff -r 8a77122959e4 -r 94d459a37494 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Thu Mar 16 19:26:45 2023 -0300 +++ b/hgext3rd/topic/__init__.py Fri Mar 24 13:26:15 2023 +0000 @@ -235,7 +235,7 @@ __version__ = b'1.1.0.dev0' -testedwith = b'4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.3' +testedwith = b'4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1 6.2 6.3 6.4' minimumhgversion = b'4.9' buglink = b'https://bz.mercurial-scm.org/' diff -r 8a77122959e4 -r 94d459a37494 tests/test-evolve-abort-orphan.t --- a/tests/test-evolve-abort-orphan.t Thu Mar 16 19:26:45 2023 -0300 +++ b/tests/test-evolve-abort-orphan.t Fri Mar 24 13:26:15 2023 +0000 @@ -593,10 +593,11 @@ last-message.txt requires store - undo.backup.bookmarks + undo.backup.bookmarks (no-hg64 !) + undo.backup.branch (hg64 !) undo.backup.dirstate - undo.bookmarks - undo.branch + undo.bookmarks (no-hg64 !) + undo.branch (no-hg64 !) undo.desc - undo.dirstate + undo.dirstate (no-hg64 !) wcache diff -r 8a77122959e4 -r 94d459a37494 tests/test-evolve-interrupted.t --- a/tests/test-evolve-interrupted.t Thu Mar 16 19:26:45 2023 -0300 +++ b/tests/test-evolve-interrupted.t Fri Mar 24 13:26:15 2023 +0000 @@ -45,8 +45,8 @@ $ hg evolve --update --config hooks.precommit=false --config ui.merge=:other move:[1] banana atop:[2] apricot and blueberry - transaction abort! - rollback completed + transaction abort! (no-hg64 !) + rollback completed (no-hg64 !) abort: precommit hook exited with status 1 [40] $ hg l @@ -104,8 +104,8 @@ $ hg evolve --update --config hooks.precommit=false --config ui.merge=:other move:[1] banana atop:[2] apricot and blueberry - transaction abort! - rollback completed + transaction abort! (no-hg64 !) + rollback completed (no-hg64 !) abort: precommit hook exited with status 1 [40] $ cat b @@ -129,8 +129,8 @@ $ hg evolve --update --config hooks.precommit=false --config ui.merge=:other move:[1] banana atop:[2] apricot and blueberry - transaction abort! - rollback completed + transaction abort! (no-hg64 !) + rollback completed (no-hg64 !) abort: precommit hook exited with status 1 [40] $ hg evolve --continue diff -r 8a77122959e4 -r 94d459a37494 tests/test-evolve-stop-orphan.t --- a/tests/test-evolve-stop-orphan.t Thu Mar 16 19:26:45 2023 -0300 +++ b/tests/test-evolve-stop-orphan.t Fri Mar 24 13:26:15 2023 +0000 @@ -189,11 +189,12 @@ last-message.txt requires store + undo.backup.branch (hg64 !) undo.backup.dirstate - undo.bookmarks - undo.branch + undo.bookmarks (no-hg64 !) + undo.branch (no-hg64 !) undo.desc - undo.dirstate + undo.dirstate (no-hg64 !) wcache Checking when multiple revs need to be evolved, some revs evolve without