Skip to content
Snippets Groups Projects
Commit 0adba5fe5716 authored by Georges Racinet's avatar Georges Racinet
Browse files

Mercurial 6.7: advance fix for extensions.wrapfunction

This solves a problem on our side. We can't see much more
because everything is masked by the `topic` extension not
being compatible anyway (phases internal API)
parent 58c1a5ea0841
No related branches found
No related tags found
1 merge request!97Mercurial 6.7: advance fix for extensions.wrapfunction
Pipeline #79782 passed with warnings
......@@ -93,6 +93,12 @@
command = registrar.command(cmdtable)
def wrap_function(mod, name, fun):
if util.versiontuple() < (6, 7):
name = name.encode('ascii') # hg<6.7
extensions.wrapfunction(mod, name, fun)
def uipopulate(ui):
if ui.configbool(b'heptapod', b'initial-import'):
ui.note(b'hgext3rd.heptapod',
......@@ -412,7 +418,7 @@
return orig(ui, cmd, environ=heptapod_env, cwd=cwd, out=out)
extensions.wrapfunction(uimod.ui, b'_runsystem', runsystem)
wrap_function(uimod.ui, '_runsystem', runsystem)
def hggit_parse_hgsub(orig, lines):
......@@ -433,7 +439,7 @@
if hggit is not None:
extensions.wrapfunction(hggit.util, b'parse_hgsub', hggit_parse_hgsub)
wrap_function(hggit.util, 'parse_hgsub', hggit_parse_hgsub)
def forbid_subrepo_get(orig, *args, **kwargs):
......@@ -455,9 +461,9 @@
op.stepsdone.add(b'bookmarks')
extensions.wrapfunction(subrepo.hgsubrepo, b'get', forbid_subrepo_get)
extensions.wrapfunction(subrepo.gitsubrepo, b'get', forbid_subrepo_get)
extensions.wrapfunction(subrepo.svnsubrepo, b'get', forbid_subrepo_get)
wrap_function(subrepo.hgsubrepo, 'get', forbid_subrepo_get)
wrap_function(subrepo.gitsubrepo, 'get', forbid_subrepo_get)
wrap_function(subrepo.svnsubrepo, 'get', forbid_subrepo_get)
def extsetup(ui):
......@@ -467,10 +473,6 @@
exception being HGitaly, which could well adopt the whole of `heptapod`
and `hgext3rd.heptapod` in the future.
"""
extensions.wrapfunction(exchange, b'_pullbookmarks', bookmarks_op_override)
extensions.wrapfunction(exchange, b'_pushbookmark', bookmarks_op_override)
extensions.wrapfunction(
exchange,
b'_pushb2bookmarkspart',
bookmarks_op_override
)
wrap_function(exchange, '_pullbookmarks', bookmarks_op_override)
wrap_function(exchange, '_pushbookmark', bookmarks_op_override)
wrap_function(exchange, '_pushb2bookmarkspart', bookmarks_op_override)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment