tags:

views:

69

answers:

2

I have two versions of a product and am using separate Hg repositories for each. I have made a change to one (v1.0) and I want to pull just that change into the v2.0 repository. How do I go about this? As far as I can tell, using hg pull -f -r xxxxx \\server\hg\v1.0 will pull in all changes up to the specified revision which isn't what I want.

Is this possible or will I have to add the fix by hand?

+3  A: 

hg transplant

wRAR
Wow, that extension works really well. Thanks.
Rob
It does, but the drawback is now you have the same logical change in two places with two different hashids. So long as you're only transplanting back and forth that's fine, but if you ever want to pull/push between those repos you'll have every change twice, since they're officially different changes. Mercurial will sill probably merge it cleanly, but you'll see a lot of extra history. When possible try to push/pull, though you're right it brings all the changeset's ancestors with it.
Ry4an
+1  A: 

You can use hg incoming -f -r xxx \\server\hg\v1.0 to reveal what would come in from a pull.

Perhaps the transplant extension will do what you want? Something like hg transplant -s \\server\hg\v1.0 with the interactive changeset selector.

If all else fails, you could use hg diff to pull out a patch for just the revision you want.

crazyscot