mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
Fix mercurial issue2855
I accidentally broke transplant by making revs a required argument.
This commit is contained in:
parent
851456bac4
commit
d387fe4170
@ -155,15 +155,16 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def getremotechanges(orig, ui, repo, other, revs, *args, **opts):
|
def getremotechanges(orig, ui, repo, other, *args, **opts):
|
||||||
if isinstance(other, gitrepo.gitrepo):
|
if isinstance(other, gitrepo.gitrepo):
|
||||||
|
revs = opts.get('onlyheads', opts.get('revs'))
|
||||||
git = GitHandler(repo, ui)
|
git = GitHandler(repo, ui)
|
||||||
r, c, cleanup = git.getremotechanges(other, revs)
|
r, c, cleanup = git.getremotechanges(other, revs)
|
||||||
# ugh. This is ugly even by mercurial API compatibility standards
|
# ugh. This is ugly even by mercurial API compatibility standards
|
||||||
if 'onlyheads' not in orig.func_code.co_varnames:
|
if 'onlyheads' not in orig.func_code.co_varnames:
|
||||||
cleanup = None
|
cleanup = None
|
||||||
return r, c, cleanup
|
return r, c, cleanup
|
||||||
return orig(ui, repo, other, revs, *args, **opts)
|
return orig(ui, repo, other, *args, **opts)
|
||||||
try:
|
try:
|
||||||
extensions.wrapfunction(bundlerepo, 'getremotechanges', getremotechanges)
|
extensions.wrapfunction(bundlerepo, 'getremotechanges', getremotechanges)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
Loading…
Reference in New Issue
Block a user