changeset 5985:b7cb6e46c9c6 stable

compat: import copies as copiesmod to prepare for the next patch
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 04 Aug 2021 00:45:25 +0300
parents f408cc176bef
children 5578f21b43c1
files hgext3rd/evolve/compat.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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)