branches & 'hg update'

Aurélien Campéas aurelien.campeas at logilab.fr
Thu Jun 18 05:19:43 CDT 2009


On Thu, Jun 18, 2009 at 04:57:15AM -0500, Matt Mackall wrote:
> On Thu, 2009-06-18 at 11:46 +0200, Aurélien Campéas wrote:
> > Hello,
> > 
> > Using mercurial 1.2.1 (the debian packaged version), I note that :
> > 
> > hg branch 9.5
> > 
> > [ add, commit ]
> > 
> > creates a 9.5 branch and allows doing stuff within
> > 
> > but then, from, say, default :
> > 
> > hg up 9.5
> > 
> > (or '9.5') does not drive me back to that branch ...
> > 
> > It works perfectly with a non-dotted branch name (9_5).
> > 
> > Is this a known bug ? (skimming over
> > http://www.selenic.com/mercurial/bts/) I'd say no, but ...
> 
> Do you have a tag named 9.5?
> 

I had created a 9.5 tag inside the branch (to make it a living branch)
indeed.

I don't see anything related to tags in the 'update' docmumentation
(but then, I've been known to not see bug things sitting in front of
me ...). Even the part about branches is a bit terse:

hg update [-C] [-d DATE] [[-r] REV]

(no branches here)

only "Update the repository's working directory to the specified
revision, or the tip of the current branch if none is specified.".

Otherwise, I can't reproduce the bug but with this exact sequence:

$ hg branch 9.5
marked working directory as branch 9.5
$ hg tag 9.5
auc at crater:~/local/svn/srv/hgrepo$ hg branch
9.5
$ hg up default
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch
default
$ hg up 9.5
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch
default

Thanks,
Aurélien.


More information about the Mercurial mailing list