diff hgext3rd/evolve/compat.py @ 3767:115caa4e5278 stable

evolve: add compat for repair.stripbmrevset which is moved to scmutil This patch adds compatibility logic for repair.stripbmrevset() which is moved to scmutil as bookmarkrevs(). This fixes test-prune.t failure.
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 24 May 2018 01:50:26 +0530
parents 29c413a7dfb5
children 55b8c7e7e352
line wrap: on
line diff
--- a/hgext3rd/evolve/compat.py	Wed May 23 11:18:14 2018 +0200
+++ b/hgext3rd/evolve/compat.py	Thu May 24 01:50:26 2018 +0530
@@ -13,7 +13,9 @@
     mdiff,
     obsolete,
     obsutil,
+    repair,
     revset,
+    scmutil,
     util,
     vfs as vfsmod,
 )
@@ -195,6 +197,14 @@
 except (ImportError, AttributeError):
     updateresult = None
 
+# 46c2b19a1263f18a5829a21b7a5053019b0c5a31 in hg moved repair.stripbmrevset to
+# scmutil.bookmarkrevs
+# This change is a part of 4.7 cycle, so drop this when we drop support for 4.6
+try:
+    bmrevset = repair.stripbmrevset
+except AttributeError:
+    bmrevset = scmutil.bookmarkrevs
+
 def hasconflict(upres):
     if updateresult is None:
         return bool(upres[-1])