[PATCH evolve-ext] prune: reuse revset from repair instead of copy-pasting code
Ryan McElroy
rm at fb.com
Tue Oct 13 06:34:20 UTC 2015
# HG changeset patch
# User Ryan McElroy <rmcelroy at fb.com>
# Date 1444432890 25200
# Fri Oct 09 16:21:30 2015 -0700
# Branch stable
# Node ID b2c9405678f70f2d09e773dbc35ad77d96a4dcb9
# Parent 91b6a30424a366e87771fc2544c95633f4abfe81
prune: reuse revset from repair instead of copy-pasting code
diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -71,6 +71,7 @@ sha1re = re.compile(r'\b[0-9a-f]{6,40}\b
import mercurial
from mercurial import util
+from mercurial import repair
try:
from mercurial import obsolete
@@ -2115,11 +2116,7 @@ def _reachablefrombookmark(repo, revs, m
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)
+ rsrevs = repair.stripbmrevset(repo, mark)
revs = set(revs)
revs.update(set(rsrevs))
revs = sorted(revs)
More information about the Mercurial-devel
mailing list