remote-hg: fix new branch creation
authorFelipe Contreras <felipe.contreras@gmail.com>
Tue, 14 May 2013 04:36:28 +0000 (23:36 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 May 2013 19:35:51 +0000 (12:35 -0700)
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 <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/git-remote-hg
index 4a5c72ffea10666fda52004fee875377ec5adfc3..3cf9b4c24a20405583bcd7869389b828df8e8f51 100755 (executable)
@@ -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: