changeset 6025:b1529f0a30ce

evolve: use scmutil.bookmarkrevs() directly without 4.6 compatibility
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 04 Sep 2021 19:17:46 +0300
parents 18aa756353a7
children 217828aa0e29
files hgext3rd/evolve/compat.py hgext3rd/evolve/rewriteutil.py
diffstat 2 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/compat.py	Sat Sep 04 19:16:17 2021 +0300
+++ b/hgext3rd/evolve/compat.py	Sat Sep 04 19:17:46 2021 +0300
@@ -22,7 +22,6 @@
     obsolete,
     pycompat,
     registrar,
-    repair,
     scmutil,
     util,
     ui as uimod,
@@ -93,12 +92,6 @@
                                   copied=copied.get(path))  # pytype: disable=wrong-keyword-args
     return mctx
 
-try:
-    # hg <= 4.6 (46c2b19a1263)
-    bmrevset = repair.stripbmrevset  # pytype: disable=module-attr
-except AttributeError:
-    bmrevset = scmutil.bookmarkrevs
-
 hg48 = util.safehasattr(copiesmod, 'stringutil')
 # code imported from Mercurial core at ae17555ef93f + patch
 def fixedcopytracing(repo, c1, c2, base):
--- a/hgext3rd/evolve/rewriteutil.py	Sat Sep 04 19:16:17 2021 +0300
+++ b/hgext3rd/evolve/rewriteutil.py	Sat Sep 04 19:17:46 2021 +0300
@@ -25,6 +25,7 @@
     obsutil,
     revset,
     rewriteutil as corerewriteutil,
+    scmutil,
     util,
 )
 
@@ -207,7 +208,7 @@
         nodetobookmarks.setdefault(bnode, []).append(mark)
     for marks in nodetobookmarks.values():
         if bookmarks.issuperset(marks):
-            rsrevs = compat.bmrevset(repo, marks[0])
+            rsrevs = scmutil.bookmarkrevs(repo, marks[0])
             revs = set(revs)
             revs.update(set(rsrevs))
             revs = sorted(revs)