svn: Get highest revision number of directory tree
Posted: Tue Jun 07, 2011 12:14 pm
[PROBLEM]
I wanted to update my production version to a certain revision, which has been used as internal release-candidate version within the development team.
Since it was only internally used, it hasn't been svn-tagged, so I wanted to find out which revision number that release-candidate had.
Using "svn info" only works for individual files - and they came from mixed revisions, so it wasn't guaranteed to be the most recent revision used.
[SOLUTION]
Calling "svnversion" (comes with SVN by default) in the affected directory, returned exactly the result I was looking for, and shows which revision range exists in the folder.
An example result is as follows:
This means, that in my release-candidate folder, I had files from revision 195 up to 202.
I wanted to update my production version to a certain revision, which has been used as internal release-candidate version within the development team.
Since it was only internally used, it hasn't been svn-tagged, so I wanted to find out which revision number that release-candidate had.
Using "svn info" only works for individual files - and they came from mixed revisions, so it wasn't guaranteed to be the most recent revision used.
[SOLUTION]
Calling "svnversion" (comes with SVN by default) in the affected directory, returned exactly the result I was looking for, and shows which revision range exists in the folder.
An example result is as follows:
Code: Select all
195:202M