5

Is there a way to tell the format of an svn repo on disk, without knowing how it was created? Possibly from the format or db/format files?

This question has lots of useful info about the different contents of those files, but there's no answer to what backend format the repo is using.

The (gentoo) machine I'm on is running subversion 1.5.6:

me@foo ~ $ svn --version
svn, version 1.5.6 (r36142)
   compiled Jan 13 2010, 15:02:26

I created a couple of test repos to play with:

me@foo ~ $ svnadmin create --fs-type bdb bdb-repo
me@foo ~ $ svnadmin create --fs-type fsfs fsfs-repo

The format and db/format files look almost identical:

me@foo ~ $ more bdb-repo/format bdb-repo/db/format
::::::::::::::
bdb-repo/format
::::::::::::::
5
::::::::::::::
bdb-repo/db/format
::::::::::::::
3
me@foo ~ $ more fsfs-repo/format fsfs-repo/db/format
::::::::::::::
fsfs-repo/format
::::::::::::::
5
::::::::::::::
fsfs-repo/db/format
::::::::::::::
3
layout sharded 1000

The only difference being the layout sharded 1000 line in the fsfs repo's db/format file. Is that the definitive indicator that it's using fsfs format? If not, is there some other way to tell?

Ben Williams
  • 739
  • 1
  • 7
  • 17

1 Answers1

6

Discovered the answer. It's in the db/fs-type file.

me@foo ~ $ cat bdb-repo/db/fs-type 
bdb
me@foo ~ $ cat fsfs-repo/db/fs-type 
fsfs

Reference here.

I googled before I asked, I promise :)

Ben Williams
  • 739
  • 1
  • 7
  • 17