Does anyone use named branches?
Adrian Buehlmann
adrian at cadifra.com
Fri Oct 16 09:21:32 UTC 2009
On 15.10.2009 07:41, Peer Sommerlund wrote:
>
>
> 2009/10/15 Bryan O'Sullivan <bos at serpentine.com <mailto:bos at serpentine.com>>
>
> On Wed, Oct 14, 2009 at 4:28 PM, Matt Mackall <mpm at selenic.com
> <mailto:mpm at selenic.com>> wrote:
>
>
> Judging from traffic on this list and on -devel, _lots_ of
> people use
> them.
>
>
> Hmm. They're just /this close/ to being completely awesome, in my
> estimation, save for that clone-then-update business. Am I missing
> some reason why that is actually good?
>
>
> Isn't it possible to do something like
>
> hg clone http://some.server.org/myrepo#stable
>
> which updates to tip of branch "stable"?
>
Right.
A really amazing feature indeed [1] which even works for local cloning:
$ hg clone thg-stable#stable thg-stable2
requesting all changes
adding changesets
adding manifests
adding file changes
added 3538 changesets with 5457 changes to 522 files
updating working directory
297 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd thg-stable2
$ hg branch
stable
Unfortunately, this implies pulling only the tip of that branch, so fast
local hard-link cloning is voided as soon as you use ...#branch
(due to the implied --pull).
[1]
That feature seems to be quite old actually:
http://selenic.com/repo/hg/rev/fe55e3d6dc0b
it's documented in 'hg help urls':
'''
An optional identifier after # indicates a particular branch, tag,
or changeset to use from the remote repository. See also 'hg help
revisions'.
'''
(although it isn't necessarily a "remote" repository for the hg clone
use case)
More information about the Mercurial
mailing list