tags:

views:

58

answers:

2

I have an independent project, the CPAN module ExtUtils::MakeMaker. It also lives inside Perl. Generally, a release of MakeMaker will be made and Perl will integrate that tarball into its repository. But sometimes Perl will change its copy of MakeMaker and that change will have to go into the CPAN repository. Also the history of MakeMaker inside Perl extends before MakeMaker in github.

Rather than having two repositories, I would like there to be one. To wit, simply commit directly to perl5.git/cpan/ExtUtils-MakeMaker. This solves the release integration problem. The problem becomes preserving history, code archeology is very important to MakeMaker. The github repository has most of the history of MakeMaker. perl5.git has its own history of MakeMaker, also unique and interesting. The two histories overlap.

The problem is this: how do I merge the github MakeMaker repository into the Perl repository while still preserving history for archeological use? Preferably a solution that doesn't involve manually slogging through individual changes (there's thousands).

Thank you.

A: 

Check if your repository allows you to tag and branch your code, and check out what they are exactly, they will solve your problems for sure ;-)

Regards.

Omar Al Kababji
Git certainly allows tags and branches, but I'm unsure as to how this relates to the actual question.
calmh
mmm I think I got the whole question wrong :(
Omar Al Kababji
+1  A: 

You can use submodules, or you can use subtree merge (perhaps with the help of third party git subtree tool).

Jakub Narębski
How does a submodule preserve both histories?
Schwern
@Schwern: I don't understand the question. In the case of submodule you have *loose* coupling, and the history of submodule is in its (clone of) repository and the history of coupling is in supermodule. In the case of subtree merge you have *tight* coupling with *joined histories*.
Jakub Narębski
subtree merge does solve the problem. see http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html
J-16 SDiZ