Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 46039:b9ebe0bfed4e
scmutil: document that bookmarkrevs() ignores non-head bookmark branch
"- ancestors(head() and not bookmark(%s))" excludes the bookmarked branch
itself if bookmark(%s) is not a head. I'm a bit surprised by this behavior
while writing "log -B" tests, so let's document it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 01 Dec 2020 19:46:01 +0900 |
parents | 89a2afe31e82 |
children | 9ee791f3278f |
comparison
equal
deleted
inserted
replaced
46038:8dca9051a859 | 46039:b9ebe0bfed4e |
---|---|
2298 | 2298 |
2299 return revs | 2299 return revs |
2300 | 2300 |
2301 | 2301 |
2302 def bookmarkrevs(repo, mark): | 2302 def bookmarkrevs(repo, mark): |
2303 """ | 2303 """Select revisions reachable by a given bookmark |
2304 Select revisions reachable by a given bookmark | 2304 |
2305 If the bookmarked revision isn't a head, an empty set will be returned. | |
2305 """ | 2306 """ |
2306 return repo.revs( | 2307 return repo.revs( |
2307 b"ancestors(bookmark(%s)) - " | 2308 b"ancestors(bookmark(%s)) - " |
2308 b"ancestors(head() and not bookmark(%s)) - " | 2309 b"ancestors(head() and not bookmark(%s)) - " |
2309 b"ancestors(bookmark() and not bookmark(%s))", | 2310 b"ancestors(bookmark() and not bookmark(%s))", |