[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: 0.28 and schema change

From: <cmpilato_at_collab.net>
Date: 2003-08-25 00:11:23 CEST

"Han The Man" <hantheman12@hotmail.com> writes:

> I noticed somewhere that 0.28 will have schema changes.
>
> We are currently running 0.27 and at this point, we've migrated about
> 25 projects into 20 repositories. Do we need to dump/load each
> repository? What is the easiest way to upgrade to 0.28 when it's out?
>
> Is there a tool that will upgrade all repositories? I hope so - by
> next week, we're probably done migrating, having about 30
> repositories...

I know of no such tool. But if the repositories are all in a single
directory, it should be fairly simple to script the process.

I probably shouldn't advocate doing things this way, but what the
heck. This is how I do it, since I know how the filesystem works.
And since I keep extra junk in my repos directories sometimes (besides
hooks and such), I don't want to lose that in a conversion.

Follow my pseudocode, if you will:

   # Make a backup directory for unconverted repositories
   mkdir BACKUP

   # Now, loop over the list of repositories
   for repos in repos-list; do

     # Backup the old repos
     cp -R ${repos} BACKUP
   
     # Make a new, temporary repos
     rm -rf tmp-repos
     svnadmin create tmp-repos
   
     # Dump the old repos into the temporary repos
     old-svnadmin dump ${repos} | svnadmin load tmp-repos
   
     # Replace the db/ directory from the old repos with the db/
     # directory from the new, temporary repos
     rm -rf ${repos}/db; mv tmp-repos/db ${repos/db}
   
     # Finally, bump the repository format number
     echo "2" > ${repos}/format

[insert any disclaimers you can think of here]
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 25 00:15:08 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.