Suboptimal documentation?

Alan Mackenzie acm at muc.de
Mon Nov 24 16:38:14 UTC 2014


Hello, Mercurial.

hg help branch (and the corresponding bit in the man page) says:

    With no argument, show the current branch name. With one argument,
    set the working directory branch name (the branch will not exist in the
    repository until the next commit). Standard practice recommends that
    primary development take place on the 'default' branch.

Although one can work through this to a meaning, it is surely more
opaque than it need be.  hg branch _creates_ a branch; it does not
rename the current branch (which is a possible interpretation of "set
the working directory branch name").

How about the following replacement for the second sentence:

    With one argument, create a new branch with that name.  The branch
    will exist in the repository after the next commit.

?

-- 
Alan Mackenzie (Nuremberg, Germany).


More information about the Mercurial mailing list