Mercurial > hg > hg-git
changeset 352:7a9d1cc30d61
findoutgoing: more flexible wrapper function that should be more portable
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Sat, 14 Aug 2010 21:34:34 -0500 (2010-08-15) |
parents | dd90394cd13b |
children | 72db3af8f216 |
files | hggit/__init__.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/__init__.py +++ b/hggit/__init__.py @@ -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.