changeset 353:72db3af8f216

hgrepo: fix compatibility with Mercurial 1.5
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Tue, 20 Jul 2010 16:20:41 +0200
parents 7a9d1cc30d61
children ca0510dee2aa
files hggit/hgrepo.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/hgrepo.py
+++ b/hggit/hgrepo.py
@@ -19,8 +19,12 @@
                 git = GitHandler(self, self.ui)
                 git.push(remote.path, revs, force)
             else: #pragma: no cover
-                return super(hgrepo, self).push(remote, force, revs,
-                                                newbranch=newbranch)
+                # newbranch was added in 1.6
+                if newbranch is None:
+                    return super(hgrepo, self).push(remote, force, revs)
+                else:
+                    return super(hgrepo, self).push(remote, force, revs,
+                                                    newbranch)
 
         def findoutgoing(self, remote, base=None, heads=None, force=False):
             if isinstance(remote, gitrepo):