subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Shahaf <...@daniel.shahaf.name>
Subject Re: Problem with an archive
Date Wed, 14 Nov 2012 07:28:16 GMT
Daniel Shahaf wrote on Wed, Nov 14, 2012 at 09:14:13 +0200:
> IIRC format 5 is identical to 4 except for storage of revprops.  It
> would be straightforward to export it without the revprops, and should
> be straightforward to write a script to convert the revprops storage to
> format 4 (supported by 1.6+); but I don't know that anyone ever wrote
> that script.

I figure somebody's going to need this eventually, so here is how to
write that script:

0. This procedure assumes nothing writes to the repository.

1. Check the format numbers: the first line of $REPOSDIR/db/format
should read "5".

2. For each revision between 0 and $(cat current):

2.1. Read the list of revision properties from revprops.db; the schema
is in revprops-db.sql.  You can decode the skel with the svn_skel.h API,
or roll-your-own in $LANGUAGE_OF_CHOICE.

2.2 Create the appropriate file in the revprops/ directory (depending on
the 'layout' setting in the format file).  Fill it with the properties
hash --- as created by svn_hash_write2() ---

   for k,v in propslist:
      print "K %d\n%s\nV %d\n%s\n" % (len(k), k, len(v), v)
   print "END\n"

3. Change the first line of the format file from step1 to "4".

4. Once you have that script, send it to dev@ as a patch (for inclusion
in tools/server-side/).

Mime
View raw message