Mercurial > hg-stable
changeset 22824:9271630f4720
strip: stop calling `remove` on smartset
The `remove` method is not part of the smartset specification. We use a plain
old list comprehension instead.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 07 Oct 2014 00:38:14 -0700 |
parents | 18ac67b0814c |
children | 0e8bb81b58b9 |
files | mercurial/commands.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Oct 07 00:31:53 2014 -0700 +++ b/mercurial/commands.py Tue Oct 07 00:38:14 2014 -0700 @@ -3381,10 +3381,12 @@ raise util.Abort(_('no revisions specified')) revs = scmutil.revrange(repo, revs) + skipped = set() # check for merges for rev in repo.revs('%ld and merge()', revs): ui.warn(_('skipping ungraftable merge revision %s\n') % rev) - revs.remove(rev) + skipped.add(rev) + revs = [r for r in revs if r not in skipped] if not revs: return -1