compat: drop compatibility layer for duplicatecopies
We no longer support version before Mercurial 4.3.
--- 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