What exactly *is* a branch?
Daniel Carrera
dcarrera at gmail.com
Wed Jun 23 20:09:54 UTC 2010
On Wed, Jun 23, 2010 at 9:46 PM, Martin Geisler <mg at lazybytes.net> wrote:
>> Btw, I notice that the author of this page did not realize that
>> "clones" and "anonymous branches" are fundamentally the same thing.
>
> This is a good insight! Even if you start with clones, you can still
> pull all the changesets into a single clone and get a bunch of heads,
> each representing an anonymous branch. You can untangle the mess again
> with
>
> hg clone -r A combined branch-a
>
> for each anonymous branch.
Thanks for that info. That's something that had been nagging me for a
while. I thought that after a pull, there was no way to get rid of a
branch other than merging (and merging is not really "getting rid" of
it).
> You can even use --force to pull in changesets from an unrelated
> repository... the two sets of changesets will live side by side and you
> can merge them if you want
I actually tried that experiment yesterday. In principle, all possible
branches have a common parent: The empty repository (with id 00000).
Therefore, logic says that I should be able to merge any two
repositories, no matter how unrelated they might be. Heck, I could
merge Mozilla with OpenOffice and OpenSolaris if I wanted, and the
merge should succeed!
Daniel.
--
No trees were killed in the generation of this message. A large number
of electrons were, however, severely inconvenienced.
More information about the Mercurial
mailing list