{"thread":{"id":"12748","subject":"Importing all modules in a CVS repo with git-cvsimport","startedAt":"2008-03-19T18:35:36Z","lastAt":"2008-03-20T15:37:28Z","messageCount":8,"participants":["Alex Bennee","Daniel Barkalow","Jeff King","Robin Rosenberg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"72370","messageId":"1205951736.24610.3.camel@pitcairn.cambridgebroadband.com","threadId":"12748","inReplyTo":null,"subject":"Importing all modules in a CVS repo with git-cvsimport","fromName":"Alex Bennee","fromEmail":"kernel-hacker@bennee.com","sentAt":"2008-03-19T18:35:36Z","receivedAt":"2008-03-19T18:35:36Z","isPatch":false,"sender":{"key":"kernel-hacker@bennee.com","avatar":null},"body":"Hi,\n\nI'm wanting to import the entirety of a CVS repository into git rather\nthan an individual module. However every approach I've tried to do this\nfails as the underlying cvsps tool seems to only be able to deal with\nmodules rather than the whole project.\n\nIs there any invocation I could do that would do the whole import?\n\n--\nAlex, homepage: http://www.bennee.com/~alex/ When angry, count four;\nwhen very angry, swear. -- Mark Twain, \"Pudd'nhead Wilson's Calendar\"\n"},{"id":"72389","messageId":"alpine.LNX.1.00.0803191602110.19665@iabervon.org","threadId":"12748","inReplyTo":"1205951736.24610.3.camel@pitcairn.cambridgebroadband.com","subject":"Re: Importing all modules in a CVS repo with git-cvsimport","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-03-19T20:10:47Z","receivedAt":"2008-03-19T20:10:47Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Wed, 19 Mar 2008, Alex Bennee wrote:\n\n> Hi,\n> \n> I'm wanting to import the entirety of a CVS repository into git rather\n> than an individual module. However every approach I've tried to do this\n> fails as the underlying cvsps tool seems to only be able to deal with\n> modules rather than the whole project.\n> \n> Is there any invocation I could do that would do the whole import?\n\nA for loop? I don't think it's possible to treat the modules as just \nsubdirectories, but you can loop over the modules, importing each of them \ninto a separate git repository and then, if you want, merge each of them \ninto a new master repository with the \"subdirectory\" strategy.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"72398","messageId":"20080319204154.GA19556@coredump.intra.peff.net","threadId":"12748","inReplyTo":"1205951736.24610.3.camel@pitcairn.cambridgebroadband.com","subject":"Re: Importing all modules in a CVS repo with git-cvsimport","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-19T20:41:54Z","receivedAt":"2008-03-19T20:41:54Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Mar 19, 2008 at 06:35:36PM +0000, Alex Bennee wrote:\n\n> I'm wanting to import the entirety of a CVS repository into git rather\n> than an individual module. However every approach I've tried to do this\n> fails as the underlying cvsps tool seems to only be able to deal with\n> modules rather than the whole project.\n> \n> Is there any invocation I could do that would do the whole import?\n\nWhat do you want the result to look like? If you have CVS modules 'foo',\n'bar', and 'baz', I assume you want a repository with subdirectories\n'foo', 'bar', and 'baz'?\n\nIn that case, you can create a CVS module that just includes all three:\n\n  cd /path/to/cvsroot\n  mkdir all\n  cd all\n  for i in foo bar baz; do\n    ln -s ../$i\n  done\n\nand then:\n\n  git cvsimport all\n\nYou might be able to do something similar with the CVSROOT/modules file,\nbut I haven't tried.\n\n-Peff\n"},{"id":"72489","messageId":"200803200646.08631.robin.rosenberg.lists@dewire.com","threadId":"12748","inReplyTo":"1205951736.24610.3.camel@pitcairn.cambridgebroadband.com","subject":"Re: Importing all modules in a CVS repo with git-cvsimport","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2008-03-20T05:46:08Z","receivedAt":"2008-03-20T05:46:08Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Den Wednesday 19 March 2008 19.35.36 skrev du:\n> Hi,\n>\n> I'm wanting to import the entirety of a CVS repository into git rather\n> than an individual module. However every approach I've tried to do this\n> fails as the underlying cvsps tool seems to only be able to deal with\n> modules rather than the whole project.\n>\n> Is there any invocation I could do that would do the whole import?\n\nYou didnt' mention anything about you tried, but I recall that using ',' for \nthe module name is possible. Some version of CVS do not like it however\nand will bug out.\n\n-- robin\n"},{"id":"72499","messageId":"b2cdc9f30803200130w11669e51o5b273ee5eba7458@mail.gmail.com","threadId":"12748","inReplyTo":"alpine.LNX.1.00.0803191602110.19665@iabervon.org","subject":"Re: Importing all modules in a CVS repo with git-cvsimport","fromName":"Alex Bennee","fromEmail":"kernel-hacker@bennee.com","sentAt":"2008-03-20T08:30:02Z","receivedAt":"2008-03-20T08:30:02Z","isPatch":false,"sender":{"key":"kernel-hacker@bennee.com","avatar":null},"body":"On 3/19/08, Daniel Barkalow <barkalow@iabervon.org> wrote:\n> On Wed, 19 Mar 2008, Alex Bennee wrote:\n>\n>  > Hi,\n>  >\n>  > I'm wanting to import the entirety of a CVS repository into git rather\n>  > than an individual module. However every approach I've tried to do this\n>  > fails as the underlying cvsps tool seems to only be able to deal with\n>  > modules rather than the whole project.\n>  >\n>  > Is there any invocation I could do that would do the whole import?\n>\n>\n> A for loop? I don't think it's possible to treat the modules as just\n>  subdirectories, but you can loop over the modules, importing each of them\n>  into a separate git repository and then, if you want, merge each of them\n>  into a new master repository with the \"subdirectory\" strategy.\n\nUnfortunately the repository is treated as one big ode dump place so I\ndon't want to loose the information about changes across many\ndirs/modules. I shall try the \"fakeing up\" approach mentioned\nelsewhere and see where that gets me.\n\n\n-- \nAlex, homepage: http://www.bennee.com/~alex/\nHire me? http://www.bennee.com/~alex/cv.php\n"},{"id":"72501","messageId":"1206007130.24610.6.camel@pitcairn.cambridgebroadband.com","threadId":"12748","inReplyTo":"20080319204154.GA19556@coredump.intra.peff.net","subject":"Re: Importing all modules in a CVS repo with git-cvsimport","fromName":"Alex Bennee","fromEmail":"kernel-hacker@bennee.com","sentAt":"2008-03-20T09:58:50Z","receivedAt":"2008-03-20T09:58:50Z","isPatch":false,"sender":{"key":"kernel-hacker@bennee.com","avatar":null},"body":"\nOn Wed, 2008-03-19 at 16:41 -0400, Jeff King wrote:\n> On Wed, Mar 19, 2008 at 06:35:36PM +0000, Alex Bennee wrote:\n> \n> > I'm wanting to import the entirety of a CVS repository into git rather\n> > than an individual module. However every approach I've tried to do this\n> > fails as the underlying cvsps tool seems to only be able to deal with\n> > modules rather than the whole project.\n> > \n> > Is there any invocation I could do that would do the whole import?\n> \n> What do you want the result to look like? If you have CVS modules 'foo',\n> 'bar', and 'baz', I assume you want a repository with subdirectories\n> 'foo', 'bar', and 'baz'?\n> \n> In that case, you can create a CVS module that just includes all three:\n> \n>   cd /path/to/cvsroot\n>   mkdir all\n>   cd all\n>   for i in foo bar baz; do\n>     ln -s ../$i\n>   done\n> \n> and then:\n> \n>   git cvsimport all\n\nHmm that fails:\n\n09:55 ajb@pitcairn/x86_64 [test.cvs] >perl /export/src/git.git/git-cvsimport.perl -v -C /export/csrc/import_test/test.git all\nInitialized empty Git repository in /export/csrc/import_test/test.git/.git/\nRunning cvsps...\ncvs rlog: Logging .\nWARNING: file /newcvs/.cvsignore doesn't match strip_path /newcvs/all/. ignoring\nWARNING: file /newcvs/Attic/Make.rules doesn't match strip_path /newcvs/all/. ignoring\nWARNING: file /newcvs/Makefile doesn't match strip_path /newcvs/all/. ignoring\nWARNING: file /newcvs/Makefile.voip doesn't match strip_path /newcvs/all/. ignoring\nWARNING: file /newcvs/Attic/Vectastar.bom doesn't match strip_path /newcvs/all/. ignoring\nWARNING: file /newcvs/Attic/dMakefile doesn't match strip_path /newcvs/all/. ignoring\ncvs rlog: Logging CVSROOT\nWARNING: file /newcvs/CVSROOT/checkoutlist doesn't match strip_path /newcvs/all/. ignoring\nWARNING: file /newcvs/CVSROOT/commitinfo doesn't match strip_path /newcvs/all/. ignoring\nWARNING: file /newcvs/CVSROOT/config doesn't match strip_path /newcvs/all/. ignoring\nWARNING: file /newcvs/CVSROOT/cvsignore doesn't match strip_path /newcvs/all/. ignoring\n\ntest.cvs is a fresh checkout of the whole tree. \"newcvs\" is the root of\nCVS on the server. The warnings are the same when I try with \".\" as the\nmodule. Or where you saying do this with the actually CVS repo itself?\n\n> You might be able to do something similar with the CVSROOT/modules file,\n> but I haven't tried.\n\n\n\n> \n> -Peff\nAlex, homepage: http://www.bennee.com/~alex/ There is no fool to the old\nfool. -- John Heywood\n"},{"id":"72520","messageId":"1206027215.24610.20.camel@pitcairn.cambridgebroadband.com","threadId":"12748","inReplyTo":"200803200646.08631.robin.rosenberg.lists@dewire.com","subject":"Re: Importing all modules in a CVS repo with git-cvsimport","fromName":"Alex Bennee","fromEmail":"kernel-hacker@bennee.com","sentAt":"2008-03-20T15:33:35Z","receivedAt":"2008-03-20T15:33:35Z","isPatch":false,"sender":{"key":"kernel-hacker@bennee.com","avatar":null},"body":"\nOn Thu, 2008-03-20 at 06:46 +0100, Robin Rosenberg wrote:\n> Den Wednesday 19 March 2008 19.35.36 skrev du:\n> > Hi,\n> >\n> > I'm wanting to import the entirety of a CVS repository into git rather\n> > than an individual module. However every approach I've tried to do this\n> > fails as the underlying cvsps tool seems to only be able to deal with\n> > modules rather than the whole project.\n> >\n> > Is there any invocation I could do that would do the whole import?\n> \n> You didnt' mention anything about you tried, but I recall that using ',' for \n> the module name is possible. Some version of CVS do not like it however\n> and will bug out.\n> \n\nI tried:\n\ngit-cvsimport -v  -C /export/csrc/import_test/test.git -d $CVSROOT .\ngit-cvsimport -v  -C /export/csrc/import_test/test.git -d $CVSROOT ,\n\nas well as the suggested ln -s tricks and none worked. I've now got a\ncopy of the actual repo from the cvs server so I'll try and fake up a\n\"supermodule\" to contain the tree.\n\nAny pointers always appreciated :-)\n\n\n> -- robin\nAlex, homepage: http://www.bennee.com/~alex/ Art is anything you can get\naway with. -- Marshall McLuhan.\n"},{"id":"72521","messageId":"20080320153728.GA7798@sigill.intra.peff.net","threadId":"12748","inReplyTo":"1206007130.24610.6.camel@pitcairn.cambridgebroadband.com","subject":"Re: Importing all modules in a CVS repo with git-cvsimport","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-03-20T15:37:28Z","receivedAt":"2008-03-20T15:37:28Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Mar 20, 2008 at 09:58:50AM +0000, Alex Bennee wrote:\n\n> WARNING: file /newcvs/CVSROOT/cvsignore doesn't match strip_path /newcvs/all/. ignoring\n> \n> test.cvs is a fresh checkout of the whole tree. \"newcvs\" is the root of\n> CVS on the server. The warnings are the same when I try with \".\" as the\n> module. Or where you saying do this with the actually CVS repo itself?\n\nHmm. I tested and it worked fine on my system. I'm not sure what you\nmean by \"the CVS repo itself.\" I actually linked within the $CVSROOT\nhierarchy. If your version of CVS isn't happy with the symlinks for some\nreason, you could just munge your cvs hierarchy (assuming you are just\ndoing a one-shot import):\n\n  cd /newcvs\n  mkdir all\n  for i in `ls | grep -v all | grep -v CVSROOT`; do\n      mv $i all\n  done\n\n-Peff\n"}]}