# HG changeset patch # User Anton Shestakov # Date 1679441562 10800 # Node ID cac26830e34e37b69cc1994d0984d305591d43e4 # Parent 7766aee4a67a42a32d34724b80410a87b2d707d1# Parent 96749dc32fa1cf471804571780e3747a67fc021e test-compat: merge mercurial-5.9 into mercurial-5.8 diff -r 7766aee4a67a -r cac26830e34e .gitlab/issue_templates/new-version.md --- a/.gitlab/issue_templates/new-version.md Fri Feb 24 21:00:48 2023 +0400 +++ b/.gitlab/issue_templates/new-version.md Tue Mar 21 20:32:42 2023 -0300 @@ -20,6 +20,7 @@ * [ ] move the `@` bookmark to the new tag * [ ] push/publish the tag to the main repository * [ ] upload the tarball to PyPI +* [ ] build .deb on Heptapod CI for the tagged commit * [ ] add `.dev0` to the `__version__` field * [ ] merge stable into default * [ ] push the result to https://www.mercurial-scm.org/repo/evolve/ diff -r 7766aee4a67a -r cac26830e34e .hgtags --- a/.hgtags Fri Feb 24 21:00:48 2023 +0400 +++ b/.hgtags Tue Mar 21 20:32:42 2023 -0300 @@ -103,3 +103,4 @@ 7a7da643a6e302f524e3c96c084e16db371dea90 10.5.2 569e09c61c4f0f78b5bb581b02583fc7139470d7 10.5.3 6b128ae8e2ade0b781eb8c0f7411db3f090d26f7 11.0.0rc0 +eb221b2c1f8196effb48a61d9d83565b878308fd 11.0.0 diff -r 7766aee4a67a -r cac26830e34e CHANGELOG --- a/CHANGELOG Fri Feb 24 21:00:48 2023 +0400 +++ b/CHANGELOG Tue Mar 21 20:32:42 2023 -0300 @@ -1,7 +1,16 @@ Changelog ========= -11.0.0 - in progress +11.0.1 - in progress +-------------------- + + * compatibility with Mercurial 6.4 + +topic (1.0.1) + + * compatibility with Mercurial 6.4 + +11.0.0 -- 2023-02-26 -------------------- * packaging: list all contributors in debian/copyright diff -r 7766aee4a67a -r cac26830e34e Makefile --- a/Makefile Fri Feb 24 21:00:48 2023 +0400 +++ b/Makefile Tue Mar 21 20:32:42 2023 -0300 @@ -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 7766aee4a67a -r cac26830e34e README.rst --- a/README.rst Fri Feb 24 21:00:48 2023 +0400 +++ b/README.rst Tue Mar 21 20:32:42 2023 -0300 @@ -261,6 +261,8 @@ * upload the tarball to PyPI, +* build .deb on Heptapod CI for the tagged commit, + * make an announcement on evolve-testers@mercurial-scm.org and mercurial@mercurial-scm.org, diff -r 7766aee4a67a -r cac26830e34e debian/changelog --- a/debian/changelog Fri Feb 24 21:00:48 2023 +0400 +++ b/debian/changelog Tue Mar 21 20:32:42 2023 -0300 @@ -1,3 +1,9 @@ +mercurial-evolve (11.0.0-1) unstable; urgency=medium + + * new upstream release + + -- Anton Shestakov Sun, 26 Feb 2023 22:30:11 +0400 + mercurial-evolve (11.0.0rc0-1) unstable; urgency=medium * new upstream release diff -r 7766aee4a67a -r cac26830e34e hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Fri Feb 24 21:00:48 2023 +0400 +++ b/hgext3rd/evolve/cmdrewrite.py Tue Mar 21 20:32:42 2023 -0300 @@ -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 7766aee4a67a -r cac26830e34e hgext3rd/evolve/compat.py --- a/hgext3rd/evolve/compat.py Fri Feb 24 21:00:48 2023 +0400 +++ b/hgext3rd/evolve/compat.py Tue Mar 21 20:32:42 2023 -0300 @@ -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 7766aee4a67a -r cac26830e34e hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Fri Feb 24 21:00:48 2023 +0400 +++ b/hgext3rd/evolve/evolvecmd.py Tue Mar 21 20:32:42 2023 -0300 @@ -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 7766aee4a67a -r cac26830e34e hgext3rd/evolve/metadata.py --- a/hgext3rd/evolve/metadata.py Fri Feb 24 21:00:48 2023 +0400 +++ b/hgext3rd/evolve/metadata.py Tue Mar 21 20:32:42 2023 -0300 @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -__version__ = b'11.0.0.dev0' -testedwith = b'4.8 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' +__version__ = b'11.0.1.dev0' +testedwith = b'4.8 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.8' buglink = b'https://bz.mercurial-scm.org/' diff -r 7766aee4a67a -r cac26830e34e hgext3rd/evolve/rewind.py --- a/hgext3rd/evolve/rewind.py Fri Feb 24 21:00:48 2023 +0400 +++ b/hgext3rd/evolve/rewind.py Tue Mar 21 20:32:42 2023 -0300 @@ -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 7766aee4a67a -r cac26830e34e hgext3rd/evolve/rewriteutil.py --- a/hgext3rd/evolve/rewriteutil.py Fri Feb 24 21:00:48 2023 +0400 +++ b/hgext3rd/evolve/rewriteutil.py Tue Mar 21 20:32:42 2023 -0300 @@ -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 7766aee4a67a -r cac26830e34e hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Fri Feb 24 21:00:48 2023 +0400 +++ b/hgext3rd/topic/__init__.py Tue Mar 21 20:32:42 2023 -0300 @@ -233,9 +233,9 @@ b'log.topic': b'green_background', } -__version__ = b'1.0.0.dev0' +__version__ = b'1.0.1.dev0' -testedwith = b'4.8 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.8 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.8' buglink = b'https://bz.mercurial-scm.org/' diff -r 7766aee4a67a -r cac26830e34e tests/test-evolve-abort-orphan.t --- a/tests/test-evolve-abort-orphan.t Fri Feb 24 21:00:48 2023 +0400 +++ b/tests/test-evolve-abort-orphan.t Tue Mar 21 20:32:42 2023 -0300 @@ -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 7766aee4a67a -r cac26830e34e tests/test-evolve-interrupted.t --- a/tests/test-evolve-interrupted.t Fri Feb 24 21:00:48 2023 +0400 +++ b/tests/test-evolve-interrupted.t Tue Mar 21 20:32:42 2023 -0300 @@ -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 7766aee4a67a -r cac26830e34e tests/test-evolve-stop-orphan.t --- a/tests/test-evolve-stop-orphan.t Fri Feb 24 21:00:48 2023 +0400 +++ b/tests/test-evolve-stop-orphan.t Tue Mar 21 20:32:42 2023 -0300 @@ -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