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

Matt Mackall mpm at selenic.com
Wed Jun 24 17:02:22 UTC 2015


On Wed, 2015-06-24 at 09:23 -0600, Bryan Murdock wrote:
> 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,

Would you like me to explain it again? Here's a helpful diagram:

http://i.imgur.com/lJbawnF.png

I've spent way too much of the last 10 years dealing with the above
problem, you should just maybe take my word on this one. The next
version of hg will only warn when you create the second branch in a
repo.

But the suggestion here is not about that, it's about people who _on the
very first commit to an empty repo_ do something like:

$ hg branch HEAD # cvs 4eva!

..and then come back several months later wondering why clones check out
a random branch.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial mailing list