RE: [PATCH v3 05/10] remote-hg: fix new branch creation
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- May 14, 2013, 20:19 UTC
- Message-ID
- <51929c576d949_13a8f89e18183b@nysa.mail>
- In-Reply-To
- <1368486720-2716-6-git-send-email-felipe.contreras@gmail.com>
This is the first fix, but it's obvious this is what we want: if 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 obviously want to create a branch, but the command would fail, and the fix is simple: tell the push that we might create new branches.
This only matters when foce_push=False.
Can't possibly introduce regressions, unless you think of the ability to push new branches as a regression.
Felipe Contreras wrote:
Show 22 quoted lines
> When force_push is disabled, we need to turn the argument to True. > > Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> > --- > contrib/remote-helpers/git-remote-hg | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg > index 4a5c72f..3cf9b4c 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: > -- > 1.8.3.rc1.579.g184e698
-- Felipe Contreras