If .svn/format exists, then read the number in it:
- Version 7 is SVN 1.3
- Version 8 is SVN 1.4
- Version 9 is SVN 1.5
If .svn/format doesn’t exist then the version number is on the first line in .svn/entries:
- Version 10 is SVN 1.6
- Version 12 is SVN 1.7
Subversion 1.6 was the first one not to use .svn/format. Version 7 and older used XML-based .svn/entries file, newer versions use less verbose line-based file format.
Since Subversion 1.7 the version number is stored in the .svn/wc.db SQLite database in the “user_version” field. So even though .svn/format is bumped to version 12 the actual format version is 29 and future versions may not update .svn/format anymore. To obtain the version number from .svn/wc.db there are two methods:
- if you have
sqlite3in your path,sqlite3 .svn/wc.db "PRAGMA user_version" - if you DO NOT have
sqlite3in your path, open.svn/wc.dbin a hex editor and read the DWORD at offset 0x3c
All the format version numbers are described in wc.h along with the version numbers of respective Subversion releases.