# HG changeset patch # User Benoit Boissinot # Date 2008-10-28 19:48:30 # Node ID b19c0200c90b33c1fa23317ceeca711ac2b61dd8 # Parent 6541696b5f663cb35ed8333b776ca2aec864eb25 bookmarks: fix strip handling diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py --- a/hgext/bookmarks.py +++ b/hgext/bookmarks.py @@ -130,13 +130,13 @@ def _revstostrip(changelog, node): srev = changelog.rev(node) tostrip = [srev] saveheads = [] - for r in xrange(srev, changelog.rev(changelog.tip()) + 1): + for r in xrange(srev, len(changelog)): parents = changelog.parentrevs(r) if parents[0] in tostrip or parents[1] in tostrip: tostrip.append(r) if parents[1] != nullrev: for p in parents: - if p not in tostrip and p > striprev: + if p not in tostrip and p > srev: saveheads.append(p) return [r for r in tostrip if r not in saveheads]