0

I have two diffrenet Mercurial repos, the A and the S. The repos S has two branches with two heads and some merges between the branches. I want to transplant this two branches preserving its names and the structure onto the revision N of the repo A.

Is it possible to do that using transplant extension of hg? I've failed to find a way to produce a commit with two parents (merge commit) using transplant.

0x2207
  • 878
  • 1
  • 6
  • 20

1 Answers1

1

No-no-no

  1. Transplant can be used only in one repository (when you want copy changeset into another node in repository)
  2. Even for this task Transplant considered outdated and replaced by graft
  3. Moving branches (mutable history) as singe changeset (fixed slice) impossible in common sense

Describe your business-task better: maybe you just want pull two branches into A (hg pull -b BRANCH_1 -b BRANCH_2)?

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • 1. hg transplant has option '-s', hence it does work not only with the one repository (moreover, I tested it, it works fine with simple cases) 2. graft can not pick commits from the foreign repository 3. not sure that I understand right. I have two branches, construction subtree. I want to transplant whole the subtree ontop the specific commit. – 0x2207 Aug 09 '14 at 13:20
  • @0x2207 - two branches with common parent? Can you show DAG (or `hg glog`) of this part? Are repositories A and S related (share partial common history)? – Lazy Badger Aug 09 '14 at 18:41