# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1527106826 -19800 # Node ID 115caa4e5278415698ee6b0fc8d257f46c192acb # Parent 6352dc395ebfa6b0f94bbec858fcc247b4111b0b 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. diff -r 6352dc395ebf -r 115caa4e5278 hgext3rd/evolve/compat.py --- 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]) diff -r 6352dc395ebf -r 115caa4e5278 hgext3rd/evolve/rewriteutil.py --- a/hgext3rd/evolve/rewriteutil.py Wed May 23 11:18:14 2018 +0200 +++ b/hgext3rd/evolve/rewriteutil.py Thu May 24 01:50:26 2018 +0530 @@ -22,7 +22,6 @@ node, obsolete, phases, - repair, revset, util, ) @@ -155,7 +154,7 @@ nodetobookmarks.setdefault(bnode, []).append(mark) for marks in nodetobookmarks.values(): if bookmarks.issuperset(marks): - rsrevs = repair.stripbmrevset(repo, marks[0]) + rsrevs = compat.bmrevset(repo, marks[0]) revs = set(revs) revs.update(set(rsrevs)) revs = sorted(revs)