dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #01896
Re: [HG] Branch merge apparently.
On Thu, Feb 09, 2006 at 08:57:54PM +0100, Johan Jansson wrote:
> 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
If you have cloned this repository to begin with, you can just use
hg push default
Should be set in .hg/hgrc (otherwise you can add it).
Whenever you clone, the default repository will be set to the
"parent".
> 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
> $
ok, that seems to be how to do it. I forgot I need to commit after I
have merged.
> 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?
I'll keep that in mind. Did I mess anything up by forcing, or can we
just ignore it?
/Anders
Follow ups
References