Git development
 help / color / mirror / Atom feed
* Importing all modules in a CVS repo with git-cvsimport
@ 2008-03-19 18:35 Alex Bennee
  2008-03-19 20:10 ` Daniel Barkalow
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Alex Bennee @ 2008-03-19 18:35 UTC (permalink / raw)
  To: git

Hi,

I'm wanting to import the entirety of a CVS repository into git rather
than an individual module. However every approach I've tried to do this
fails as the underlying cvsps tool seems to only be able to deal with
modules rather than the whole project.

Is there any invocation I could do that would do the whole import?

--
Alex, homepage: http://www.bennee.com/~alex/ When angry, count four;
when very angry, swear. -- Mark Twain, "Pudd'nhead Wilson's Calendar"

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Importing all modules in a CVS repo with git-cvsimport
  2008-03-19 18:35 Importing all modules in a CVS repo with git-cvsimport Alex Bennee
@ 2008-03-19 20:10 ` Daniel Barkalow
  2008-03-20  8:30   ` Alex Bennee
  2008-03-19 20:41 ` Jeff King
  2008-03-20  5:46 ` Robin Rosenberg
  2 siblings, 1 reply; 8+ messages in thread
From: Daniel Barkalow @ 2008-03-19 20:10 UTC (permalink / raw)
  To: Alex Bennee; +Cc: git

On Wed, 19 Mar 2008, Alex Bennee wrote:

> Hi,
> 
> I'm wanting to import the entirety of a CVS repository into git rather
> than an individual module. However every approach I've tried to do this
> fails as the underlying cvsps tool seems to only be able to deal with
> modules rather than the whole project.
> 
> Is there any invocation I could do that would do the whole import?

A for loop? I don't think it's possible to treat the modules as just 
subdirectories, but you can loop over the modules, importing each of them 
into a separate git repository and then, if you want, merge each of them 
into a new master repository with the "subdirectory" strategy.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Importing all modules in a CVS repo with git-cvsimport
  2008-03-19 18:35 Importing all modules in a CVS repo with git-cvsimport Alex Bennee
  2008-03-19 20:10 ` Daniel Barkalow
@ 2008-03-19 20:41 ` Jeff King
  2008-03-20  9:58   ` Alex Bennee
  2008-03-20  5:46 ` Robin Rosenberg
  2 siblings, 1 reply; 8+ messages in thread
From: Jeff King @ 2008-03-19 20:41 UTC (permalink / raw)
  To: Alex Bennee; +Cc: git

On Wed, Mar 19, 2008 at 06:35:36PM +0000, Alex Bennee wrote:

> I'm wanting to import the entirety of a CVS repository into git rather
> than an individual module. However every approach I've tried to do this
> fails as the underlying cvsps tool seems to only be able to deal with
> modules rather than the whole project.
> 
> Is there any invocation I could do that would do the whole import?

What do you want the result to look like? If you have CVS modules 'foo',
'bar', and 'baz', I assume you want a repository with subdirectories
'foo', 'bar', and 'baz'?

In that case, you can create a CVS module that just includes all three:

  cd /path/to/cvsroot
  mkdir all
  cd all
  for i in foo bar baz; do
    ln -s ../$i
  done

and then:

  git cvsimport all

You might be able to do something similar with the CVSROOT/modules file,
but I haven't tried.

-Peff

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Importing all modules in a CVS repo with git-cvsimport
  2008-03-19 18:35 Importing all modules in a CVS repo with git-cvsimport Alex Bennee
  2008-03-19 20:10 ` Daniel Barkalow
  2008-03-19 20:41 ` Jeff King
@ 2008-03-20  5:46 ` Robin Rosenberg
  2008-03-20 15:33   ` Alex Bennee
  2 siblings, 1 reply; 8+ messages in thread
From: Robin Rosenberg @ 2008-03-20  5:46 UTC (permalink / raw)
  To: Alex Bennee; +Cc: git

Den Wednesday 19 March 2008 19.35.36 skrev du:
> Hi,
>
> I'm wanting to import the entirety of a CVS repository into git rather
> than an individual module. However every approach I've tried to do this
> fails as the underlying cvsps tool seems to only be able to deal with
> modules rather than the whole project.
>
> Is there any invocation I could do that would do the whole import?

You didnt' mention anything about you tried, but I recall that using ',' for 
the module name is possible. Some version of CVS do not like it however
and will bug out.

-- robin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Importing all modules in a CVS repo with git-cvsimport
  2008-03-19 20:10 ` Daniel Barkalow
