Commits

Brendan Cully committed 6f00124

issue2855

  • Participants
  • Parent commits 8cf8d5c

Comments (0)

Files changed (2)

+# HG changeset patch
+# Parent d89d4e93bc46e2af91564e06fbdd4ebb76bab816
+Fix mercurial issue2855
+
+I accidentally broke transplant by making revs a required argument.
+
+diff --git a/hggit/__init__.py b/hggit/__init__.py
+--- a/hggit/__init__.py
++++ b/hggit/__init__.py
+@@ -155,15 +155,16 @@
+ except ImportError:
+     pass
+ 
+-def getremotechanges(orig, ui, repo, other, revs, *args, **opts):
++def getremotechanges(orig, ui, repo, other, *args, **opts):
+     if isinstance(other, gitrepo.gitrepo):
++        revs = opts.get('onlyheads', opts.get('revs'))
+         git = GitHandler(repo, ui)
+         r, c, cleanup = git.getremotechanges(other, revs)
+         # ugh. This is ugly even by mercurial API compatibility standards
+         if 'onlyheads' not in orig.func_code.co_varnames:
+             cleanup = None
+         return r, c, cleanup
+-    return orig(ui, repo, other, revs, *args, **opts)
++    return orig(ui, repo, other, *args, **opts)
+ try:
+     extensions.wrapfunction(bundlerepo, 'getremotechanges', getremotechanges)
+ except AttributeError:
+issue2855
 progress
 new-discovery