{"thread":{"id":"25309","subject":"cvs importing a forked project","startedAt":"2010-10-01T17:38:56Z","lastAt":"2010-10-06T16:34:11Z","messageCount":7,"participants":["Eric Frederich","Ævar Arnfjörð Bjarmason","Brandon Casey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"152247","messageId":"AANLkTimvaH4UYzmL9eS1Yq7WNaS+jPRfkajKPP=hjZWV@mail.gmail.com","threadId":"25309","inReplyTo":null,"subject":"cvs importing a forked project","fromName":"Eric Frederich","fromEmail":"eric.frederich@gmail.com","sentAt":"2010-10-01T17:38:56Z","receivedAt":"2010-10-01T17:38:56Z","isPatch":false,"sender":{"key":"eric.frederich@gmail.com","avatar":"https://gravatar.com/avatar/a047bc6d3404a87c923025574cdee9abf57ae9efc1d96c7bbedf30faf47ee12c?d=mp&s=160"},"body":"Hello,\n\nI have a project (several actually) where development was done in cvs\nfor 10 years.  Then, about 5 years ago, a copy of the latest was made\nand development continued in a new project.\nDevelopment in the old project stopped for the most part.\n\nIs there any way where I can combine these two projects in git?\nBasically, take the newer project's first commit and make its parent\nthe the last commit of the older project.\nDevelopment was pretty linear.\n\nThanks,\n~Eric\n"},{"id":"152253","messageId":"AANLkTi=QYHsUq320A3Sb=L4OSVOB2-P5LcpmjK9amjmo@mail.gmail.com","threadId":"25309","inReplyTo":"AANLkTimvaH4UYzmL9eS1Yq7WNaS+jPRfkajKPP=hjZWV@mail.gmail.com","subject":"Re: cvs importing a forked project","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-10-01T17:53:36Z","receivedAt":"2010-10-01T17:53:36Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Fri, Oct 1, 2010 at 17:38, Eric Frederich <eric.frederich@gmail.com> wrote:\n> I have a project (several actually) where development was done in cvs\n> for 10 years.  Then, about 5 years ago, a copy of the latest was made\n> and development continued in a new project.\n> Development in the old project stopped for the most part.\n>\n> Is there any way where I can combine these two projects in git?\n> Basically, take the newer project's first commit and make its parent\n> the the last commit of the older project.\n> Development was pretty linear.\n\nSure, you import them both into git with cvs2git (or something like\nthat), then you fetch all the commits into a single git repository.\n\nThen it becomes a problem of merging two git histories, something\nthat's widely documented and well understood.\n"},{"id":"152254","messageId":"Ci4laGuWQaUrmZdwH9nojZ77bfNScQVKlCGXCSR6hP816oyKCfkncQ@cipher.nrlssc.navy.mil","threadId":"25309","inReplyTo":"AANLkTimvaH4UYzmL9eS1Yq7WNaS+jPRfkajKPP=hjZWV@mail.gmail.com","subject":"Re: cvs importing a forked project","fromName":"Brandon Casey","fromEmail":"brandon.casey.ctr@nrlssc.navy.mil","sentAt":"2010-10-01T17:57:29Z","receivedAt":"2010-10-01T17:57:29Z","isPatch":false,"sender":{"key":"brandon.casey.ctr@nrlssc.navy.mil","avatar":null},"body":"On 10/01/2010 12:38 PM, Eric Frederich wrote:\n> Hello,\n> \n> I have a project (several actually) where development was done in cvs\n> for 10 years.  Then, about 5 years ago, a copy of the latest was made\n> and development continued in a new project.\n> Development in the old project stopped for the most part.\n> \n> Is there any way where I can combine these two projects in git?\n> Basically, take the newer project's first commit and make its parent\n> the the last commit of the older project.\n> Development was pretty linear.\n\nYou can do this very easily using grafts.\n\n   https://git.wiki.kernel.org/index.php/GraftPoint\n\nfilter-branch can be used to rewrite the history and make the grafts\npermanent.\n\n-Brandon\n"},{"id":"152698","messageId":"AANLkTi=DRWeJc5gW0Rio9NZh5a02FQtdd9TeEzOkBimr@mail.gmail.com","threadId":"25309","inReplyTo":"Ci4laGuWQaUrmZdwH9nojZ77bfNScQVKlCGXCSR6hP816oyKCfkncQ@cipher.nrlssc.navy.mil","subject":"Re: cvs importing a forked project","fromName":"Eric Frederich","fromEmail":"eric.frederich@gmail.com","sentAt":"2010-10-05T18:38:37Z","receivedAt":"2010-10-05T18:38:37Z","isPatch":false,"sender":{"key":"eric.frederich@gmail.com","avatar":"https://gravatar.com/avatar/a047bc6d3404a87c923025574cdee9abf57ae9efc1d96c7bbedf30faf47ee12c?d=mp&s=160"},"body":"Interesting.  Looks easy to use except I can't figure out how to get\nthe two projects imported to the same git project.\n\nIf I run the following...\n\n$ git cvsimport -C myproject -d /some/vault projects/foo_old\n$ git cvsimport -C myproject -d /some/vault projects/foo_new\n\n... then the projects look to be merged at some arbitrary point in\ntime based on date.\nI'm not even sure if the entire history of foo_new is imported.\nThis is just based off of what gitk is showing me but it seems to take\nthe entire history of foo_old but when importing foo_new but it looks\nlike only commits made after the last commit of foo_old are imported.\n\nObviously this isn't even using grafts since there is no grafts file.\nHow do I get these two projects imported in their entirety into a\nsingle git repository so that I can create my own grafts file?\nAlso, once I have my two projects imported into the same grafts file\nthey should be completely independent right?... how do I switch\nbetween them then or even know what the SHA-1's are if they're not\nconnected at all?\n\nThanks,\n~Eric\n\nOn Fri, Oct 1, 2010 at 1:57 PM, Brandon Casey\n<brandon.casey.ctr@nrlssc.navy.mil> wrote:\n> On 10/01/2010 12:38 PM, Eric Frederich wrote:\n>> Hello,\n>>\n>> I have a project (several actually) where development was done in cvs\n>> for 10 years.  Then, about 5 years ago, a copy of the latest was made\n>> and development continued in a new project.\n>> Development in the old project stopped for the most part.\n>>\n>> Is there any way where I can combine these two projects in git?\n>> Basically, take the newer project's first commit and make its parent\n>> the the last commit of the older project.\n>> Development was pretty linear.\n>\n> You can do this very easily using grafts.\n>\n>   https://git.wiki.kernel.org/index.php/GraftPoint\n>\n> filter-branch can be used to rewrite the history and make the grafts\n> permanent.\n>\n> -Brandon\n>\n"},{"id":"152703","messageId":"AANLkTimnvAXAiE=03E3VdXSeP3pQBa8UTH548vEWsYsG@mail.gmail.com","threadId":"25309","inReplyTo":"AANLkTi=DRWeJc5gW0Rio9NZh5a02FQtdd9TeEzOkBimr@mail.gmail.com","subject":"Re: cvs importing a forked project","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-10-05T19:20:18Z","receivedAt":"2010-10-05T19:20:18Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Oct 5, 2010 at 18:38, Eric Frederich <eric.frederich@gmail.com> wrote:\n> Interesting.  Looks easy to use except I can't figure out how to get\n> the two projects imported to the same git project.\n>\n> If I run the following...\n>\n> $ git cvsimport -C myproject -d /some/vault projects/foo_old\n> $ git cvsimport -C myproject -d /some/vault projects/foo_new\n\nEither switch to a new parentless branch between the two (I don't know\ncvsimport), or import them in two distinct git repositories. Then when\nthat's finished do:\n\n    git init the-merge &&\n    cd the-merge &&\n    git remote add ~/cvs-repo-1 &&\n    git remote add ~/cvs-repo-2 &&\n    git remote update\n\nAnd you'll have all those commits / branches / tags from both of them\nto work with.\n"},{"id":"152765","messageId":"AANLkTimawPYmqoH_tupOc6zsgSeTU=dqgXA9pB95m542@mail.gmail.com","threadId":"25309","inReplyTo":"AANLkTimnvAXAiE=03E3VdXSeP3pQBa8UTH548vEWsYsG@mail.gmail.com","subject":"Re: cvs importing a forked project","fromName":"Eric Frederich","fromEmail":"eric.frederich@gmail.com","sentAt":"2010-10-06T14:51:01Z","receivedAt":"2010-10-06T14:51:01Z","isPatch":false,"sender":{"key":"eric.frederich@gmail.com","avatar":"https://gravatar.com/avatar/a047bc6d3404a87c923025574cdee9abf57ae9efc1d96c7bbedf30faf47ee12c?d=mp&s=160"},"body":"Thanks a bunch.\nThat set of commands seemed to work except the \"git remote add\"\ncommands needed a name.\nAfter doing that I saw both disconnected trees in gitk.  I created my\n.git/info/grafts file and it looked good.\nI removed the two remotes afterwards and had to manually create a master branch.\n\nI wanted to try to \"switch to a new parentless branch\" but don't know how.\nHow can I create / switch to a new empty parentless branch?\n\n\nOn Tue, Oct 5, 2010 at 3:20 PM, Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> On Tue, Oct 5, 2010 at 18:38, Eric Frederich <eric.frederich@gmail.com> wrote:\n>> Interesting.  Looks easy to use except I can't figure out how to get\n>> the two projects imported to the same git project.\n>>\n>> If I run the following...\n>>\n>> $ git cvsimport -C myproject -d /some/vault projects/foo_old\n>> $ git cvsimport -C myproject -d /some/vault projects/foo_new\n>\n> Either switch to a new parentless branch between the two (I don't know\n> cvsimport), or import them in two distinct git repositories. Then when\n> that's finished do:\n>\n>    git init the-merge &&\n>    cd the-merge &&\n>    git remote add ~/cvs-repo-1 &&\n>    git remote add ~/cvs-repo-2 &&\n>    git remote update\n>\n> And you'll have all those commits / branches / tags from both of them\n> to work with.\n>\n"},{"id":"152770","messageId":"AANLkTiksZTtBGAp0KvsPTjUHqh+ogQbQDZacJ4a661ZV@mail.gmail.com","threadId":"25309","inReplyTo":"AANLkTimawPYmqoH_tupOc6zsgSeTU=dqgXA9pB95m542@mail.gmail.com","subject":"Re: cvs importing a forked project","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2010-10-06T16:34:11Z","receivedAt":"2010-10-06T16:34:11Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, Oct 6, 2010 at 14:51, Eric Frederich <eric.frederich@gmail.com> wrote:\n> I wanted to try to \"switch to a new parentless branch\" but don't know how.\n> How can I create / switch to a new empty parentless branch?\n\n    git checkout --orphan parentless-branch-name-here\n"}]}