@ 2008-03-20  8:30   ` Alex Bennee
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Bennee @ 2008-03-20  8:30 UTC (permalink / raw)
  To: Daniel Barkalow; +Cc: git

On 3/19/08, Daniel Barkalow <barkalow@iabervon.org> wrote:
> On Wed, 19 Mar 2008, Alex Bennee wrote:
>
>  > Hi,
>  >
>  > I'm wanting to import the entirety of a CVS repository into git rather
>  > than an individual module. However every approach I've tried to do this
>  > fails as the underlying cvsps tool seems to only be able to deal with
>  > modules rather than the whole project.
>  >
>  > Is there any invocation I could do that would do the whole import?
>
>
> A for loop? I don't think it's possible to treat the modules as just
>  subdirectories, but you can loop over the modules, importing each of them
>  into a separate git repository and then, if you want, merge each of them
>  into a new master repository with the "subdirectory" strategy.

Unfortunately the repository is treated as one big ode dump place so I
don't want to loose the information about changes across many
dirs/modules. I shall try the "fakeing up" approach mentioned
elsewhere and see where that gets me.


-- 
Alex, homepage: http://www.bennee.com/~alex/
Hire me? http://www.bennee.com/~alex/cv.php

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Importing all modules in a CVS repo with git-cvsimport
  2008-03-19 20:41 ` Jeff King
@ 2008-03-20  9:58   ` Alex Bennee
  2008-03-20 15:37     ` Jeff King
  0 siblings, 1 reply; 8+ messages in thread
From: Alex Bennee @ 2008-03-20  9:58 UTC (permalink / raw)
  To: Jeff King; +Cc: git


On Wed, 2008-03-19 at 16:41 -0400, Jeff King wrote:
> On Wed, Mar 19, 2008 at 06:35:36PM +0000, Alex Bennee wrote:
> 
> > I'm wanting to import the entirety of a CVS repository into git rather
> > than an individual module. However every approach I've tried to do this
> > fails as the underlying cvsps tool seems to only be able to deal with
> > modules rather than the whole project.
> > 
> > Is there any invocation I could do that would do the whole import?
> 
> What do you want the result to look like? If you have CVS modules 'foo',
> 'bar', and 'baz', I assume you want a repository with subdirectories
> 'foo', 'bar', and 'baz'?
> 
> In that case, you can create a CVS module that just includes all three:
> 
>   cd /path/to/cvsroot
>   mkdir all
>   cd all
>   for i in foo bar baz; do
>     ln -s ../$i
>   done
> 
> and then:
> 
>   git cvsimport all

Hmm that fails:

09:55 ajb@pitcairn/x86_64 [test.cvs] >perl /export/src/git.git/git-cvsimport.perl -v -C /export/csrc/import_test/test.git all
Initialized empty Git repository in /export/csrc/import_test/test.git/.git/
Running cvsps...
cvs rlog: Logging .
WARNING: file /newcvs/.cvsignore doesn't match strip_path /newcvs/all/. ignoring
WARNING: file /newcvs/Attic/Make.rules doesn't match strip_path /newcvs/all/. ignoring
WARNING: file /newcvs/Makefile doesn't match strip_path /newcvs/all/. ignoring
WARNING: file /newcvs/Makefile.voip doesn't match strip_path /newcvs/all/. ignoring
WARNING: file /newcvs/Attic/Vectastar.bom doesn't match strip_path /newcvs/all/. ignoring
WARNING: file /newcvs/Attic/dMakefile doesn't match strip_path /newcvs/all/. ignoring
cvs rlog: Logging CVSROOT
WARNING: file /newcvs/CVSROOT/checkoutlist doesn't match strip_path /newcvs/all/. ignoring
WARNING: file /newcvs/CVSROOT/commitinfo doesn't match strip_path /newcvs/all/. ignoring
WARNING: file /newcvs/CVSROOT/config doesn't match strip_path /newcvs/all/. ignoring
WARNING: file /newcvs/CVSROOT/cvsignore doesn't match strip_path /newcvs/all/. ignoring

