Richard Lowe wrote:
Stephen Lau wrote:
Mercurial's official position is that "a branch == a repository", but
it is possible to do in-line branches via tagging with multiple heads.
Making use of multiple heads in the same repository tends to confuse
things greatly. I also suspect that you can't pull -u when the incoming
changes introduce multiple heads (I'm not sure if this is the case when
both new heads come from the remote, however).
It seems that is the case.
% cd repo1
% hg init
% echo "foo" > a
% hg ci -Am "Initial"
% echo "bar" >! a
% hg ci -m "Second"
% echo "baz" >! a
% hg ci -m "Third"
% hg up -C 1 # Quickest way I could think of to get two heads
% hg revert -r tip
% hg ci -m "Conglomerate"
Leaves the history looking like
o---o---o
\
o
A reasonable simulation of a respin, in effect if not in method.
% hg clone -r0 repo1 repo2 # Clone with just the initial revision
% hg pull -u ../repo1
pulling from ../repo1
searching for changes
adding changesets
adding manifests
adding file changes
added 3 changesets with 2 changes to 1 files (+1 heads)
not updating, since new heads added
(run 'hg heads' to see heads, 'hg merge' to merge)
Both new heads come from the remote (repo1), but it still refuses to
choose which to update the working copy to, and suggests I merge.
Also 'tip' is the most recent of the two heads, so 'hg up tip' isn't
always what's going to be desired, either.
-- Rich.
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org