mercurial/repair.py
changeset 26624 bcace0fbb4c8
parent 26587 56b2bcea2529
child 26701 b1a0c534d9b4
--- a/mercurial/repair.py	Fri Oct 09 11:22:01 2015 -0700
+++ b/mercurial/repair.py	Fri Oct 09 14:48:59 2015 -0700
@@ -299,3 +299,15 @@
     finally:
         lock.release()
 
+def stripbmrevset(repo, mark):
+    """
+    The revset to strip when strip is called with -B mark
+
+    Needs to live here so extensions can use it and wrap it even when strip is
+    not enabled or not present on a box.
+    """
+    return repo.revs("ancestors(bookmark(%s)) - "
+                     "ancestors(head() and not bookmark(%s)) - "
+                     "ancestors(bookmark() and not bookmark(%s))",
+                     mark, mark, mark)
+