diff --git a/hggit/__init__.py b/hggit/__init__.py index b8eeabb61c7b720713565a645aacffa7213128aa_aGdnaXQvX19pbml0X18ucHk=..6867b01d1379cb27faca4c4cb06ed2fba38963e8_aGdnaXQvX19pbml0X18ucHk= 100644 --- a/hggit/__init__.py +++ b/hggit/__init__.py @@ -129,10 +129,6 @@ if getattr(discovery, 'findcommonoutgoing', None): kwname = 'onlyheads' def findoutgoing(orig, local, remote, *args, **kwargs): - kw = {} - kw.update(kwargs) - for val, k in zip(args, ('base', kwname, 'force')): - kw[k] = val if isinstance(remote, gitrepo.gitrepo): # clean up this cruft when we're 1.7-only, remoteheads and # the return value change happened between 1.6 and 1.7. @@ -136,6 +132,10 @@ if isinstance(remote, gitrepo.gitrepo): # clean up this cruft when we're 1.7-only, remoteheads and # the return value change happened between 1.6 and 1.7. + kw = {} + kw.update(kwargs) + for val, k in zip(args, ('base', kwname, 'force')): + kw[k] = val git = GitHandler(local, local.ui) base, heads = git.get_refs(remote.path) newkw = {'base': base, kwname: heads} @@ -146,7 +146,8 @@ return [x[0] for x in r] if kwname == 'onlyheads': del kw['base'] - return orig(local, remote, **kw) + return orig(local, remote, **kw) + return orig(local, remote, *args, **kwargs) if getattr(discovery, 'findoutgoing', None): extensions.wrapfunction(discovery, 'findoutgoing', findoutgoing) else: