[PATCH] branch: help misuse of hg branch to switch to an existing branch

Yuya Nishihara yuya at tcha.org
Mon Jan 11 07:42:16 CST 2010


> branch: help misuse of hg branch to switch to an existing branch
> 
> Maybe beginners tend to use 'hg branch EXISTING_BRANCH' instead of
> 'hg update EXISTING_BRANCH' as me.
> If so, let's lead them to the correct place.

The output is something like the following:

$ LANG=C hg branch default
abort: a branch of the same name already exists (use --force to override) (or use 'hg update' to switch to an existing branch)


1, Here I want to insert a line break, but is it okay to pass multi-line
   string to util.Abort?

2. Is `(use --force to override)' needed? It seems dangerous for normal
   users. And advanced users can recognize the error message, then
   they will check `hg help branch'.


Yuya.


More information about the Mercurial-devel mailing list