Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package mercurial-extension-hg-evolve for
openSUSE:Factory checked in at 2025-12-02 13:20:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mercurial-extension-hg-evolve (Old)
and /work/SRC/openSUSE:Factory/.mercurial-extension-hg-evolve.new.14147
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mercurial-extension-hg-evolve"
Tue Dec 2 13:20:02 2025 rev:20 rq:1320761 version:11.1.10
Changes:
--------
---
/work/SRC/openSUSE:Factory/mercurial-extension-hg-evolve/mercurial-extension-hg-evolve.changes
2025-07-30 11:44:42.133044569 +0200
+++
/work/SRC/openSUSE:Factory/.mercurial-extension-hg-evolve.new.14147/mercurial-extension-hg-evolve.changes
2025-12-02 13:21:26.306081637 +0100
@@ -1,0 +2,13 @@
+Wed Nov 26 18:08:52 UTC 2025 - Sean Baggaley <[email protected]>
+
+- Update to version 11.1.10.
+ * compatibility with Mercurial 7.2
+ * docs: update issue tracker links
+ * tests: more compatibility with non-GNU tools
+ topic (1.1.10)
+ * compatibility with Mercurial 7.2
+ * topic: add _verifyall() call before updating _topiccache on hg <= 6.7
+ * topic: properly add branchmaptns method to wirepeer, making topic
+ namespaces work correctly during exchange via ssh or http(s)
+
+-------------------------------------------------------------------
Old:
----
hg_evolve-11.1.9.tar.gz
New:
----
hg_evolve-11.1.10.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mercurial-extension-hg-evolve.spec ++++++
--- /var/tmp/diff_new_pack.872T3b/_old 2025-12-02 13:21:28.114157518 +0100
+++ /var/tmp/diff_new_pack.872T3b/_new 2025-12-02 13:21:28.126158022 +0100
@@ -1,7 +1,7 @@
#
# spec file for package mercurial-extension-hg-evolve
#
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -28,7 +28,7 @@
%endif
Name: mercurial-extension-hg-evolve
-Version: 11.1.9
+Version: 11.1.10
Release: 0
Summary: Flexible evolution of Mercurial history
License: GPL-2.0-or-later
++++++ hg_evolve-11.1.9.tar.gz -> hg_evolve-11.1.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/CHANGELOG
new/hg_evolve-11.1.10/CHANGELOG
--- old/hg_evolve-11.1.9/CHANGELOG 2025-07-25 18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/CHANGELOG 2025-11-26 16:27:48.000000000 +0100
@@ -1,6 +1,23 @@
Changelog
=========
+11.1.10 -- 2025-11-26
+---------------------
+
+ * compatibility with Mercurial 7.2
+
+ * docs: update issue tracker links
+
+ * tests: more compatibility with non-GNU tools
+
+topic (1.1.10)
+
+ * compatibility with Mercurial 7.2
+
+ * topic: add _verifyall() call before updating _topiccache on hg <= 6.7
+ * topic: properly add branchmaptns method to wirepeer, making topic
+ namespaces work correctly during exchange via ssh or http(s)
+
11.1.9 -- 2025-07-25
--------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/PKG-INFO
new/hg_evolve-11.1.10/PKG-INFO
--- old/hg_evolve-11.1.9/PKG-INFO 2025-07-25 18:21:08.976573700 +0200
+++ new/hg_evolve-11.1.10/PKG-INFO 2025-11-26 16:28:34.613169000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: hg-evolve
-Version: 11.1.9
+Version: 11.1.10
Summary: Flexible evolution of Mercurial history.
Home-page: https://www.mercurial-scm.org/doc/evolution/
Author: Pierre-Yves David
@@ -212,10 +212,9 @@
.. _libera: https://libera.chat/
-Bugs are to be reported on the Mercurial's bug tracker (component:
-`evolution`_).
+Bugs are to be reported on the Mercurial's bug tracker (label: `evolution`_).
-.. _evolution:
https://bz.mercurial-scm.org/buglist.cgi?component=evolution&query_format=advanced&resolution=---
+.. _evolution:
https://foss.heptapod.net/mercurial/mercurial-devel/-/issues?label_name%5B%5D=evolution
The recommended way to submit a patch is to create a Merge Request on
https://foss.heptapod.net/mercurial/evolve. To do so, create an account and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/README.rst
new/hg_evolve-11.1.10/README.rst
--- old/hg_evolve-11.1.9/README.rst 2025-07-25 18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/README.rst 2025-11-24 19:26:18.000000000 +0100
@@ -185,10 +185,9 @@
.. _libera: https://libera.chat/
-Bugs are to be reported on the Mercurial's bug tracker (component:
-`evolution`_).
+Bugs are to be reported on the Mercurial's bug tracker (label: `evolution`_).
-.. _evolution:
https://bz.mercurial-scm.org/buglist.cgi?component=evolution&query_format=advanced&resolution=---
+.. _evolution:
https://foss.heptapod.net/mercurial/mercurial-devel/-/issues?label_name%5B%5D=evolution
The recommended way to submit a patch is to create a Merge Request on
https://foss.heptapod.net/mercurial/evolve. To do so, create an account and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hg_evolve.egg-info/PKG-INFO
new/hg_evolve-11.1.10/hg_evolve.egg-info/PKG-INFO
--- old/hg_evolve-11.1.9/hg_evolve.egg-info/PKG-INFO 2025-07-25
18:21:08.000000000 +0200
+++ new/hg_evolve-11.1.10/hg_evolve.egg-info/PKG-INFO 2025-11-26
16:28:34.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: hg-evolve
-Version: 11.1.9
+Version: 11.1.10
Summary: Flexible evolution of Mercurial history.
Home-page: https://www.mercurial-scm.org/doc/evolution/
Author: Pierre-Yves David
@@ -212,10 +212,9 @@
.. _libera: https://libera.chat/
-Bugs are to be reported on the Mercurial's bug tracker (component:
-`evolution`_).
+Bugs are to be reported on the Mercurial's bug tracker (label: `evolution`_).
-.. _evolution:
https://bz.mercurial-scm.org/buglist.cgi?component=evolution&query_format=advanced&resolution=---
+.. _evolution:
https://foss.heptapod.net/mercurial/mercurial-devel/-/issues?label_name%5B%5D=evolution
The recommended way to submit a patch is to create a Merge Request on
https://foss.heptapod.net/mercurial/evolve. To do so, create an account and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/evolve/__init__.py
new/hg_evolve-11.1.10/hgext3rd/evolve/__init__.py
--- old/hg_evolve-11.1.9/hgext3rd/evolve/__init__.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/evolve/__init__.py 2025-11-25
22:53:54.000000000 +0100
@@ -344,7 +344,7 @@
b'evolve.operation': b'bold'
}
-aliases, entry = cmdutil.findcmd(b'commit', commands.table)
+aliases, entry = compat.find_cmd(b'commit', commands.table)
# This extension contains the following code
#
@@ -451,7 +451,7 @@
@eh.uisetup
def setupparentcommand(ui):
- _alias, statuscmd = cmdutil.findcmd(b'status', commands.table)
+ _alias, statuscmd = compat.find_cmd(b'status', commands.table)
inapplicable = {b'rev', b'change'}
pstatusopts = [o for o in statuscmd[1] if o[1] not in inapplicable]
@@ -468,7 +468,7 @@
kwargs['rev'] = [b'.^']
return statuscmd[0](ui, repo, *args, **kwargs)
- _alias, diffcmd = cmdutil.findcmd(b'diff', commands.table)
+ _alias, diffcmd = compat.find_cmd(b'diff', commands.table)
inapplicable = {b'rev', b'from', b'to', b'change'}
pdiffopts = [o for o in diffcmd[1] if o[1] not in inapplicable]
@@ -607,7 +607,7 @@
@eh.uisetup
def _installimportobsolete(ui):
- entry = cmdutil.findcmd(b'import', commands.table)[1]
+ entry = compat.find_cmd(b'import', commands.table)[1]
entry[1].append((b'', b'obsolete', False,
_(b'mark the old node as obsoleted by '
b'the created commit')))
@@ -648,7 +648,7 @@
This function is loosely based on the extensions.wrapcommand function.
'''
try:
- aliases, entry = cmdutil.findcmd(newalias, cmdtable)
+ aliases, entry = compat.find_cmd(newalias, cmdtable)
except error.UnknownCommand:
# Commands may be disabled
return
@@ -701,8 +701,8 @@
if mergeopt:
updatecheck = b'none'
try:
- ret = hg.updatetotally(repo.ui, repo, target.node(), None,
- updatecheck=updatecheck)
+ ret = compat.hg_update_totally(repo.ui, repo, target.node(), None,
+ updatecheck=updatecheck)
except error.Abort as exc:
# replace the hint to mention about --merge option
exc.hint = _(b'do you want --merge?')
@@ -791,7 +791,7 @@
if ui.config(b'commands', b'update.check') == b'noconflict':
pass
else:
- cmdutil.bailifchanged(repo, hint=_(b'do you want --merge?'))
+ compat.bail_if_changed(repo, hint=_(b'do you want --merge?'))
topic = not opts.get("no_topic", False)
hastopic = bool(_getcurrenttopic(repo))
@@ -912,13 +912,13 @@
# check if working directory is clean before we evolve the next cset
if needevolve and opts['evolve']:
hint = _(b'use `hg amend`, `hg revert` or `hg shelve`')
- cmdutil.bailifchanged(repo, hint=hint)
+ compat.bail_if_changed(repo, hint=hint)
elif not opts['merge']:
# we only skip the check if noconflict is set
if ui.config(b'commands', b'update.check') == b'noconflict':
pass
else:
- cmdutil.bailifchanged(repo, hint=_(b'do you want --merge?'))
+ compat.bail_if_changed(repo, hint=_(b'do you want --merge?'))
if len(children) == 1 and (not opts['evolve'] or not aspchildren):
c = children[0]
@@ -970,7 +970,7 @@
def _nextevolve(ui, repo, aspchildren, opts):
"""logic for hg next command to evolve and update to an aspiring
children"""
- cmdutil.bailifchanged(repo)
+ compat.bail_if_changed(repo)
evolvestate = state.cmdstate(repo, opts={b'command': b'next',
b'bookmarkchanges': []})
with repo.wlock(), repo.lock():
@@ -1008,8 +1008,8 @@
if opts['merge']:
updatecheck = b'none'
try:
- ret = hg.updatetotally(ui, repo, child.node(), None,
- updatecheck=updatecheck)
+ ret = compat.hg_update_totally(ui, repo, child.node(), None,
+ updatecheck=updatecheck)
except error.Abort as exc:
# replace the hint to mention about --merge option
exc.hint = _(b'do you want --merge?')
@@ -1071,7 +1071,7 @@
@eh.extsetup
def oldevolveextsetup(ui):
- entry = cmdutil.findcmd(b'commit', commands.table)[1]
+ entry = compat.find_cmd(b'commit', commands.table)[1]
entry[1].append((b'o', b'obsolete', [],
_(b"make commit obsolete this revision (DEPRECATED)")))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/evolve/cmdrewrite.py
new/hg_evolve-11.1.10/hgext3rd/evolve/cmdrewrite.py
--- old/hg_evolve-11.1.9/hgext3rd/evolve/cmdrewrite.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/evolve/cmdrewrite.py 2025-11-24
19:26:18.000000000 +0100
@@ -20,7 +20,6 @@
context,
copies,
error,
- hg,
lock as lockmod,
merge,
node,
@@ -141,7 +140,7 @@
log = opts.get('logfile')
opts['amend'] = True
_resolveoptions(ui, opts)
- _alias, commitcmd = cmdutil.findcmd(b'commit', commands.table)
+ _alias, commitcmd = compat.find_cmd(b'commit', commands.table)
with repo.wlock(), repo.lock():
if not (edit or opts['message'] or log):
opts['message'] = repo[b'.'].description()
@@ -151,7 +150,7 @@
def amendpatch(ui, repo, *pats, **opts):
"""logic for --patch flag of `hg amend` command."""
with repo.wlock(), repo.lock(), repo.transaction(b'amend') as tr:
- cmdutil.bailifchanged(repo)
+ compat.bail_if_changed(repo)
# first get the patch
old = repo[b'.']
p1 = old.p1()
@@ -173,7 +172,7 @@
if opts.get('note'):
metadata[b'note'] = opts['note']
replacements = {(old.node(),): [newnode]}
- scmutil.cleanupnodes(repo, replacements, operation=b'amend',
+ compat.cleanup_nodes(repo, replacements, operation=b'amend',
metadata=metadata)
phases.retractboundary(repo, tr, old.phase(), [newnode])
compat.clean_update(repo[newnode])
@@ -467,7 +466,7 @@
metadata[b'note'] = opts['note']
replacements = {(old.node(),): [newid]}
- scmutil.cleanupnodes(repo, replacements, operation=b"uncommit",
+ compat.cleanup_nodes(repo, replacements, operation=b"uncommit",
metadata=metadata)
phases.retractboundary(repo, tr, oldphase, [newid])
if opts.get('revert'):
@@ -702,14 +701,14 @@
commitopts=commitopts)
phases.retractboundary(repo, tr, targetphase, [newid])
replacements = {tuple(ctx.node() for ctx in allctx): [newid]}
- scmutil.cleanupnodes(repo, replacements, operation=b"fold",
+ compat.cleanup_nodes(repo, replacements, operation=b"fold",
metadata=metadata)
tr.close()
finally:
tr.release()
ui.status(b'%i changesets folded\n' % len(revs))
if repo[b'.'].rev() in revs:
- hg.update(repo, newid)
+ compat.hg_update(repo, newid)
finally:
lockmod.release(lock, wlock)
@@ -829,7 +828,7 @@
phases.retractboundary(repo, tr, targetphase, [newid])
replacements = {tuple(ctx.node() for ctx in allctx): (newid,)}
- scmutil.cleanupnodes(repo, replacements, operation=b"metaedit",
+ compat.cleanup_nodes(repo, replacements, operation=b"metaedit",
metadata=metadata)
else:
ui.status(_(b"nothing changed\n"))
@@ -840,7 +839,7 @@
if opts['fold']:
ui.status(b'%i changesets folded\n' % len(revs))
if newp1 is not None:
- hg.update(repo, newp1)
+ compat.hg_update(repo, newp1)
metadataopts = [
(b'd', b'date', b'',
@@ -1065,7 +1064,7 @@
break
if len(sucs) == 1 and len(precs) > 1 and fold:
replacements = {tuple(p.node() for p in precs): [s.node() for s in
sucs]}
- scmutil.cleanupnodes(repo, replacements, operation=b"prune",
moves=moves,
+ compat.cleanup_nodes(repo, replacements, operation=b"prune",
moves=moves,
metadata=metadata)
# informs that changeset have been pruned
@@ -1121,7 +1120,7 @@
lock = repo.lock()
ctx = scmutil.revsingle(repo, revarg)
rev = ctx.rev()
- cmdutil.bailifchanged(repo)
+ compat.bail_if_changed(repo)
rewriteutil.precheck(repo, [rev], action=b'split')
tr = repo.transaction(b'split')
# make sure we respect the phase while splitting
@@ -1386,7 +1385,7 @@
elif abort:
return abortpick(ui, repo, pickstate)
else:
- cmdutil.bailifchanged(repo)
+ compat.bail_if_changed(repo)
revs = scmutil.revrange(repo, revs)
if len(revs) > 1:
raise error.Abort(_(b"specify just one revision"))
@@ -1435,7 +1434,7 @@
else:
newctx = repo[newnode]
replacements = {(origctx.node(),): [newctx.node()]}
- scmutil.cleanupnodes(repo, replacements, operation=b"pick")
+ compat.cleanup_nodes(repo, replacements, operation=b"pick")
if newnode is None:
ui.warn(_(b"note: picking %d:%s created no changes to commit\n") %
@@ -1573,7 +1572,7 @@
)
phases.retractboundary(repo, tr, target_ctx.phase(), [newid])
replacements = {tuple(ctx.node() for ctx in allctx): [newid]}
- scmutil.cleanupnodes(repo, replacements, operation=b'fixup')
+ compat.cleanup_nodes(repo, replacements, operation=b'fixup')
fixup_state.delete()
compat.update(repo.unfiltered()[tempnode])
return 0
@@ -1601,7 +1600,7 @@
)
phases.retractboundary(repo, tr, target_ctx.phase(), [newid])
replacements = {tuple(ctx.node() for ctx in allctx): [newid]}
- scmutil.cleanupnodes(repo, replacements, operation=b'fixup')
+ compat.cleanup_nodes(repo, replacements, operation=b'fixup')
fixup_state.delete()
compat.update(repo.unfiltered()[tempnode])
return 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/evolve/compat.py
new/hg_evolve-11.1.10/hgext3rd/evolve/compat.py
--- old/hg_evolve-11.1.9/hgext3rd/evolve/compat.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/evolve/compat.py 2025-11-24
19:26:18.000000000 +0100
@@ -48,6 +48,36 @@
# hg <= 5.5 (19590b126764)
hasmemmergestate = False
+# hg <= 7.1 (d32b62bf63c8)
+try:
+ from mercurial.main_script import cmd_finder
+ find_cmd = cmd_finder.find_cmd
+except (AttributeError, ImportError):
+ find_cmd = cmdutil.findcmd # pytype: disable=module-attr
+
+# hg <= 7.1 (7c6e323cb685)
+try:
+ bail_if_changed = scmutil.bail_if_changed
+except AttributeError:
+ bail_if_changed = cmdutil.bailifchanged # pytype: disable=module-attr
+
+# hg <= 7.1 (28dbb31f7317)
+try:
+ cleanup_nodes = cmdutil.cleanup_nodes
+except AttributeError:
+ cleanup_nodes = scmutil.cleanupnodes # pytype: disable=module-attr
+
+# hg <= 7.1 (6ca1d7250a7b)
+try:
+ from mercurial.cmd_impls import update as updatemod
+ hg_show_stats = updatemod.show_stats
+ hg_update = updatemod.update
+ hg_update_totally = updatemod.update_totally
+except (AttributeError, ImportError):
+ hg_show_stats = hg._showstats # pytype: disable=module-attr
+ hg_update = hg.update # pytype: disable=module-attr
+ hg_update_totally = hg.updatetotally # pytype: disable=module-attr
+
from . import (
exthelper,
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/evolve/evolvecmd.py
new/hg_evolve-11.1.10/hgext3rd/evolve/evolvecmd.py
--- old/hg_evolve-11.1.9/hgext3rd/evolve/evolvecmd.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/evolve/evolvecmd.py 2025-11-24
19:26:18.000000000 +0100
@@ -13,13 +13,11 @@
from mercurial import (
bookmarks as bookmarksmod,
- cmdutil,
commands,
context,
encoding,
error,
extensions,
- hg,
merge,
mergeutil,
node as nodemod,
@@ -587,7 +585,7 @@
force=False,
ancestor=base.node(),
mergeancestor=mergeancestor)
- hg._showstats(repo, stats)
+ compat.hg_show_stats(repo, stats)
# conflicts while merging content-divergent changesets
if stats.unresolvedcount:
@@ -1704,7 +1702,7 @@
return 0
return abortevolve(ui, repo, evolvestate)
else:
- cmdutil.bailifchanged(repo)
+ compat.bail_if_changed(repo)
obswdir = repo[b'.'].obsolete()
revs = _selectrevs(repo, allopt, revopt, anyopt, targetcat)
@@ -1838,7 +1836,7 @@
if dryrunopt:
return 0
- res = hg.update(repo, ctx.rev())
+ res = compat.hg_update(repo, ctx.rev())
newid = ctx.node()
if ctx != oldctx:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/evolve/metadata.py
new/hg_evolve-11.1.10/hgext3rd/evolve/metadata.py
--- old/hg_evolve-11.1.9/hgext3rd/evolve/metadata.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/evolve/metadata.py 2025-11-26
16:27:48.000000000 +0100
@@ -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.1.9'
-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
6.5 6.6 6.7 6.8 6.9 7.0 7.1'
+__version__ = b'11.1.10'
+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
6.5 6.6 6.7 6.8 6.9 7.0 7.1 7.2'
minimumhgversion = b'4.9'
-buglink = b'https://bz.mercurial-scm.org/'
+buglink =
b'https://foss.heptapod.net/mercurial/mercurial-devel/-/issues?label_name%5B%5D=evolution'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/evolve/rewind.py
new/hg_evolve-11.1.10/hgext3rd/evolve/rewind.py
--- old/hg_evolve-11.1.9/hgext3rd/evolve/rewind.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/evolve/rewind.py 2025-11-24
19:26:18.000000000 +0100
@@ -92,7 +92,7 @@
sscache = {}
with repo.wlock(), repo.lock():
# stay on the safe side: prevent local case in case we need to upgrade
- cmdutil.bailifchanged(repo)
+ compat.bail_if_changed(repo)
targets = _select_rewind_targets(repo, opts)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/evolve/rewriteutil.py
new/hg_evolve-11.1.10/hgext3rd/evolve/rewriteutil.py
--- old/hg_evolve-11.1.9/hgext3rd/evolve/rewriteutil.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/evolve/rewriteutil.py 2025-11-24
19:26:18.000000000 +0100
@@ -19,7 +19,6 @@
context,
copies,
error,
- hg,
lock as lockmod,
mergeutil,
node,
@@ -207,7 +206,7 @@
def presplitupdate(repo, ui, prev, ctx):
"""prepare the working directory for a split (for topic hooking)
"""
- hg.update(repo, prev)
+ compat.hg_update(repo, prev)
commands.revert(ui, repo, rev=ctx.hex(), all=True)
def reachablefrombookmark(repo, revs, bookmarks):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/topic/README
new/hg_evolve-11.1.10/hgext3rd/topic/README
--- old/hg_evolve-11.1.9/hgext3rd/topic/README 2025-07-25 18:21:02.000000000
+0200
+++ new/hg_evolve-11.1.10/hgext3rd/topic/README 2025-09-02 15:22:20.000000000
+0200
@@ -30,7 +30,7 @@
To install a local version from source::
- $ hg clone https://www.mercurial-scm.org/repo/evolve/
+ $ hg clone https://repo.mercurial-scm.org/evolve/
$ cd evolve
$ make install-home
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/topic/__init__.py
new/hg_evolve-11.1.10/hgext3rd/topic/__init__.py
--- old/hg_evolve-11.1.9/hgext3rd/topic/__init__.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/topic/__init__.py 2025-11-26
16:27:48.000000000 +0100
@@ -176,7 +176,6 @@
error,
exchange,
extensions,
- hg,
localrepo,
lock as lockmod,
logcmdutil,
@@ -238,11 +237,11 @@
b'log.topic': b'green_background',
}
-__version__ = b'1.1.9'
+__version__ = b'1.1.10'
-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
6.5 6.6 6.7 6.8 6.9 7.0 7.1'
+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
6.5 6.6 6.7 6.8 6.9 7.0 7.1 7.2'
minimumhgversion = b'4.9'
-buglink = b'https://bz.mercurial-scm.org/'
+buglink =
b'https://foss.heptapod.net/mercurial/mercurial-devel/-/issues?label_name%5B%5D=topic-experiment'
configtable = {}
configitem = registrar.configitem(configtable)
@@ -443,6 +442,10 @@
with discovery.override_context_branch(repo) as repo:
return orig(ui, repo, *args, **kwargs)
+def wrap_tag_cmd(orig, ui, repo, *args, **kwargs):
+ with discovery.override_context_branch(repo) as repo:
+ return orig(ui, repo, *args, **kwargs)
+
def wrapwctxbranch(orig, self):
branch = orig(self)
return common.formatfqbn(branch=branch)
@@ -588,6 +591,8 @@
extensions.wrapcommand(commands.table, b'summary', wrap_summary)
+ extensions.wrapcommand(commands.table, b'tag', wrap_tag_cmd)
+
try:
evolve = extensions.find(b'evolve')
extensions.wrapfunction(evolve.rewriteutil, "presplitupdate",
@@ -1461,7 +1466,7 @@
# create obsmarkers and move bookmarks
# XXX we should be creating marker as we go instead of only at the end,
# this makes the operations more modulars
- scmutil.cleanupnodes(repo, successors, b'changetopics')
+ compat.cleanup_nodes(repo, successors, b'changetopics')
# move the working copy too
wctx = repo[None]
@@ -1469,7 +1474,7 @@
if len(wctx.parents()) == 1:
newid = successors.get(wctx.p1().node())
if newid is not None:
- hg.update(repo, newid[0], quietempty=True)
+ compat.hg_update(repo, newid[0], quietempty=True)
return rewrote
def _listtopics(ui, repo, opts):
@@ -1691,8 +1696,7 @@
try:
mergemode = repo.ui.config(b'experimental', b'topic.linear-merge')
- cleanup = lambda: None
- oldrepo = repo
+ old = None
if mergemode == b'allow-from-bare-branch' and not repo[None].topic():
unfi = repo.unfiltered()
oldrepo = repo
@@ -1713,14 +1717,12 @@
if repo.filtername is not None:
repo = unfi.filtered(repo.filtername)
- def cleanup():
- unfi.__class__ = old
-
try:
ret = orig(repo, node, branchmerge, force, *args, **kwargs)
finally:
- cleanup()
- repo = oldrepo
+ if old is not None:
+ unfi.__class__ = old
+ repo = oldrepo
if not hastopicext(repo):
return ret
@@ -1947,7 +1949,7 @@
successors = {}
for rev in revs:
_clear_tns_extras(ui, repo, rev, successors)
- scmutil.cleanupnodes(repo, successors,
b'debug-default-topic-namespace')
+ compat.cleanup_nodes(repo, successors,
b'debug-default-topic-namespace')
return
displayer = logcmdutil.changesetdisplayer(ui, repo, opts)
logcmdutil.displayrevs(ui, repo, revs, displayer, None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/topic/compat.py
new/hg_evolve-11.1.10/hgext3rd/topic/compat.py
--- old/hg_evolve-11.1.9/hgext3rd/topic/compat.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/topic/compat.py 2025-11-25
20:56:25.000000000 +0100
@@ -13,17 +13,31 @@
error,
extensions,
pycompat,
+ scmutil,
util,
)
-if pycompat.ispy3:
- def branchmapitems(branchmap):
- return branchmap.items()
-else:
- # py3-transform: off
- def branchmapitems(branchmap):
+# hg <= 7.1 (28dbb31f7317)
+try:
+ cleanup_nodes = cmdutil.cleanup_nodes
+except AttributeError:
+ cleanup_nodes = scmutil.cleanupnodes # pytype: disable=module-attr
+
+# hg <= 7.1 (6ca1d7250a7b)
+try:
+ from mercurial.cmd_impls import update as updatemod
+ hg_update = updatemod.update
+except (AttributeError, ImportError):
+ from mercurial import hg
+ hg_update = hg.update # pytype: disable=module-attr
+
+def branchmapitems(branchmap):
+ if hasattr(branchmap, 'iteritems'):
+ # py2 compat
return branchmap.iteritems()
- # py3-transform: on
+ if hasattr(branchmap, 'items'):
+ return branchmap.items()
+ return [(b, branchmap.branchheads(b, closed=True)) for b in branchmap]
def bcentries(branchcache):
if util.safehasattr(branchcache, '_entries'):
@@ -50,10 +64,15 @@
def overridecommitstatus(overridefn):
code = cmdutil.commitstatus.__code__
- if r'opts' in code.co_varnames[code.co_argcount:]:
- # commitstatus(..., **opts)
+ if r'head_change' in code.co_varnames:
+ # commitstatus(repo, node, head_change=None, tip=None, **opts)
+ extensions.wrapfunction(cmdutil, 'commitstatus', overridefn)
+ elif r'opts' in code.co_varnames[code.co_argcount:]:
+ # commitstatus(repo, node, branch, bheads=None, tip=None, **opts)
+ # hg <= 7.1 (45c5b012cffc)
extensions.wrapfunction(cmdutil, 'commitstatus', overridefn)
elif r'tip' in code.co_varnames:
+ # commitstatus(repo, node, branch, bheads=None, tip=None, opts=None)
# hg <= 6.5 (489268c8ee7e)
def _override(orig, repo, node, branch, bheads=None, tip=None,
opts=None):
def _orig(repo, node, branch, bheads=None, tip=None, **opts):
@@ -65,6 +84,7 @@
return overridefn(_orig, repo, node, branch, bheads=bheads,
tip=tip, **opts)
extensions.wrapfunction(cmdutil, 'commitstatus', _override)
else:
+ # commitstatus(repo, node, branch, bheads=None, opts=None)
# hg <= 5.6 (976b26bdd0d8)
def _override(orig, repo, node, branch, bheads=None, opts=None):
def _orig(repo, node, branch, bheads=None, **opts):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/topic/discovery.py
new/hg_evolve-11.1.10/hgext3rd/topic/discovery.py
--- old/hg_evolve-11.1.9/hgext3rd/topic/discovery.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/topic/discovery.py 2025-11-26
15:43:43.000000000 +0100
@@ -15,9 +15,10 @@
scmutil,
util,
wireprototypes,
+ wireprotov1peer,
wireprotov1server,
)
-from mercurial.wireprotov1peer import wirepeer
+from mercurial.wireprotov1peer import batchable, wirepeer
from . import (
common,
compat,
@@ -29,6 +30,22 @@
# hg <= 6.8 (f0e07efc199f)
from mercurial.branchmap import revbranchcache
+try:
+ from mercurial.branchmap import branchcache
+ branchcache.__init__ # please flake8
+ branchcache_may_skip_repo = True
+ # used for compart with:
+ # hg <= 5.7 (6266d19556ad)
+except ImportError:
+ branchcache_may_skip_repo = False
+
+try:
+ from mercurial import bundle2_part_handlers
+ bundle2_part_handlers.handlecheckheads
+except ImportError:
+ # hg <= 7.1 (503d63ff9b1a)
+ from mercurial import bundle2 as bundle2_part_handlers
+
urlreq = util.urlreq
@contextlib.contextmanager
@@ -88,7 +105,6 @@
remote = pushop.remote
publishedset = ()
- remotebranchmap = None
if remote.capable(b'topics-namespaces'):
origremotebranchmap = remote.branchmaptns
else:
@@ -127,7 +143,8 @@
def remotebranchmap():
# drop topic information from changeset about to be published
result = collections.defaultdict(list)
- items = list(compat.branchmapitems(origremotebranchmap()))
+ bm = origremotebranchmap()
+ items = list(compat.branchmapitems(bm))
if not remote.capable(b'topics-namespaces'):
items = [(common.upgradeformat(branch), heads) for branch, heads
in items]
for branch, heads in items:
@@ -140,12 +157,23 @@
result[branch].append(h)
for heads in result.values():
heads.sort()
+ if hasattr(bm, '_closednodes'):
+ # we need to return an object of the same class as the original
+ # remote branchmap (unless it was a simple dict)
+ # hg <= 7.1 (f5f95560ee6a)
+ if branchcache_may_skip_repo and not hasattr(bm, '_repo'):
+ # hg <= 5.7 (6266d19556ad)
+ result = bm.__class__(result)
+ else:
+ result = bm.__class__(repo, result)
+ elif hasattr(bm, 'branchheads'):
+ # RemoteBranchMap, starting with Mercurial 7.2
+ result = wireprotov1peer.RemoteBranchMap(result)
return result
with ctxoverride, configoverride:
try:
- if remotebranchmap is not None:
- remote.branchmap = remotebranchmap
+ remote.branchmap = remotebranchmap
unxx = repo.filtered(b'unfiltered-topic')
repo.unfiltered = lambda: unxx
pushop.repo = repo
@@ -159,8 +187,7 @@
finally:
if r'unfiltered' in vars(repo):
del repo.unfiltered
- if remotebranchmap is not None:
- remote.branchmap = origremotebranchmap
+ remote.branchmap = origremotebranchmap
def wireprotobranchmap(orig, repo, proto):
if not common.hastopicext(repo):
@@ -255,13 +282,13 @@
# hg <= 6.0 (053a5bf508da)
filterfn = _filter_obsolete_heads
data = {}
- for b in repo.branchmap().iterbranches():
- namedbranch, tns, topic = common.parsefqbn(b[0])
+ for branch, nodes in compat.branchmapitems(repo.branchmap()):
+ namedbranch, tns, topic = common.parsefqbn(branch)
if tns != b'none' or topic:
continue
- oldheads = [repo[n].rev() for n in b[1]]
+ oldheads = [repo[n].rev() for n in nodes]
newheads = filterfn(repo, oldheads)
- data[b[0]] = newheads
+ data[branch] = newheads
return data
def handlecheckheads(orig, op, inpart):
@@ -394,23 +421,42 @@
wireprotov1server.commands.pop(b'branchmap')
wireprotov1server.wireprotocommand(b'branchmap',
permission=b'pull')(wireprotov1server.branchmap)
extensions.wrapfunction(wireprotov1server, '_capabilities', wireprotocaps)
- wirepeer.branchmaptns = wirepeer.branchmap
wireprotov1server.wireprotocommand(b'branchmaptns',
permission=b'pull')(wireprotobranchmaptns)
extensions.wrapfunction(revbranchcache, 'branchinfo', wrapbranchinfo)
# branchinfo method can get replaced by _branchinfo method directly when
# on-disk revbranchcache is not available, see revbranchcache.__init__()
extensions.wrapfunction(revbranchcache, '_branchinfo', wrapslowbranchinfo)
# we need a proper wrap b2 part stuff
- extensions.wrapfunction(bundle2, 'handlecheckheads', handlecheckheads)
- bundle2.handlecheckheads.params = frozenset()
- bundle2.parthandlermapping[b'check:heads'] = bundle2.handlecheckheads
- if util.safehasattr(bundle2, 'handlecheckupdatedheads'):
+ extensions.wrapfunction(bundle2_part_handlers, 'handlecheckheads',
handlecheckheads)
+ bundle2_part_handlers.handlecheckheads.params = frozenset()
+ bundle2_part_handlers.parthandlermapping[b'check:heads'] =
bundle2_part_handlers.handlecheckheads
+ if util.safehasattr(bundle2_part_handlers, 'handlecheckupdatedheads'):
# we still need a proper wrap b2 part stuff
- extensions.wrapfunction(bundle2, 'handlecheckupdatedheads',
handlecheckheads)
- bundle2.handlecheckupdatedheads.params = frozenset()
- bundle2.parthandlermapping[b'check:updated-heads'] =
bundle2.handlecheckupdatedheads
+ extensions.wrapfunction(bundle2_part_handlers,
'handlecheckupdatedheads', handlecheckheads)
+ bundle2_part_handlers.handlecheckupdatedheads.params = frozenset()
+ bundle2_part_handlers.parthandlermapping[b'check:updated-heads'] =
bundle2_part_handlers.handlecheckupdatedheads
extensions.wrapfunction(bundle2, 'addpartrevbranchcache',
wrapaddpartrevbranchcache)
extensions.wrapfunction(exchange, '_pushb2phases', _pushb2phases)
exchange.b2partsgenmapping[b'phase'] = exchange._pushb2phases
extensions.wrapfunction(hg, 'peer', wraphgpeer)
- extensions.wrapfunction(hg, 'remoteui', wraphgremoteui)
+ try:
+ from mercurial.repo import factory
+ extensions.wrapfunction(factory, '_remoteui', wraphgremoteui)
+ except (AttributeError, ImportError):
+ # hg <= 7.1 (5712c13ffe37)
+ extensions.wrapfunction(hg, 'remoteui', wraphgremoteui)
+
+ # annoyingly complicated dance around wirepeer
+ def branchmaptns(self):
+ """Decode branchmaptns data sent by the server.
+
+ This function must be called branchmaptns, see
+ @wireprotov1peer.batchable.
+ """
+ return self._origbranchmap()
+
+ # we're saving the original branchmap method (without the @batchable
+ # wrapping) to use it inside branchmaptns, since the parsing is identical,
+ # but we temporarily replace the original method in _headssummary()
+ wirepeer._origbranchmap = wirepeer.branchmap.batchable
+ wirepeer.branchmaptns = batchable(branchmaptns)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/topic/flow.py
new/hg_evolve-11.1.10/hgext3rd/topic/flow.py
--- old/hg_evolve-11.1.9/hgext3rd/topic/flow.py 2025-07-25 18:21:02.000000000
+0200
+++ new/hg_evolve-11.1.10/hgext3rd/topic/flow.py 2025-11-25
20:13:46.000000000 +0100
@@ -17,8 +17,8 @@
)
def enforcesinglehead(repo, tr):
- branchmap = repo.filtered(b'visible').branchmap()
- for name, heads in compat.branchmapitems(branchmap):
+ entries = compat.bcentries(repo.filtered(b'visible').branchmap())
+ for name, heads in compat.branchmapitems(entries):
if len(heads) > 1:
hexs = [node.short(n) for n in heads]
raise error.Abort(_(b'%d heads on "%s"') % (len(heads), name),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/topic/revset.py
new/hg_evolve-11.1.10/hgext3rd/topic/revset.py
--- old/hg_evolve-11.1.9/hgext3rd/topic/revset.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/topic/revset.py 2025-11-24
19:26:18.000000000 +0100
@@ -14,6 +14,12 @@
stack,
)
+# hg <= 7.1 (63d119607447)
+try:
+ from mercurial.revset_predicates import _notpublic
+except ImportError:
+ from mercurial.revset import _notpublic # pytype: disable=import-error
+
revsetpredicate = registrar.revsetpredicate()
def getstringstrict(x, err):
@@ -32,7 +38,7 @@
"""
args = revset.getargs(x, 0, 1, b'topicnamespace takes one or no arguments')
- mutable = revset._notpublic(repo, revset.fullreposet(repo), ())
+ mutable = _notpublic(repo, revset.fullreposet(repo), ())
if not args:
return (subset & mutable).filter(lambda r: repo[r].topic_namespace()
!= b'none')
@@ -78,7 +84,7 @@
"""
args = revset.getargs(x, 0, 1, b'topic takes one or no arguments')
- mutable = revset._notpublic(repo, revset.fullreposet(repo), ())
+ mutable = _notpublic(repo, revset.fullreposet(repo), ())
if not args:
return (subset & mutable).filter(lambda r: bool(repo[r].topic()))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/hgext3rd/topic/topicmap.py
new/hg_evolve-11.1.10/hgext3rd/topic/topicmap.py
--- old/hg_evolve-11.1.9/hgext3rd/topic/topicmap.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/hgext3rd/topic/topicmap.py 2025-11-26
00:36:20.000000000 +0100
@@ -6,6 +6,7 @@
from mercurial import (
branchmap,
changegroup,
+ cmdutil,
extensions,
repoview,
util,
@@ -89,7 +90,12 @@
_setuptopicfilter(ui)
_wrapbmcache(ui)
extensions.wrapfunction(changegroup.cg1unpacker, 'apply', cgapply)
- compat.overridecommitstatus(commitstatus)
+ if util.safehasattr(cmdutil, 'future_head_change'):
+ extensions.wrapfunction(cmdutil, 'future_head_change', fhchange)
+ compat.overridecommitstatus(commitstatusv4)
+ else:
+ # hg <= 7.1 (45c5b012cffc)
+ compat.overridecommitstatus(commitstatus)
def cgapply(orig, self, repo, *args, **kwargs):
"""make sure a topicmap is used when applying a changegroup"""
@@ -100,6 +106,11 @@
other = repo.filtered(newfilter)
return orig(self, other, *args, **kwargs)
+def fhchange(orig, repo, close_branch):
+ """same as cmdutil.future_head_change() in core, but with topics"""
+ with discovery.override_context_branch(repo) as repo:
+ return orig(repo, close_branch)
+
def commitstatus(orig, repo, node, branch, bheads=None, tip=None, **opts):
# wrap commit status use the topic branch heads
ctx = repo[node]
@@ -124,6 +135,31 @@
return ret
+def commitstatusv4(orig, repo, node, head_change=None, tip=None, **opts):
+ ctx = repo[node]
+
+ if head_change is not None and ctx.topic():
+ head_change.new_head = False
+
+ with discovery.override_context_branch(repo) as repo:
+ # technically core function doesn't need this context branch override,
+ # but we do it anyway just in case
+ ret = orig(repo, node, head_change=head_change, tip=tip, **opts)
+
+ if tip is not None and repo.changelog.tip() == tip:
+ # "commit already existed"
+ return ret
+
+ if ctx.topic():
+ # we already use topic
+ return ret
+
+ if head_change is not None and head_change.new_head:
+ repo.ui.status(_(b"(consider using topic for lightweight branches."
+ b" See 'hg help topic')\n"))
+
+ return ret
+
def _wrapbmcache(ui):
if util.safehasattr(branchmap, 'BranchCacheV2'):
class TopicCache(_TopicCacheV2, branchmap.BranchCacheV2):
@@ -263,6 +299,10 @@
"""
assert isinstance(self, allbccls) # help pytype
if not istopicfilter(repo.filtername):
+ # older version doesn't have _verifyall
+ # hg <= 4.9 '2f8147521e59'
+ if hasattr(self, '_verifyall'):
+ self._verifyall()
return super(_topiccache, self).update(repo, revgen)
# See topic.discovery._headssummary(), where repo.unfiltered gets
@@ -273,6 +313,10 @@
# removed too.
repo.unfiltered().revbranchcache()
+ # older version doesn't have _verifyall
+ # hg <= 4.9 '2f8147521e59'
+ if hasattr(self, '_verifyall'):
+ self._verifyall()
super(_topiccache, self).update(repo, revgen)
self.phaseshash = _phaseshash(repo, self.tiprev)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/setup.py
new/hg_evolve-11.1.10/setup.py
--- old/hg_evolve-11.1.9/setup.py 2025-07-25 18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/setup.py 2025-09-02 15:22:20.000000000 +0200
@@ -1,6 +1,7 @@
-from distutils.core import setup
from os.path import dirname, join
+from setuptools import setup
+
META_PATH = 'hgext3rd/evolve/metadata.py'
def get_metadata():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/tests/hghaveaddon.py
new/hg_evolve-11.1.10/tests/hghaveaddon.py
--- old/hg_evolve-11.1.9/tests/hghaveaddon.py 2025-07-25 18:21:02.000000000
+0200
+++ new/hg_evolve-11.1.10/tests/hghaveaddon.py 2025-11-22 02:11:01.000000000
+0100
@@ -13,7 +13,7 @@
return False
return True
[email protected]("flake8", "Flake8 python linter")
[email protected]("flake8-mod", "Flake8 linter as a Python module")
def has_flake8():
try:
import flake8
@@ -24,6 +24,17 @@
else:
return True
[email protected]("pyflakes-mod", "Pyflakes linter as a Python module")
+def has_pyflakes_mod():
+ try:
+ import pyflakes
+
+ pyflakes.__version__
+ except ImportError:
+ return False
+ else:
+ return True
+
@hghave.check("check-manifest", "check-manifest MANIFEST.in checking tool")
def has_check_manifest():
return hghave.matchoutput('check-manifest --version 2>&1',
@@ -37,8 +48,22 @@
@hghave.check("default-cg3", "changegroup3 by default")
def has_default_changegroup3():
from mercurial import configitems
+ # experimental.changegroup3 existed for a long time (before our minimum
+ # supported version), first False by default, then True by default, then it
+ # was removed
+
+ # default=False hg <= 6.4 (2cf264e9aa75)
+ # default=True hg <= 7.1 (02cd625b4a78)
try:
return configitems.coreitems[b'experimental'][b'changegroup3'].default
- except (AttributeError, KeyError):
+ except KeyError:
+ return True
+
[email protected]("delta-compression", "Delta compression")
+def has_delta_compression():
+ try:
+ from mercurial.util import compression
+ return getattr(compression.compressormanager,
'supported_wire_delta_compression', None) is not None
+ except (AttributeError, ImportError):
return False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/tests/test-check-compat-strings.t
new/hg_evolve-11.1.10/tests/test-check-compat-strings.t
--- old/hg_evolve-11.1.9/tests/test-check-compat-strings.t 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/tests/test-check-compat-strings.t 2025-11-26
00:36:20.000000000 +0100
@@ -1,3 +1,5 @@
+#require test-repo
+
Enable obsolescence to avoid the warning issue when obsmarkers are found
$ cat << EOF >> $HGRCPATH
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/tests/test-check-flake8.t
new/hg_evolve-11.1.10/tests/test-check-flake8.t
--- old/hg_evolve-11.1.9/tests/test-check-flake8.t 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/tests/test-check-flake8.t 2025-11-26
00:36:20.000000000 +0100
@@ -1,4 +1,4 @@
-#require test-repo flake8
+#require test-repo flake8-mod
$ . "$RUNTESTDIR/helpers-testrepo.sh"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/tests/test-check-pyflakes.t
new/hg_evolve-11.1.10/tests/test-check-pyflakes.t
--- old/hg_evolve-11.1.9/tests/test-check-pyflakes.t 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/tests/test-check-pyflakes.t 2025-11-26
00:36:20.000000000 +0100
@@ -1,4 +1,4 @@
-#require test-repo pyflakes
+#require test-repo pyflakes-mod
$ . "$RUNTESTDIR/helpers-testrepo.sh"
@@ -11,4 +11,4 @@
$ testrepohg files -0 'set:(**.py or grep("^#!.*python")) - removed()' \
> -X hgext3rd/evolve/thirdparty \
> 2>/dev/null \
- > | xargs -0 "$PYTHON" -m pyflakes 2>/dev/null
+ > | xargs -0 "$PYTHON" -m pyflakes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/tests/test-check-sdist.t
new/hg_evolve-11.1.10/tests/test-check-sdist.t
--- old/hg_evolve-11.1.9/tests/test-check-sdist.t 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/tests/test-check-sdist.t 2025-11-26
00:36:20.000000000 +0100
@@ -1,5 +1,11 @@
Enable obsolescence to avoid the warning issue when obsmarkers are found
+
+ $ if ! "$PYTHON" -c "from setuptools import setup" ; then
+ > echo "skipped: setuptools not installed" >&2
+ > exit 80
+ > fi
+
$ cat << EOF >> "$HGRCPATH"
> [experimental]
> evolution = all
@@ -12,24 +18,15 @@
#if test-repo
$ . "$RUNTESTDIR/helpers-testrepo.sh"
- $ testrepohg archive "$TESTTMP"/hg-evolve
+ $ testrepohg archive --rev 'wdir()' "$TESTTMP"/hg-evolve
$ cd "$TESTTMP"/hg-evolve
#endif
$ "$PYTHON" setup.py check --metadata --restructuredtext
+ running check
- $ "$PYTHON" setup.py sdist --dist-dir "$TESTTMP"/dist > /dev/null
- */dist.py:*: UserWarning: Unknown distribution option: 'python_requires'
(glob) (?)
- warnings.warn(msg) (?)
- warning: no previously-included files found matching 'docs/tutorial/.netlify'
- warning: no previously-included files found matching '.gitlab-ci.yml'
- warning: no previously-included files found matching '.hg-format-source'
- warning: no previously-included files found matching 'Makefile'
- no previously-included directories found matching 'contrib'
- no previously-included directories found matching 'debian'
- no previously-included directories found matching '.gitlab'
- no previously-included directories found matching 'tests/blacklists'
+ $ "$PYTHON" setup.py sdist --dist-dir "$TESTTMP"/dist > /dev/null 2>&1
$ cd "$TESTTMP"/dist
$ find hg?evolve-*.tar.gz -size +800000c
@@ -39,9 +36,9 @@
$ grep -E '^tests/test-.*\.(t|py)$' ../files > ../test-files
$ grep -E -v '^tests/test-.*\.(t|py)$' ../files > ../other-files
$ wc -l ../other-files
- ??? ../other-files (glob)
+ [ \t]*[0-9]{3} ../other-files (re)
$ wc -l ../test-files
- ??? ../test-files (glob)
+ [ \t]*[0-9]{3} ../test-files (re)
$ grep -F debian ../files
tests/test-check-debian.t
$ grep -F __init__.py ../files
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/tests/test-discovery-obshashrange.t
new/hg_evolve-11.1.10/tests/test-discovery-obshashrange.t
--- old/hg_evolve-11.1.9/tests/test-discovery-obshashrange.t 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/tests/test-discovery-obshashrange.t 2025-11-25
23:43:58.000000000 +0100
@@ -307,10 +307,7 @@
* @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> sending hello command (glob)
* @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> sending between command
(glob)
* @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: * (glob)
- * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: capabilities:
_evoext_getbundle_obscommon _evoext_obshashrange_v1 batch branchmap
bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%2C03%0Acheckheads%3Drelated%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aobsmarkers%3DV0%2CV1%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Astream%3Dv2
changegroupsubset getbundle known lookup protocaps pushkey
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN
unbundlehash (glob) (no-zstd default-cg3 !)
- * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: capabilities:
_evoext_getbundle_obscommon _evoext_obshashrange_v1 batch branchmap
bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%2C03%0Acheckheads%3Drelated%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aobsmarkers%3DV0%2CV1%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Astream%3Dv2
changegroupsubset getbundle known lookup protocaps pushkey
streamreqs=generaldelta,revlog-compression-zstd,revlogv1,sparserevlog
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob) (zstd default-cg3 !)
- * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: capabilities:
_evoext_getbundle_obscommon _evoext_obshashrange_v1 batch branchmap
bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Acheckheads%3Drelated%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aobsmarkers%3DV0%2CV1%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Astream%3Dv2
changegroupsubset getbundle known lookup protocaps pushkey
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN
unbundlehash (glob) (no-zstd no-default-cg3 !)
- * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: capabilities:
_evoext_getbundle_obscommon _evoext_obshashrange_v1 batch branchmap
bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Acheckheads%3Drelated%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aobsmarkers%3DV0%2CV1%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Astream%3Dv2
changegroupsubset getbundle known lookup protocaps pushkey
streamreqs=generaldelta,revlog-compression-zstd,revlogv1,sparserevlog
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob) (zstd no-default-cg3 !)
+ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: capabilities:
_evoext_getbundle_obscommon _evoext_obshashrange_v1 batch * (glob)
* @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> remote: 1 (glob)
* @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> sending protocaps command
(glob)
* @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> query 1; heads (glob)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/hg_evolve-11.1.9/tests/test-evolve-content-divergent-case-A2.t
new/hg_evolve-11.1.10/tests/test-evolve-content-divergent-case-A2.t
--- old/hg_evolve-11.1.9/tests/test-evolve-content-divergent-case-A2.t
2025-07-25 18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/tests/test-evolve-content-divergent-case-A2.t
2025-09-10 15:40:58.000000000 +0200
@@ -55,7 +55,7 @@
$ cd local
$ mkcommit A0
$ hg push -q
- $ sed -i '1ifoo' A0
+ $ sed -i '1s/^/foo\n/' A0
$ hg amend -m "A1"
$ hg log -G --hidden
@ 2:e1f7c24563ba (draft): A1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/tests/test-version-install.t
new/hg_evolve-11.1.10/tests/test-version-install.t
--- old/hg_evolve-11.1.9/tests/test-version-install.t 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/tests/test-version-install.t 2025-09-04
17:22:50.000000000 +0200
@@ -20,7 +20,7 @@
Test install
(pip on python2 doesn't have --root-user-action flag, so we ignore the warning
manually)
- $ "$PYTHON" -m pip install "$TESTDIR/.." --root="$TESTTMP/installtest"
--quiet
+ $ "$PYTHON" -m pip install "$TESTDIR/.." --root="$TESTTMP/installtest"
--quiet --disable-pip-version-check
WARNING: Running pip as the 'root' user * (glob) (?)
Test that evolve can be loaded from the above path
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/hg_evolve-11.1.9/tests/test-wireproto.t
new/hg_evolve-11.1.10/tests/test-wireproto.t
--- old/hg_evolve-11.1.9/tests/test-wireproto.t 2025-07-25 18:21:02.000000000
+0200
+++ new/hg_evolve-11.1.10/tests/test-wireproto.t 2025-11-25
23:43:58.000000000 +0100
@@ -59,6 +59,62 @@
no changes found
[1]
+Capabilities
+============
+
+ $ hg debugcapabilities ssh://user@dummy/server
+ Main capabilities:
+ _evoext_getbundle_obscommon
+ _evoext_obshashrange_v1
+ batch
+ branchmap
+ bundle2=HG20* (glob)
+ changegroupsubset
+ getbundle
+ known
+ lookup
+ protocaps
+ pushkey
+ streamreqs=generaldelta,revlog-compression-zstd,revlogv1,sparserevlog
(zstd !)
+ streamreqs=generaldelta,revlogv1,sparserevlog (no-zstd !)
+ unbundle=HG10GZ,HG10BZ,HG10UN
+ unbundlehash
+ Bundle2 capabilities:
+ HG20
+ bookmarks
+ changegroup
+ 01
+ 02
+ 03 (default-cg3 !)
+ checkheads
+ related
+ delta-compression (delta-compression !)
+ none (delta-compression !)
+ zlib (delta-compression !)
+ zstd (delta-compression zstd !)
+ digests
+ md5
+ sha1
+ sha512
+ error
+ abort
+ unsupportedcontent
+ pushraced
+ pushkey
+ hgtagsfnodes
+ listkeys
+ obsmarkers
+ V0
+ V1
+ phases
+ heads
+ pushkey
+ remote-changegroup
+ http
+ https
+ stream
+ v2
+
Push
=============
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/hg_evolve-11.1.9/tests/testlib/check-compat-strings.py
new/hg_evolve-11.1.10/tests/testlib/check-compat-strings.py
--- old/hg_evolve-11.1.9/tests/testlib/check-compat-strings.py 2025-07-25
18:21:02.000000000 +0200
+++ new/hg_evolve-11.1.10/tests/testlib/check-compat-strings.py 2025-11-25
20:56:25.000000000 +0100
@@ -15,6 +15,7 @@
from __future__ import print_function
import argparse
+import concurrent.futures
import os
import re
from subprocess import check_output
@@ -30,6 +31,16 @@
for groups in linere.findall(line):
yield path, lineno, line, groups
+def fetch_last_rev(hgdir, revset):
+ """given a revset, return the last release with these revs
+ """
+ basecmd = ['hg', '--cwd', hgdir, 'log', '-T', '{tags}']
+ hgenv = os.environ.copy()
+ hgenv.update({'HGPLAIN': '1', 'HGENCODING': 'UTF-8'})
+ tagrevset = 'max(tag("re:^[0-9]\\.[0-9]$") - (%s)::)' % revset
+ cmd = basecmd + ['-r', tagrevset]
+ return check_output(cmd, env=hgenv).decode('UTF-8')
+
def main():
ap = argparse.ArgumentParser()
ap.add_argument('workdir', nargs='?', default='.')
@@ -38,20 +49,15 @@
opts = ap.parse_args()
linere = re.compile(r'hg <= ([0-9.]+) \(([0-9a-f+]+)\)')
- basecmd = ['hg', '--cwd', opts.hgdir, 'log', '-T', '{tags}']
- hgenv = {'HGPLAIN': '1', 'HGENCODING': 'UTF-8'}
- relcache = {}
+ all_matches = list(grepall(opts.workdir, linere))
+ all_revsets = {m[3][1] for m in all_matches}
+ pool = concurrent.futures.ThreadPoolExecutor()
+ fn = lambda revset: (revset, fetch_last_rev(opts.hgdir, revset))
+ relcache = dict(pool.map(fn, all_revsets))
- for path, lineno, line, match in grepall(opts.workdir, linere):
+ for path, lineno, line, match in all_matches:
expected, revset = match
-
- if revset not in relcache:
- tagrevset = 'max(tag("re:^[0-9]\\.[0-9]$") - (%s)::)' % revset
- cmd = basecmd + ['-r', tagrevset]
- relcache[revset] = check_output(cmd, env=hgenv).decode('UTF-8')
-
lastrel = relcache[revset]
-
if lastrel != expected:
print('%s:%d:%s' % (path, lineno, line.rstrip('\r\n')))
print('\\ actual last major release without %s is %s'