1

My situation:

  • I have a repository MVC.
  • I created two repositories A and B. I did that by using repository MVC as my parent repository.
  • I worked in repositories A and B, adding new files.
  • I committe (i.e. repositories A and B are different from MVC repository)
  • I fixed a bug in one of the MVC files - but I did that in repository A.
  • I committed that bugfix.

What I want:

How do I get my changes (only second commit) from repository A...

  1. into my base MVC repository?
  2. and then into repository B?
flag

1 Answer

1

If you are ready to merge repository A into MVC, then you can go ahead and do so. Then you can merge MVC into B, at which point B will have the bugfix as well. The red book has a good tutorial of merging if you need one.

If A isn't ready (and this sounds like your situation), it's a little trickier but not impossible. What you can then do is transplant the change from A to MVC. Transplanting is basically a way of duplicating a changeset onto a different parent node. (So if changeset Z had parent X but you wanted to apply it to parent Y, transplant's your best friend.) The Mercurial transplant extension documentation has more information and a few helpful diagrams.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.