Skip to content

Commit

Permalink
remote-hg: fix new branch creation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed May 15, 2013
1 parent 760ee1c commit 6373336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/remote-helpers/git-remote-hg
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6373336

Please sign in to comment.