There is a lot of effort and hacks on determining what SVN database
version is being used on the working copy.  Usually resorting to
examining the internal contents of a .svn/* file.

For future releases it would be nice if there was a command to display
if the current working copy is at the same level as the svn version
being used, and if not if it is upgradable.

The use case is to be able to detect early on in a build process if
the wrong version of SVN was used.

Examples:
svn upgrade --check .
CURRENT: yes
UPGRADABLE: yes
VERSION: 20
exit code 0 to indicate upgradable, which should be a no-op

svn upgrade --check .
CURRENT: no
UPGRADABLE: yes
VERSION: 19
exit code 0 to indicate upgradable

svn upgrade --check .
CURRENT: no
UPGRADABLE: no
VERSION: unknown
exit code non-zero to indicate not upgradable

svn upgrade --check-current .
CURRENT: yes
UPGRADABLE: yes
VERSION: 20
exit code 0 to indicate no upgrade is needed

svn upgrade --check-current .
CURRENT: NO
UPGRADABLE: yes
VERSION: 19
exit code 1 to indicate  upgrade is needed

svn upgrade --check-current .
CURRENT: NO
UPGRADABLE: no
VERSION: unknown
exit code 2 to indicate  upgrade cannot be performed

Reply via email to