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

Re: How to determine subversion repository format

From: Branko Čibej <brane_at_wandisco.com>
Date: Sat, 02 Nov 2013 21:02:52 +0100

On 02.11.2013 18:11, Bradley Giesbrecht wrote:
> On Nov 1, 2013, at 10:46 AM, Bob Archer wrote:
>
>>> I am getting this svn client message:
>>> The working copy at <repository>
>>> is too old (format 29) to work with client version '1.8.4 (r1534716)' (expects
>>> format 31). You need to upgrade the working copy first.
>>>
>>> I am interested in knowing where "format 29" is stored. My searches have
>>> lead me to <repository>/.svn/{entries,format} which both contain a single
>>> line with the value of "14" and .svn/wc.db which when dumped with sqlite3
>>> "format 29" does not stand out to me.
>>>
>>> Can someone point me to some documentation which explains where the
>>> repository format information is stored for various version of subversion.
>>>
>>> I know in this case that I my repository was last updated by subversion 1.7.x
>>> but nonetheless I would like to know how to get the existing repository
>>> format info without upgrading or installing older versions of subversion until
>>> one works with an unknown repository format.
>>>
>>>
>>> Regards,
>>> Bradley Giesbrecht (pixilla)
>>
>> I'm pretty sure this message is talking about the WORKING COPY version, not the repository version. Format 29 is probably the working copy format for 1.7.x.
>
> Oh, yes, sorry for leaving out that detail. I have working copies of various repositories, some untouched in for a while. I would like to be able to discern the format of a working copy without relying on the svn command. Is there a way to easily find the format version somewhere in <root>/.svn?

Well ... you're not supposed to do that. :)

In working copies created by Subversion up to 1.7, there may be a file
called .svn/format, which tells you the format number *if* it was
created with Subversion up to 1.6; otherwise, it's just a placeholder
and you'll have to open .svn/wc.db with the sqlite3 client to determine
the WC format:

$ sqlite3 .svn/wc.db
sqlite> pragma user_version;
31

Subversion 1.8 no longer creates a .svn/format file, because 1.6 and
older versions are no longer supported and we therefore don't need that
placeholder. The format numbers are described in the comment near the
top of this file:

http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?view=markup

But be aware that where and how exactly we store the WC format number is
an implementation detail; it's not guaranteed to stay the way I just
described. If you decide to rely on implementation details, you're on
your own; if something breaks, we don't want to hear about it. :)

-- Brane

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2013-11-02 21:03:29 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.