push fails on upcoming Mercurial 1.6
yuja opened this issue · 6 comments
Mercurial 1.6 will add 'newbranch' option to repo.push(), but hg-git's wrapper doesn't have it.
This causes the following error on push:
TypeError: push() takes at most 4 arguments (5 given)
My workaround patch is available at:
http://bitbucket.org/yuja/hg-git-mq/src/tip/newbranch.diff
I've done an independent fix for this and will push it shortly.
Thanks. Is there another change planned to bring back --new-branch option?
0b20fae strips it for any repo backends.
Huh? I'm not sure what you're talking about. Can you explain more? (I'm not sure what 0b20fae is - Google hasn't yet indexed that hash anywhere...)
I'm not sure what 0b20fae is
Oops, I've just edited it to be linked.
The problem is if we enabled hggit extension globally, --new-branch doesn't take effect.
It's not passed to hgrepo object.
- def push(self, remote, force=False, revs=None):
+ # TODO figure out something useful to do with the newbranch param
+ def push(self, remote, force=False, revs=None, newbranch=None):
if isinstance(remote, gitrepo):
git = GitHandler(self, self.ui)
git.push(remote.path, revs, force)
else: #pragma: no cover
return super(hgrepo, self).push(remote, force, revs)
Oh, oops. I'll push a fix for that ASAP.
--new-branch works now. Thank you.