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

Bryan Murdock bmurdock at gmail.com
Wed Jun 24 17:07:39 UTC 2015


On Wed, Jun 24, 2015 at 11:02 AM, Matt Mackall <mpm at selenic.com> wrote:
> 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.

Lol!  Thank you, it all makes sense now.  Maybe we could prefix the
message with "dear git user,"  :-)

Bryan



More information about the Mercurial mailing list