hg-stable repo

Adrian Buehlmann adrian at cadifra.com
Fri Feb 5 04:22:20 CST 2010


On 05.02.2010 01:43, Alejandro Santos wrote:
> I've just cloned a new fresh copy of hg-stable repo, and after compiling
> it the version was the two months old 1.4, and I expected to get 1.4.3:
> 
> $ hg clone http://selenic.com/repo/hg-stable/
> destination directory: hg-stable
> requesting all changes
> adding changesets
> adding manifests
> adding file changes
> added 9997 changesets with 19904 changes to 1296 files
> updating to branch default
> 1099 files updated, 0 files merged, 0 files removed, 0 files unresolved
> $ cd hg-stable/
> $ make local
> $ ./hg --version
> Mercurial Distributed SCM (version 1.4+2-57949bfec718)
> 
> It took me a while to realize there's a new branch called 'stable', and
> the default branch hasn't been updated since a few months:
> 
> $ hg branches
> stable                      9996:7c5eb0988e7a
> default                     9871:57949bfec718 (inactive)
> 
> After updating to 'stable' the version installed is the one I wanted in
> the first place.
> 
> Is this an issue?
>

Not really.

The stable repo isn't really needed anymore, since Mercurial switched
to using named branches for its own development. The old stable repo
is kept as a convenience.

You can avoid this sort of problems by specifying the branch name
on clone [1]:

$ hg clone http://selenic.com/repo/hg-stable#stable
destination directory: hg-stable
requesting all changes
adding changesets
adding manifests
adding file changes
added 9997 changesets with 19904 changes to 1296 files
updating to branch stable
1106 files updated, 0 files merged, 0 files removed, 0 files unresolved

This will also append the branch name to the default path .hg/hgrc file like
this:

[paths]
default = http://selenic.com/repo/hg-stable#stable

As a side note, in the example above you could instead have used the
url of the main repo right away like this:

$ hg clone http://selenic.com/repo/hg#stable hg-stable
requesting all changes
adding changesets
adding manifests
adding file changes
added 9997 changesets with 19904 changes to 1296 files
updating to branch stable
1106 files updated, 0 files merged, 0 files removed, 0 files unresolved

which has the effect that you will pull changesets from the stable branch
when doing 'hg pull' -- due to the default path in hgrc having been set to
'http://selenic.com/repo/hg#stable'.


[1] http://www.selenic.com/mercurial/hg.1.html#url-paths


More information about the Mercurial-devel mailing list