Mercurial > evolve
changeset 3700:2577fdc3a458
compat: drop compatibility layer for duplicatecopies
We no longer support version before Mercurial 4.3.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 19 Apr 2018 16:25:17 +0200 |
parents | 67d6cc7e0979 |
children | 29c413a7dfb5 |
files | hgext3rd/evolve/compat.py hgext3rd/evolve/evolvecmd.py |
diffstat | 2 files changed, 1 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/compat.py Thu Apr 19 16:21:44 2018 +0200 +++ b/hgext3rd/evolve/compat.py Thu Apr 19 16:25:17 2018 +0200 @@ -9,7 +9,6 @@ import inspect from mercurial import ( - copies, context, mdiff, obsolete, @@ -128,15 +127,6 @@ if util.safehasattr(ui, 'pager'): ui.pager(cmd) -def duplicatecopies(repo, wctx, rev, fromrev, skiprev=None): - # cannot use anything else until 4.3 support is dropped. - assert wctx.rev() is None - if copies.duplicatecopies.__code__.co_argcount < 5: - # pre 4.4 duplicatecopies compat - copies.duplicatecopies(repo, rev, fromrev, skiprev=skiprev) - else: - copies.duplicatecopies(repo, wctx, rev, fromrev, skiprev=skiprev) - def memfilectx(repo, ctx, fctx, flags, copied, path): # XXX Would it be better at the module level? varnames = context.memfilectx.__init__.__code__.co_varnames
--- a/hgext3rd/evolve/evolvecmd.py Thu Apr 19 16:21:44 2018 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Thu Apr 19 16:25:17 2018 +0200 @@ -543,7 +543,7 @@ repo.setparents(repo['.'].node(), node.nullid) repo.dirstate.write(tr) # fix up dirstate for copies and renames - compat.duplicatecopies(repo, repo[None], dest.rev(), orig.p1().rev()) + copies.duplicatecopies(repo, repo[None], dest.rev(), orig.p1().rev()) class LocalMergeFailure(MergeFailure, exc.__class__): pass