mercurial/commands.py
changeset 32245 3a755652ce3a
parent 32221 9dc36df78403
parent 32205 b4e1e30528c7
child 32337 46ba2cdda476
--- a/mercurial/commands.py	Tue May 09 21:27:06 2017 -0700
+++ b/mercurial/commands.py	Fri May 12 11:20:25 2017 -0700
@@ -2308,7 +2308,9 @@
         # check ancestors for earlier grafts
         ui.debug('scanning for duplicate grafts\n')
 
-        for rev in repo.changelog.findmissingrevs(revs, [crev]):
+        # The only changesets we can be sure doesn't contain grafts of any
+        # revs, are the ones that are common ancestors of *all* revs:
+        for rev in repo.revs('only(%d,ancestor(%ld))', crev, revs):
             ctx = repo[rev]
             n = ctx.extra().get('source')
             if n in ids: