Numerical branch name interpreted as a cset number

Matt Mackall mpm at selenic.com
Fri Dec 9 23:21:25 UTC 2011


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 at selenic.com>
date:        Fri Dec 09 17:17:56 2011 -0600
summary:     silly

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list