On Wed, Feb 16, 2011 at 4:34 PM, Pedro Kiefer <pkie...@gmail.com> wrote: > Hi, > I'm migrating some 300 cvs repositories to git, and I want to managed them > on my local gitorious install. Migrating the cvs repos to git is really > easy, but tracking them on gitorious takes a lot of my time. So, is there a > way for creating all those repositories from the command line, through > scripts/console maybe?
You can simply create a .rb file and start it by requiring config/environment: require "/path/to/gitorious/config/environment # Do your stuff here... You'll need a project, of course, and a user to own the repositories. For each repository you'll need a name and a user. The test cases (in test/unit/) demonstrate how to add these things, what's required and so on. You should probably set up a database for your development environment, and use this environment until you know things are working - so you don't pollute your production database with stuff until you're ready. The development environment is the default one, so omitting "RAILS_ENV=production" when running your script will make it use that one. > Moving the converted repos to the hashed path directory is easy to automate, > i just need a way to create all those repositories. You should also be able to bypass the hashed_path stuff altogether and explicitly set the attribute based on the location in the file system. Cheers, - Marius -- To post to this group, send email to gitorious@googlegroups.com To unsubscribe from this group, send email to gitorious+unsubscr...@googlegroups.com