update suggests merge, merge suggests update...

Jamie Webb j at jwebb.sygneca.com
Fri Feb 15 09:09:49 CST 2008


On 2008-02-15 12:05:12 Marcin Kasperski wrote:
>   $ hg up
>   abort: update spans branches, use 'hg merge' or 'hg update -C' to
> lose changes
> 
> OK, I do not want to lose changes, so ...

I think this is the problem. It seems to me that hg update -C does two
quite distinct things:

 - Throws away uncommitted changes
 - Hides changes that are only present in one branch because you're
moving to a different one

Marcin didn't try -C because the error message implies something like
the former, unsafe, action. Since it appears that there were
actually no uncommitted changes here, what update -C would actually have
done in this situation is the latter, which is perfectly safe (provided
you know it's happening), and would have been the quickest way for
Marcin to proceed.

So, I think there ought to be a separate option to hg update (perhaps
-f) that does only the safe action, and this error message ought to
refer to that.

/J


More information about the Mercurial mailing list