← Back to team overview

dolfin team mailing list archive

Re: [HG] Branch merge apparently.

 

On Thu, Feb 09, 2006 at 01:25:32PM -0600, Anders Logg wrote:
> Everytime I change something locally and I pull new changes into my
> local repository (from the one on fenics.org), I need to merge. When I
> then push my changes to the repository on fenics.org, I need to use
> 
>     hg push -f default
> 
> to force the creation of a new branch. Do you get the same thing?
> 
> It seems natural, but I want to check anyway.
> 
> /Anders
> 
> 

Yes, this was also what I got. This was the message:

$ hg pull http://www.fenics.org/hg/dolfin
$ hg update
...
aborting update spanning branches!
(use update -m to merge across branches or -C to lose changes)

So I used update -m:

$ hg update -m
$ hg push ssh://dolfin@xxxxxxxxxx/~fenics/hg/projects/dolfin
searching for changes
abort: push creates new remote branches!
(did you forget to merge? use push -f to force)

But here I just did a commit:

$ hg ci

and then it apparently committed the merge. Then I could push like normal:

$ hg push ssh://dolfin@xxxxxxxxxx/~fenics/hg/projects/dolfin
$

The "--force" flag doesn't feel so good to use. It says in the manual:

"By default, push will refuse to run if it detects the result would
increase the number of remote heads. This generally indicates the the
client has forgotten to sync and merge before pushing."

I'm not sure this is what's happening though. But isn't it better to
explicitly merge and avoid using --force?

  Johan




Follow ups

References