Integrating two [unrelated] branches via fast-import
John Arbash Meinel
john at arbash-meinel.com
Mon Oct 26 21:24:40 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
> Hi Ian,
>
> I need your advice for my something strange task.
>
> I have 2 repositories of FTE project: one repo is official CVS one, second repo is forked SVN repo.
> SVN repo is not converted from CVS, but just started from some CVS revision. I want to join both
> repos as common history in bzr shared repo.
>
> I have successfully converted CVS repo with cvs2bzr, and converted SVN repo with svn-import (from
> bzr-svn). Now I have 2 unrelated history: converted CVS and converted SVN.
>
> I want to try join them manually via fastimport dump. Do you think it is possible?
> E.g. I will dump first and second to fastimport stream, and then manually add links between both.
> I'm not expert in fastimport format yet, so before I'll start to dig so deep I'd like to get some
> advice from you, because you're master of bzr fast-import.
>
> Is it possible and where I should start?
>
> Thanks,
> Alexander
If one is going to just be an ancestor of the other one, I think you
just have to add the "parent" link. However, I think the export process
is probably going to use "marks" to shorten the sha hashes. (:1 ==
ab342ba3b34bc3, etc.)
As such, you'll probably have to re-number all of child marks, so that
they don't conflict with the marks in the parent stream.
After, that, it should just be 'cat cvs.fi svn.fi > combined.fi'.
I also don't know how the sha hashes are generated. I know for *git*
that the hash for a revision includes the parent revisions. Which means
that if you change rev 1, it effects *every* descendant. I assume the
fast-import stream doesn't specifically care about that, though.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkrmE5gACgkQJdeBCYSNAAO1hQCdGrnYVZOkhc5HD9HDBuRjWh9P
8hQAn3Uo5VYlN8mb1362z6gJQri8GvGz
=37FQ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list