test.cvs is a fresh checkout of the whole tree. "newcvs" is the root of
CVS on the server. The warnings are the same when I try with "." as the
module. Or where you saying do this with the actually CVS repo itself?

> You might be able to do something similar with the CVSROOT/modules file,
> but I haven't tried.



> 
> -Peff
Alex, homepage: http://www.bennee.com/~alex/ There is no fool to the old
fool. -- John Heywood

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Importing all modules in a CVS repo with git-cvsimport
  2008-03-20  5:46 ` Robin Rosenberg
@ 2008-03-20 15:33   ` Alex Bennee
  0 siblings, 0 replies; 8+ messages in thread
From: Alex Bennee @ 2008-03-20 15:33 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git


On Thu, 2008-03-20 at 06:46 +0100, Robin Rosenberg wrote:
> Den Wednesday 19 March 2008 19.35.36 skrev du:
> > Hi,
> >
> > I'm wanting to import the entirety of a CVS repository into git rather
> > than an individual module. However every approach I've tried to do this
> > fails as the underlying cvsps tool seems to only be able to deal with
> > modules rather than the whole project.
> >
> > Is there any invocation I could do that would do the whole import?
> 
> You didnt' mention anything about you tried, but I recall that using ',' for 
> the module name is possible. Some version of CVS do not like it however
> and will bug out.
> 

I tried:

git-cvsimport -v  -C /export/csrc/import_test/test.git -d $CVSROOT .
git-cvsimport -v  -C /export/csrc/import_test/test.git -d $CVSROOT ,

as well as the suggested ln -s tricks and none worked. I've now got a
copy of the actual repo from the cvs server so I'll try and fake up a
"supermodule" to contain the tree.

Any pointers always appreciated :-)


> -- robin
Alex, homepage: http://www.bennee.com/~alex/ Art is anything you can get
away with. -- Marshall McLuhan.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Importing all modules in a CVS repo with git-cvsimport
  2008-03-20  9:58   ` Alex Bennee
@ 2008-03-20 15:37     ` Jeff King
  0 siblings, 0 replies; 8+ messages in thread
From: Jeff King @ 2008-03-20 15:37 UTC (permalink / raw)
  To: Alex Bennee; +Cc: git

On Thu, Mar 20, 2008 at 09:58:50AM +0000, Alex Bennee wrote:

> WARNING: file /newcvs/CVSROOT/cvsignore doesn't match strip_path /newcvs/all/. ignoring
> 
> test.cvs is a fresh checkout of the whole tree. "newcvs" is the root of
> CVS on the server. The warnings are the same when I try with "." as the
> module. Or where you saying do this with the actually CVS repo itself?

Hmm. I tested and it worked fine on my system. I'm not sure what you
mean by "the CVS repo itself." I actually linked within the $CVSROOT
hierarchy. If your version of CVS isn't happy with the symlinks for some
reason, you could just munge your cvs hierarchy (assuming you are just
doing a one-shot import):

  cd /newcvs
  mkdir all
  for i in `ls | grep -v all | grep -v CVSROOT`; do
      mv $i all
  done

-Peff

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-03-20 15:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 18:35 Importing all modules in a CVS repo with git-cvsimport Alex Bennee
2008-03-19 20:10 ` Daniel Barkalow
2008-03-20  8:30   ` Alex Bennee
2008-03-19 20:41 ` Jeff King
2008-03-20  9:58   ` Alex Bennee
2008-03-20 15:37     ` Jeff King
2008-03-20  5:46 ` Robin Rosenberg
2008-03-20 15:33   ` Alex Bennee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox