Question

I have a large Java app that is split up into multiple projects. Each project has its own folder in a Subversion repository like so:

AccountingCore

  • trunk
  • branches
  • tags

Common

  • trunk
  • branches
  • tags

WebCommon

  • trunk
  • branches
  • tags

etc...

I want to start using git-svn locally instead of subversion.

This may be a stupid question, but is there a way to checkout all the projects in the repository at once (including branches and all) instead checking out each project individually?

Thanks, Tony

Was it helpful?

Solution

If you have a shell, you could enter

for DIR in AccountingCore Common WebCommon; do mkdir $DIR; cd $DIR; git init; git svn init -s svn://host/path/$DIR; git svn fetch; cd ..; done

That is, if I made no mistakes.

OTHER TIPS

Just to improve on earlier answer, instead of

for DIR in AccountingCore Common WebCommon; do ...

do

DIRS=`svn ls svn://host/path`; for DIR in $DIRS; do ...

Yes. just checkout at the root path. If your repo is hosted here:

svn://host/path/AccountingCore svn://host/path/Common svn://host/path/WebCommon

Then do your git svn command on svn://host/path.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top