Thoughts on remotenames additions to remotebranches

Ryan McElroy rm at fb.com
Thu Jan 15 13:18:39 CST 2015


On 1/14/2015 7:22 PM, Sean Farley wrote:
> Gregory Szorc writes:
>
>> On Mon, Jan 12, 2015 at 12:52 PM, Ryan McElroy <rm at fb.com> wrote:
>>
>>> * Allowing certain remote bookmarks to always be visible (eg,
>>> master/@/trunk remote bookmarks)
>>> * Prevent local bookmarks from interfering with remote bookmark names (eg,
>>> prevent '/' in bookmark names)
>>>
>> I apologize if I'm late to the conversion and missed something, but are
>> there alternatives to using "/" as the bookmark/remote/label separator? I'm
>> +0 on a character for "namespacing" bookmarks and IMO "/" fits that role
>> nicely because it's how filesystem paths work and people are familiar with
>> it. ":" is often used to delimit the kinds of things we are delimiting. Can
>> we not use a colon because of revsets or some such?
> 'hg up mpm/@'
>
> vs.
>
> 'hg up mpm:@'
If we take David S-P's suggestion, then we could in fact make the 
delimiter be configurable, though I think there are a few reasonable 
reasons to stick with / as it's currently done: familiarity for those 
using similar features in git; not accidentally mistaken for a divergent 
bookmark (I would argue against @ for this reason); and as you mention 
'/' is not a revset character. This last one is pretty big, I think: 
Imagine you have bookmarks "foo" and "bar", then you have a remote "foo" 
with a bookmark "bar". What would "hg log foo:bar" refer to? It's hugely 
ambiguous and I'd prefer less ambiguity wherever possible. "hg log 
foo/bar" is pretty clearly not a revset operator.




More information about the Mercurial-devel mailing list