Merging 3rd party updates which are not in a repository into?my?repository

Pierre Asselin pa at panix.com
Mon Feb 2 21:01:31 CST 2009


doahh <gavin at prodia.co.uk> wrote:

> This sounds like a great idea but there are a couple of things I don't
> understand:

> 1) Why the intricacy with the symlink? Is it not just the same as creating
> an empty repo, adding the files for version 1.1 (tag it), then adding the
> files for 2.1 with -s 70 (tag it again)?

Yes, if you can reliably delete all the 1.1 files and drop the 2.1
files in the space thus vacated.  Personally I find it easier (less
error-prone) to take the .hg/ to the unpacked tarball, rather than
the unpacked tarball to the .hg/ .  I thought I would have to move
the .hg/ but the symbolic link worked just fine and was easier.


> 2) When you do a pull from the mvnforum-incoming to the myapp repo, do you
> not get problems as the repositories are unrelated? I though I had tried
> doing something like that and couldn't but maybe my problem was caused by
> something else.

It helps to have a time machine and create the -incoming repo before
you started your work :-(

That said, "hg pull" has a "--force" option for unrelated repositories.
You could try pulling the incoming 1.1 version into a clone of your
work repo.  After a possibly painful merge, the two repositories
are related and you can continue pulling and merging the later code
drops.  If it works, the clone you did this in can replace your
work repository.

If it doesn't work, you can always clone -incoming into a new work
repository and repeat your local changes by external means, e.g.
patches.


-- 
pa at panix dot com



More information about the Mercurial mailing list