# HG changeset patch # User Pierre-Yves David # Date 1524147917 -7200 # Node ID 2577fdc3a4580e23f25d64e02807e3c50c99dc87 # Parent 67d6cc7e0979168bfcfd3bae8ea9b382a5916ec2 compat: drop compatibility layer for duplicatecopies We no longer support version before Mercurial 4.3. diff -r 67d6cc7e0979 -r 2577fdc3a458 hgext3rd/evolve/compat.py --- 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 diff -r 67d6cc7e0979 -r 2577fdc3a458 hgext3rd/evolve/evolvecmd.py --- 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