创建了两个“无关的”Mercurial存储库:
user@SERVER ~/mercurialtest
$ cd jointest/
user@SERVER ~/mercurialtest/jointest
$ hg init beginning
user@SERVER ~/mercurialtest/jointest
$ hg init end
user@SERVER ~/mercurialtest/jointest
$ cd beginning/
user@SERVER ~/mercurialtest/jointest/beginning
$ echo "something old..." >> data.txt
user@SERVER ~/mercurialtest/jointest/beginning
$ hg add data.txt
user@SERVER ~/mercurialtest/jointest/beginning
$ hg commit -m "Nr 1 in beginning"
user@SERVER ~/mercurialtest/jointest/beginning
$ echo "something old..." >> data.txt
user@SERVER ~/mercurialtest/jointest/beginning
$ hg commit -m "Nr 2 in beginning"
user@SERVER ~/mercurialtest/jointest/beginning
$ echo "something old..." >> data.txt
user@SERVER ~/mercurialtest/jointest/beginning
$ hg commit -m "Nr 3 in beginning"
user@SERVER ~/mercurialtest/jointest/beginning
$ cp -v data.txt ../end/
`data.txt' -> `../end/data.txt'
user@SERVER ~/mercurialtest/jointest/beginning
$ cd ../end
user@SERVER ~/mercurialtest/jointest/end
$ hg add data.txt # No shared changeset
user@SERVER ~/mercurialtest/jointest/end
$ hg commit -m "Nr 1 in end"
user@SERVER ~/mercurialtest/jointest/end
$ echo "new stuff..." >> data.txt
user@SERVER ~/mercurialtest/jointest/end
$ hg commit -m "Nr 2 in end"
user@SERVER ~/mercurialtest/jointest/end
$ echo "new stuff..." >> data.txt
user@SERVER ~/mercurialtest/jointest/end
$ hg commit -m "Nr 3 in end"
是否可以,如何将它们连接到一个存储库中?我想从两个单独的存储库beginning="o-o-O"
,end="O-o-o"
(其中总共六次提交)中获取O
到一个存储库 joined="o-o-O-o-o"
(总共五个提交)。
我的理由是我已经将两个分支转换为他们自己的存储库,但我真的希望它们合二为一。除了这种方式,我没有让转换工作,作为单独的存储库。