{"thread":{"id":"27685","subject":"Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo","startedAt":"2011-06-22T09:06:31Z","lastAt":"2011-06-23T08:11:59Z","messageCount":7,"participants":["sandy2010","Andreas Ericsson","Michael Haggerty","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"170454","messageId":"1308733591425-6503493.post@n2.nabble.com","threadId":"27685","inReplyTo":null,"subject":"Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo","fromName":"sandy2010","fromEmail":"sandeeptt@yahoo.com","sentAt":"2011-06-22T09:06:31Z","receivedAt":"2011-06-22T09:06:31Z","isPatch":false,"sender":{"key":"sandeeptt@yahoo.com","avatar":null},"body":"Hello,\n\nI'm aware of cvs2git and git fast-import utilities to do this. My\nrequirement is little different.\nMy CVS Repo is:\n/cvs/BFARM\n\nThis consists of following directories:\nMisc/suite1\nMisc/suite2\nMisc/suite3\n\nNow, I want to Migrate the suite1 and suite2 into a single Git repo\n\"/git/Testsuites\" and it should look like this:\n/git/Testsuites/suite1\n/git/Testsuites/suite2\n\nHow can I do this? I do not want to make suite1 and suite2 as separate git\nrepos.\n\nThanks.\n\n--\nView this message in context: http://git.661346.n2.nabble.com/Migration-from-CVS-to-GIT-Multiple-directories-in-CVS-repo-to-a-single-Git-repo-tp6503493p6503493.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"170455","messageId":"4E01B44C.7090003@op5.se","threadId":"27685","inReplyTo":"1308733591425-6503493.post@n2.nabble.com","subject":"Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2011-06-22T09:22:20Z","receivedAt":"2011-06-22T09:22:20Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"On 06/22/2011 11:06 AM, sandy2010 wrote:\n> Hello,\n> \n> I'm aware of cvs2git and git fast-import utilities to do this. My\n> requirement is little different.\n> My CVS Repo is:\n> /cvs/BFARM\n> \n> This consists of following directories:\n> Misc/suite1\n> Misc/suite2\n> Misc/suite3\n> \n> Now, I want to Migrate the suite1 and suite2 into a single Git repo\n> \"/git/Testsuites\" and it should look like this:\n> /git/Testsuites/suite1\n> /git/Testsuites/suite2\n> \n> How can I do this? I do not want to make suite1 and suite2 as separate git\n> repos.\n> \n\nMake a single repository out of them first, and then look at\ngit-filter-branch to create separate repositories for them.\nYou'll want to use the tree-filter option.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n\nConsidering the successes of the wars on alcohol, poverty, drugs and\nterror, I think we should give some serious thought to declaring war\non peace.\n"},{"id":"170456","messageId":"1308738087757-6503654.post@n2.nabble.com","threadId":"27685","inReplyTo":"4E01B44C.7090003@op5.se","subject":"Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo","fromName":"sandy2010","fromEmail":"sandeeptt@yahoo.com","sentAt":"2011-06-22T10:21:27Z","receivedAt":"2011-06-22T10:21:27Z","isPatch":false,"sender":{"key":"sandeeptt@yahoo.com","avatar":null},"body":"I did not understand when you say \"Make a single repository out of them\nfirst\". You mean single Git repository? Infact, my requirement is same. Can\nI have a single git repository \"/git/Testsuites\" which will contain suite1\nand suite2 directories? Provided suite1 and suite2 are no git repositories.\n\n--\nView this message in context: http://git.661346.n2.nabble.com/Migration-from-CVS-to-GIT-Multiple-directories-in-CVS-repo-to-a-single-Git-repo-tp6503493p6503654.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"170460","messageId":"4E01CAD5.8080808@alum.mit.edu","threadId":"27685","inReplyTo":"1308733591425-6503493.post@n2.nabble.com","subject":"Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo","fromName":"Michael Haggerty","fromEmail":"mhagger@alum.mit.edu","sentAt":"2011-06-22T10:58:29Z","receivedAt":"2011-06-22T10:58:29Z","isPatch":false,"sender":{"key":"mhagger@alum.mit.edu","avatar":"https://avatars.githubusercontent.com/u/119718?v=4"},"body":"On 06/22/2011 11:06 AM, sandy2010 wrote:\n> I'm aware of cvs2git and git fast-import utilities to do this. My\n> requirement is little different.\n> My CVS Repo is:\n> /cvs/BFARM\n> \n> This consists of following directories:\n> Misc/suite1\n> Misc/suite2\n> Misc/suite3\n> \n> Now, I want to Migrate the suite1 and suite2 into a single Git repo\n> \"/git/Testsuites\" and it should look like this:\n> /git/Testsuites/suite1\n> /git/Testsuites/suite2\n> \n> How can I do this? I do not want to make suite1 and suite2 as separate git\n> repos.\n\nSince CVS works filewise, you can simply move the suite1 and suite2\ndirectories from within the CVS repository into a pseudo CVS repository,\nthen convert that:\n\n$ mkdir /tmp/fake-cvs-repo /tmp/fake-cvs-repo/Misc\n$ cp -pr /cvs/BFARM/CVSROOT /tmp/fake-cvs-repo\n$ cp -pr /cvs/BFARM/Misc/suite1 /tmp/fake-cvs-repo/Misc\n$ cp -pr /cvs/BFARM/Misc/suite2 /tmp/fake-cvs-repo/Misc\n\nand then convert the pseudo-repository \"/tmp/fake-cvs-repo/Misc\".\nDepending on the tools and filesystems involved, you might be able to\nuse hardlinks or symlinks instead of full copies when building up the\npseudorepo.\n\nMichael\n\n-- \nMichael Haggerty\nmhagger@alum.mit.edu\nhttp://softwareswirl.blogspot.com/\n"},{"id":"170462","messageId":"4E01D847.9080707@op5.se","threadId":"27685","inReplyTo":"1308738087757-6503654.post@n2.nabble.com","subject":"Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2011-06-22T11:55:51Z","receivedAt":"2011-06-22T11:55:51Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"On 06/22/2011 12:21 PM, sandy2010 wrote:\n> I did not understand when you say \"Make a single repository out of them\n> first\". You mean single Git repository?\n\nYes.\n\n> Infact, my requirement is same. Can\n> I have a single git repository \"/git/Testsuites\" which will contain suite1\n> and suite2 directories? Provided suite1 and suite2 are no git repositories.\n> \n\nYes.\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n\nConsidering the successes of the wars on alcohol, poverty, drugs and\nterror, I think we should give some serious thought to declaring war\non peace.\n"},{"id":"170488","messageId":"1308808706969-6507269.post@n2.nabble.com","threadId":"27685","inReplyTo":"4E01CAD5.8080808@alum.mit.edu","subject":"Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo","fromName":"sandy2010","fromEmail":"sandeeptt@yahoo.com","sentAt":"2011-06-23T05:58:26Z","receivedAt":"2011-06-23T05:58:26Z","isPatch":false,"sender":{"key":"sandeeptt@yahoo.com","avatar":null},"body":"Thanks Michael! This worked like a charm! I was not aware that we can do such\nthings in CVS. Can you point me to some good docs/articles on such\ncomparison of CVS and Git?\n\nThanks again!\n\n--\nView this message in context: http://git.661346.n2.nabble.com/Migration-from-CVS-to-GIT-Multiple-directories-in-CVS-repo-to-a-single-Git-repo-tp6503493p6507269.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"170490","messageId":"m3mxh955nm.fsf_-_@localhost.localdomain","threadId":"27685","inReplyTo":"1308808706969-6507269.post@n2.nabble.com","subject":"Comparison of CVS and Git (was: Re: Migration from CVS to GIT)","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-06-23T08:11:59Z","receivedAt":"2011-06-23T08:11:59Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"sandy2010 <sandeeptt@yahoo.com> writes:\n\n> Thanks Michael! This worked like a charm! I was not aware that we can do such\n> things in CVS. Can you point me to some good docs/articles on such\n> comparison of CVS and Git?\n\nA bit of self-promotion:\n\n  \"Difference between GIT and CVS\" on StackOverflow (my answer)\n  http://stackoverflow.com/questions/802573/difference-between-git-and-cvs/824241#824241\n\nA blog post I recently found, describing how the workflow changed\nrather that the differences between Git and CVS:\n\n  \"From CVS to Git, 9 Things I\\u2019ve Learned\" on EclipseSource blog\n  http://eclipsesource.com/blogs/2011/06/09/git-lessons-learned/\n\nThis article describes how Git could came into being, IMHO quite well\npresenting Git philosophy as well:\n\n  \"The Git Parable\" by Tom Preston-Werner (of GitHub)\n  http://tom.preston-werner.com/2009/05/19/the-git-parable.html\n\n\nAnd just FYI, another tool to convert CVS to Git (non-incremental):\n\n  http://cvs2svn.tigris.org/cvs2git.html\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"}]}