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

Re: Problem with an archive

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Wed, 14 Nov 2012 09:28:16 +0200

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/).
Received on 2012-11-14 08:28:56 CET

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

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