From: Felipe Contreras Date: Tue, 14 May 2013 04:36:28 +0000 (-0500) Subject: remote-hg: fix new branch creation X-Git-Tag: v1.8.3-rc3~10^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=637333673a156898087e87f551a6eb1f9405e39d;p=git remote-hg: fix new branch creation When a user creates a new branch with git: % git checkout -b branches/devel and then pushes this branch % git push origin branches/devel which is the way to push new mercurial branches, we do want to create a branch, but the command would fail without newbranch=True. This only matters when force_push=False, but setting newbranch=True unconditionally does not hurt. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 4a5c72ffea..3cf9b4c24a 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -856,7 +856,7 @@ def do_export(parser): continue if peer: - parser.repo.push(peer, force=force_push) + parser.repo.push(peer, force=force_push, newbranch=True) # handle bookmarks for bmark, node in p_bmarks: