mercurial/scmutil.py
changeset 38131 46c2b19a1263
parent 37979 5ac72e07692a
child 38171 eb9835014d20
--- a/mercurial/scmutil.py	Tue May 22 23:48:08 2018 -0400
+++ b/mercurial/scmutil.py	Tue May 15 14:35:41 2018 +0200
@@ -1585,3 +1585,12 @@
                 revs.add(rev)
 
     return revs
+
+def bookmarkrevs(repo, mark):
+    """
+    Select revisions reachable by a given bookmark
+    """
+    return repo.revs("ancestors(bookmark(%s)) - "
+                     "ancestors(head() and not bookmark(%s)) - "
+                     "ancestors(bookmark() and not bookmark(%s))",
+                     mark, mark, mark)