git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Jun 22, 2011, 10:58 UTC
Message-ID
<4E01CAD5.8080808@alum.mit.edu>
In-Reply-To
<1308733591425-6503493.post@n2.nabble.com>
On 06/22/2011 11:06 AM, sandy2010 wrote:
Show 17 quoted lines
> I'm aware of cvs2git and git fast-import utilities to do this. My
> requirement is little different.
> My CVS Repo is:
> /cvs/BFARM
> 
> This consists of following directories:
> Misc/suite1
> Misc/suite2
> Misc/suite3
> 
> Now, I want to Migrate the suite1 and suite2 into a single Git repo
> "/git/Testsuites" and it should look like this:
> /git/Testsuites/suite1
> /git/Testsuites/suite2
> 
> How can I do this? I do not want to make suite1 and suite2 as separate git
> repos.

Since CVS works filewise, you can simply move the suite1 and suite2 directories from within the CVS repository into a pseudo CVS repository, then convert that:

$ mkdir /tmp/fake-cvs-repo /tmp/fake-cvs-repo/Misc $ cp -pr /cvs/BFARM/CVSROOT /tmp/fake-cvs-repo $ cp -pr /cvs/BFARM/Misc/suite1 /tmp/fake-cvs-repo/Misc $ cp -pr /cvs/BFARM/Misc/suite2 /tmp/fake-cvs-repo/Misc

and then convert the pseudo-repository "/tmp/fake-cvs-repo/Misc". Depending on the tools and filesystems involved, you might be able to use hardlinks or symlinks instead of full copies when building up the pseudorepo.

Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Previous: Andreas EricssonNext: sandy2010
Message 5 of 7 in “Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo”
  1. sandy2010Jun 22, 2011
  2. Andreas EricssonJun 22, 2011
  3. sandy2010Jun 22, 2011
  4. Andreas EricssonJun 22, 2011
  5. Michael HaggertyJun 22, 2011
  6. sandy2010Jun 23, 2011
  7. Comparison of CVS and Git (was: Re: Migration from CVS to GIT)Jakub Narebski, Jun 23, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.