equal
deleted
inserted
replaced
2302 def bookmarkrevs(repo, mark): |
2302 def bookmarkrevs(repo, mark): |
2303 """Select revisions reachable by a given bookmark |
2303 """Select revisions reachable by a given bookmark |
2304 |
2304 |
2305 If the bookmarked revision isn't a head, an empty set will be returned. |
2305 If the bookmarked revision isn't a head, an empty set will be returned. |
2306 """ |
2306 """ |
2307 return repo.revs( |
2307 return repo.revs(format_bookmark_revspec(mark)) |
|
2308 |
|
2309 |
|
2310 def format_bookmark_revspec(mark): |
|
2311 """Build a revset expression to select revisions reachable by a given |
|
2312 bookmark""" |
|
2313 return revsetlang.formatspec( |
2308 b"ancestors(bookmark(%s)) - " |
2314 b"ancestors(bookmark(%s)) - " |
2309 b"ancestors(head() and not bookmark(%s)) - " |
2315 b"ancestors(head() and not bookmark(%s)) - " |
2310 b"ancestors(bookmark() and not bookmark(%s))", |
2316 b"ancestors(bookmark() and not bookmark(%s))", |
2311 mark, |
2317 mark, |
2312 mark, |
2318 mark, |