I have the following situation:
The question is: How can I move revision 9 from B's repo into A's repo, without also moving revisions 6-8?
I thought one of the beauties of DVCS was that I could do this kind of thing easily (which in the "centralized" VCS world I could fix easily with branches and merging, I've done it with Vault a lot and it's pretty easy).
Am I missing something here?
NOTE: I looked into "MQ", but that seems to be a big can of worms, and it looks like it'll affect the regular commit cycle just for being enabled. Is this correct?
Any help or pointers will be greatly appreciated. Thank you!
Daniel
https://www.mercurial-scm.org/wiki/wiki/TransplantExtension
See under "Using transplant to cherrypick a set of changesets":
Transplant can manage multiple changesets or changeset ranges like this:
hg transplant REV1:REV2 REV3
This example would cherrypick the range of changesets specified by REV1:REV2 and the additional changeset REV3 upon the working directory revision.
Ideally you would do this with branches though?
I think of the commands this way:
hg bundle
gives you a binary version of a changeset and hg unbundle
will turn the bundle into exactly the same changeset on the receiving side.
Bundle and unbundle are there to transfer changesets over, say, email and the binary patch depend on the parent changesets to be present..
hg export
gives you a text representation of a changeset, and unless you use the --exact
command line flag to hg import
, then applying this patch wont create the exact same changeset on the receiving side.
The advantage of not using --exact
is precisely that you can apply such a patch anywhere as long as there are no textual conflicts.
hg transplant
is just a thin wrapper around hg export
and hg import
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With