[Nagiosplug-devel] Switching to svn

Andreas Ericsson ae at op5.se
Fri Jun 15 10:29:07 CEST 2007


Ton Voon wrote:
> Hi!
> 
> The plugins team have expressed a desire to switch to using  
> subversion instead of CVS for our source code management from  
> Sourceforge. I'll be handling this work over the next few weeks as we  
> create some SVN test repositories to make sure things work before  
> switching over permanently.
> 
> We want to retain the current release tags in CVS, but not  
> necessarily the individual commits. I'd be interested to know if  
> there are any tools that can do this, otherwise I'll use cvs2svn  
> which will import everything.
> 

git-cvsimport will handle it, and it can later be committed to an svn repo
of your choice with git-svn.

Some scripting might be needed, or some minor hacking on git-svn to let it
accept ranges of commits.

The easiest way is most likely to use a loop such as this:

git rev-list HEAD | sed '1!G;h;$!d' | while read commit; do
	git svn dcommit --no-rebase $commit
done

If you want all release-tags in CVS to be committed to SVN as one commit each,
that's doable too, but you'd need a bit of manual labour to make it fly.

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




More information about the Devel mailing list