Mercurial > public > mercurial-scm > hg
diff hgext/transplant.py @ 25679:540cd0ddac49 stable 3.4.2
transplant: only pull the transplanted revision (issue4692)
For some reason, transplant was pulling all remote revisions when transplanting
from a remote repository (unless --branch was
specified).
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 29 Jun 2015 19:09:42 -0700 |
parents | f1eaf03dd608 |
children | ce3d4b858420 |
line wrap: on
line diff
--- a/hgext/transplant.py Mon Jun 29 19:18:51 2015 -0700 +++ b/hgext/transplant.py Mon Jun 29 19:09:42 2015 -0700 @@ -625,8 +625,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', ()))