rebase - In Mercurial, how to combine unrelated repositories, leaving only one root? -


i have 4 versions of project. versions 1-3 "prototypes" not under source control (they exist separate directories in filesystem). version 4 has been under source control since inception , has long history of commits.

i want combine these versions 1-3 become individual changesets each 1 descendant of previous. root of version 4 should become descendant of version 3 (and no collapsing of version 4's history of course).

all changes private, not public (there no problem rewriting history, were).

what i've done far , tried:
1. setup new hg repositories in directory of prototype versions
2. cloned repository of version 4
3. pulled (with hg pull --force) unrelated repositories versions 1-3 cloned repository.

this gives me 4 unrelated "roots" (changesets no ancestors) in single repository. when combine them don't want remember these 4 roots. hg rebase should let me move changesets , destroy originals, unlike hg merge.

here i'll use 101 revision "version 1" (which single changeset no parent) , 102 revision "version 2".

attempt 1: try hg rebase -b 102 -d 101 respone nothing rebase. presumably because have no common ancestor (i feel inconsistent... -b 102 include ancestors except common ancestor, nothing in case.)

attempt 2: try hg rebase -s 102 -d 101. results in merge conflicts. hg revert --all --rev 102 , hg resolve -m indicate prefer "version 2" in conflicts (although wonder if right way prefer 1 parent on in presence of adds/removes?). when commit, don't have linear history --- revision 102 still there!

if hg rebase --continue final command (instead of hg commit) works perfectly.

i didn't read last part of documentation:
http://www.selenic.com/mercurial/hg.1.html#rebase


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -