branch warnings (was Re: Hg update should prefer heads without bookmarks)

Bryan Murdock bmurdock at gmail.com
Wed Jun 24 15:23:11 UTC 2015


On Tue, Jun 23, 2015 at 11:19 AM, Matt Mackall <mpm at selenic.com> wrote:
>We should similarly
> issue a note or a warning for people who try to make their first commit
> on a branch not named default.

Do you mean in addition to the "branches are permanent and global, did
you want a bookmark?" warning that hg gives when people run hg branch?
 I still don't understand the need for that warning, let alone an
additional warning when someone goes to commit on that branch.  Are
branches really that dangerous and scary?  Especially when they are
(still at this point) local to a clone?  I agree that there should be
some friction when someone goes to *push* a new branch (and
--new-branch takes care of that just fine), but not for creating and
committing to a branch in a local clone.

You might as well warn before each commit as well: "commits are
permanent and global, did you want to use a patch?"  See?  It's silly.

Bryan


More information about the Mercurial mailing list