Merging 2 code sets that come from outside Mercurial
Bryan O'Sullivan
bos at serpentine.com
Wed Jun 21 10:54:29 CDT 2006
On Wed, 2006-06-21 at 08:26 -0700, michael.schamberger at smpsolutions.net
wrote:
> I have 2 sets of code from another version control system that I lost
> access to. Both sets are, of course, from the same project.
>
> I want to start using Mercurial from here on out for version control
> but I want to start by using Mercurial to merge these 2 sets.
>
> I tried creating a repository out of one set then copying all the
> files from the other set into that directory, overwriting everything.
No, that will nuke everything, as you've noticed.
What you may want to do is create two repositories, populate each one,
then pull one into the other and merge.
Here's an example: merging Python with the Linux kernel.
First, I create a Python repo, populated from the Python source tarball.
tar zxf Python-2.4.tar.gz
cd Python-2.4
hg init
hg commit -A -m'Import of Python 2.4'
I then create a Linux repo in the same way.
cd ..
tar zxf linux-2.6.16.tar.gz
cd linux-2.6.16
hg init
hg commit -A -m'Import of Linux 2.6.16'
I then create a temporary repository for the merge, in case I screw
something up and need to blow it away.
cd ..
hg clone Python-2.4 merge
Finally, I create the Frankenstein's monster:
cd merge
hg pull -f ../linux-2.6.16
hg merge
hg commit -m'Merger of Linux and Python to give uberproject of
d00m'
And that's about all there is to it.
<b
--
Bryan O'Sullivan <bos at serpentine.com>
More information about the Mercurial
mailing list