# HG changeset patch # User Anton Shestakov # Date 1628027125 -10800 # Node ID b7cb6e46c9c6f163ca4e8287ec92694ab807cc38 # Parent f408cc176befd6ea61b99e253839082036742fd1 compat: import copies as copiesmod to prepare for the next patch diff -r f408cc176bef -r b7cb6e46c9c6 hgext3rd/evolve/compat.py --- a/hgext3rd/evolve/compat.py Wed Aug 04 00:44:23 2021 +0300 +++ b/hgext3rd/evolve/compat.py Wed Aug 04 00:45:25 2021 +0300 @@ -11,7 +11,7 @@ from mercurial import ( cmdutil, context, - copies, + copies as copiesmod, hg, logcmdutil, merge as mergemod, @@ -95,7 +95,7 @@ except AttributeError: bmrevset = scmutil.bookmarkrevs -hg48 = util.safehasattr(copies, 'stringutil') +hg48 = util.safehasattr(copiesmod, 'stringutil') # code imported from Mercurial core at ae17555ef93f + patch def fixedcopytracing(repo, c1, c2, base): """A complete copy-patse of copies._fullcopytrace with a one line fix to @@ -104,6 +104,7 @@ gets in and once we drop support for 4.6, this should be removed.""" from mercurial import pathutil + copies = copiesmod # In certain scenarios (e.g. graft, update or rebase), base can be # overridden We still need to know a real common ancestor in this case We @@ -354,7 +355,7 @@ # hg <= 4.9 (7694b685bb10) fixupstreamed = util.safehasattr(scmutil, 'movedirstate') if not fixupstreamed: - copies._fullcopytracing = fixedcopytracing + copiesmod._fullcopytracing = fixedcopytracing # help category compatibility # hg <= 4.7 (c303d65d2e34) @@ -469,7 +470,7 @@ ds.remove(f) # Merge old parent and old working dir copies - oldcopies = copies.pathcopies(newctx, oldctx, match) + oldcopies = copiesmod.pathcopies(newctx, oldctx, match) oldcopies.update(dscopies) newcopies = { dst: oldcopies.get(src, src)