Numerical branch name interpreted as a cset number

Tom Fox foxdropbox at gmail.com
Fri Dec 9 23:32:17 UTC 2011


Matt Mackall wrote
> 
> On Fri, 2011-12-09 at 15:00 -0800, Tom Fox wrote:
>> My company interchangeably uses Mercurial and Git.  It became policy to
>> use
>> branches in Git that are numbers like "111".  This policy has shifted to
>> Mercurial as well.  Unfortunately, in Mercurial these branch names will
>> be
>> interpreted as a cset number if such a cset number exists (e.g. hg heads
>> -r
>> 111).  Is there a way to force a revision reference to look for a
>> matching
>> branch before it looks for an existing cset number?  Or better yet, is
>> there
>> a way to say this IS a branch reference?
> 
> $ hg branch 111
> marked working directory as branch 111
> (branches are permanent and global, did you want a bookmark?)
> $ hg ci -msilly
> $ hg log -r "branch(111)"
> changeset:   15632:9125c4e5b3d9
> branch:      111
> tag:         tip
> user:        Matt Mackall <mpm@>
> date:        Fri Dec 09 17:17:56 2011 -0600
> summary:     silly
> 

We're using an old version of Mercurial, 1.4.3.  When was the branch()
functionality added, as it doesn't seem to work for me?

-Tom

--
View this message in context: http://mercurial.808500.n3.nabble.com/Numerical-branch-name-interpreted-as-a-cset-number-tp3574350p3574415.html
Sent from the General mailing list archive at Nabble.com.



More information about the Mercurial mailing list