[RFC] warn people about the permanence of branches

timeless timeless at gmail.com
Tue Dec 6 11:34:19 CST 2011


Yeah, the glob:* is something I had in mind, I should have spelled it out :)

On 12/6/11, Kevin Bullock <kbullock+mercurial at ringworld.org> wrote:
> On Dec 5, 2011, at 5:22 PM, Matt Mackall wrote:
>
>> Looks like our efforts to alert people exposed to Git to the permanence
>> of branches in non-Git systems need help. I propose:
>>
>> diff -r 09b200396384 mercurial/commands.py
>> --- a/mercurial/commands.py	Mon Dec 05 17:09:11 2011 -0600
>> +++ b/mercurial/commands.py	Mon Dec 05 17:12:10 2011 -0600
>> @@ -855,6 +855,8 @@
>>                                  hint=_("use 'hg update' to switch to
>> it"))
>>         repo.dirstate.setbranch(label)
>>         ui.status(_('marked working directory as branch %s\n') % label)
>> +        ui.warn(_('warning: branches are permanent and global,'
>> +                  ' did you want a bookmark?\n'))
>>     else:
>>         ui.write("%s\n" % repo.dirstate.branch())
>
>
> Can I get a way to shut this warning _off_? Something like:
>
> [ui]
> yesireallyunderstandnamedbranchesandtheiruses = True
>
> I'm intrigued by timeless' idea about a .hgbranchnaming policy file too. The
> equivalent way to 'just shut off the warning' would be (I guess):
>
> glob:*
>
> in the .hgbranchnaming file.
>
> pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
> Kevin R. Bullock
>
>

-- 
Sent from my mobile device


More information about the Mercurial-devel mailing list