Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 40441:3bc2e550f2bd stable
graft: do not try to skip rev derived from ancestor more than once (issue6024)
We check 'x in revs' in other cases, so let's do the same.
The test case credits to Tom Prince.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 15 Nov 2018 22:59:38 +0900 |
parents | da2e874fe582 |
children | fbd5e2f0bba7 1a6bb5a85e30 |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Nov 16 18:37:26 2018 -0500 +++ b/mercurial/commands.py Thu Nov 15 22:59:38 2018 +0900 @@ -2478,10 +2478,11 @@ revs.remove(ids[n]) elif ctx.hex() in ids: r = ids[ctx.hex()] - ui.warn(_('skipping already grafted revision %d:%s ' - '(was grafted from %d:%s)\n') % - (r, repo[r], rev, ctx)) - revs.remove(r) + if r in revs: + ui.warn(_('skipping already grafted revision %d:%s ' + '(was grafted from %d:%s)\n') % + (r, repo[r], rev, ctx)) + revs.remove(r) if not revs: return -1