Skip to content
Snippets Groups Projects
Commit 7a9d1cc3 authored by Augie Fackler's avatar Augie Fackler
Browse files

findoutgoing: more flexible wrapper function that should be more portable

parent dd90394c
No related branches found
No related tags found
No related merge requests found
......@@ -109,8 +109,11 @@
kwname = 'heads'
if 'remoteheads' in inspect.getargspec(discovery.findoutgoing)[0]:
kwname = 'remoteheads'
def findoutgoing(orig, local, remote, base=None, remoteheads=None, force=False, heads=None):
kw = {'force': force, 'base': base, kwname: locals()[kwname]}
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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment