Mercurial > evolve
changeset 1513:4f7e0e0318a5
prune: reuse revset from repair instead of copy-pasting code
author | Ryan McElroy <rmcelroy@fb.com> |
---|---|
date | Fri, 09 Oct 2015 16:21:30 -0700 |
parents | c40108ae8fb0 |
children | 324cd13838f1 |
files | hgext/evolve.py |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Mon Oct 12 01:23:59 2015 -0700 +++ b/hgext/evolve.py Fri Oct 09 16:21:30 2015 -0700 @@ -71,6 +71,7 @@ import mercurial from mercurial import util +from mercurial import repair try: from mercurial import obsolete @@ -2147,11 +2148,14 @@ uniquebm = False break if uniquebm: - rsrevs = repo.revs("ancestors(bookmark(%s)) - " - "ancestors(head() and not bookmark(%s)) - " - "ancestors(bookmark() and not bookmark(%s)) - " - "obsolete()", - mark, mark, mark) + if util.safehasattr(repair, 'stripbmrevset'): + rsrevs = repair.stripbmrevset(repo, mark) + else: + rsrevs = repo.revs("ancestors(bookmark(%s)) - " + "ancestors(head() and not bookmark(%s)) - " + "ancestors(bookmark() and not bookmark(%s)) - " + "obsolete()", + mark, mark, mark) revs = set(revs) revs.update(set(rsrevs)) revs = sorted(revs)