Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

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 :)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.