hgext/transplant.py
changeset 25695 ce3d4b858420
parent 25660 328739ea70c3
parent 25679 540cd0ddac49
child 25828 5ae4b128a291
--- a/hgext/transplant.py	Tue Jun 30 22:39:28 2015 -0700
+++ b/hgext/transplant.py	Wed Jul 01 16:33:31 2015 -0500
@@ -629,8 +629,14 @@
     if sourcerepo:
         peer = hg.peer(repo, opts, ui.expandpath(sourcerepo))
         heads = map(peer.lookup, opts.get('branch', ()))
+        target = set(heads)
+        for r in revs:
+            try:
+                target.add(peer.lookup(r))
+            except error.RepoError:
+                pass
         source, csets, cleanupfn = bundlerepo.getremotechanges(ui, repo, peer,
-                                    onlyheads=heads, force=True)
+                                    onlyheads=sorted(target), force=True)
     else:
         source = repo
         heads = map(source.lookup, opts.get('branch', ()))