SV: spurious error with hg branch foo; hg up
Sune Foldager
cryo at cyanite.org
Fri Sep 18 01:54:04 CDT 2009
> Hi,
> $ hg init ex; cd ex; hg branch foo; hg up;
> gives
> abort: branch foo not found
> This message misleadingly appears to be an error, because hg is trying to
> update to the tip of a branch that does not exist yet. In this case it
> really needs to go nowhere, since it is already at the tip. I think no
> message is really needed here, or at any rate a less alarming one. There
> are probably other similar cases, but I've not thought through all the
> possibilities. Thanks to Benoit Boissinot for discussing this on IRC.
I agree it needs to go nowhere (as it already does), but not because we're at
the tip necessarily. We may want to create the named branch off some other node
in the past history, after all. I don't see the alarming in the message 'branch
not found', when, as you say yourself, update to a branch which does not exist
yet and hence is not found.
I guess it could be special cased for the current dirstate branch to say
something else, but I am not sure what :-)
/Sune
More information about the Mercurial-devel
mailing list