git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo
@ 2011-06-22  9:06 sandy2010
  2011-06-22  9:22 ` Andreas Ericsson
  2011-06-22 10:58 ` Michael Haggerty
  0 siblings, 2 replies; 7+ messages in thread
From: sandy2010 @ 2011-06-22  9:06 UTC (permalink / raw)
  To: git

Hello,

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.

Thanks.

--
View 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
Sent from the git mailing list archive at Nabble.com.

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

* Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo
  2011-06-22  9:06 Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo sandy2010
@ 2011-06-22  9:22 ` Andreas Ericsson
  2011-06-22 10:21   ` sandy2010
  2011-06-22 10:58 ` Michael Haggerty
  1 sibling, 1 reply; 7+ messages in thread
From: Andreas Ericsson @ 2011-06-22  9:22 UTC (permalink / raw)
  To: sandy2010; +Cc: git

On 06/22/2011 11:06 AM, sandy2010 wrote:
> Hello,
> 
> 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.
> 

Make a single repository out of them first, and then look at
git-filter-branch to create separate repositories for them.
You'll want to use the tree-filter option.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

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

* Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo
  2011-06-22  9:22 ` Andreas Ericsson
@ 2011-06-22 10:21   ` sandy2010
  2011-06-22 11:55     ` Andreas Ericsson
  0 siblings, 1 reply; 7+ messages in thread
From: sandy2010 @ 2011-06-22 10:21 UTC (permalink / raw)
  To: git

I did not understand when you say "Make a single repository out of them
first". You mean single Git repository? Infact, my requirement is same. Can
I have a single git repository "/git/Testsuites" which will contain suite1
and suite2 directories? Provided suite1 and suite2 are no git repositories.

--
View 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
Sent from the git mailing list archive at Nabble.com.

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

* Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo
  2011-06-22  9:06 Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo sandy2010
  2011-06-22  9:22 ` Andreas Ericsson
@ 2011-06-22 10:58 ` Michael Haggerty
  2011-06-23  5:58   ` sandy2010
  1 sibling, 1 reply; 7+ messages in thread
From: Michael Haggerty @ 2011-06-22 10:58 UTC (permalink / raw)
  To: sandy2010; +Cc: git

On 06/22/2011 11:06 AM, sandy2010 wrote:
> 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/

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

* Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo
  2011-06-22 10:21   ` sandy2010
@ 2011-06-22 11:55     ` Andreas Ericsson
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Ericsson @ 2011-06-22 11:55 UTC (permalink / raw)
  To: sandy2010; +Cc: git

On 06/22/2011 12:21 PM, sandy2010 wrote:
> I did not understand when you say "Make a single repository out of them
> first". You mean single Git repository?

Yes.

> Infact, my requirement is same. Can
> I have a single git repository "/git/Testsuites" which will contain suite1
> and suite2 directories? Provided suite1 and suite2 are no git repositories.
> 

Yes.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

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

* Re: Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo
  2011-06-22 10:58 ` Michael Haggerty
@ 2011-06-23  5:58   ` sandy2010
  2011-06-23  8:11     ` Comparison of CVS and Git (was: Re: Migration from CVS to GIT) Jakub Narebski
  0 siblings, 1 reply; 7+ messages in thread
From: sandy2010 @ 2011-06-23  5:58 UTC (permalink / raw)
  To: git

Thanks Michael! This worked like a charm! I was not aware that we can do such
things in CVS. Can you point me to some good docs/articles on such
comparison of CVS and Git?

Thanks again!

--
View 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
Sent from the git mailing list archive at Nabble.com.

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

* Comparison of CVS and Git (was: Re: Migration from CVS to GIT)
  2011-06-23  5:58   ` sandy2010
@ 2011-06-23  8:11     ` Jakub Narebski
  0 siblings, 0 replies; 7+ messages in thread
From: Jakub Narebski @ 2011-06-23  8:11 UTC (permalink / raw)
  To: sandy2010; +Cc: git, Jakub Narebski

sandy2010 <sandeeptt@yahoo.com> writes:

> Thanks Michael! This worked like a charm! I was not aware that we can do such
> things in CVS. Can you point me to some good docs/articles on such
> comparison of CVS and Git?

A bit of self-promotion:

  "Difference between GIT and CVS" on StackOverflow (my answer)
  http://stackoverflow.com/questions/802573/difference-between-git-and-cvs/824241#824241

A blog post I recently found, describing how the workflow changed
rather that the differences between Git and CVS:

  "From CVS to Git, 9 Things I\u2019ve Learned" on EclipseSource blog
  http://eclipsesource.com/blogs/2011/06/09/git-lessons-learned/

This article describes how Git could came into being, IMHO quite well
presenting Git philosophy as well:

  "The Git Parable" by Tom Preston-Werner (of GitHub)
  http://tom.preston-werner.com/2009/05/19/the-git-parable.html


And just FYI, another tool to convert CVS to Git (non-incremental):

  http://cvs2svn.tigris.org/cvs2git.html

-- 
Jakub Narebski
Poland
ShadeHawk on #git

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

end of thread, other threads:[~2011-06-23  8:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-22  9:06 Migration from CVS to GIT - Multiple directories in CVS repo to a single Git repo sandy2010
2011-06-22  9:22 ` Andreas Ericsson
2011-06-22 10:21   ` sandy2010
2011-06-22 11:55     ` Andreas Ericsson
2011-06-22 10:58 ` Michael Haggerty
2011-06-23  5:58   ` sandy2010
2011-06-23  8:11     ` Comparison of CVS and Git (was: Re: Migration from CVS to GIT) Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).