One of the more annoying things about svn is that (to my knowledge), there exists no single simple command to retrieve the revision number from a shell.
What I want:
1234
But of course, nothing like this exists.
Thankfully, svn info's output IS easy enough to parse. You just have to do it your self.
1234
Will give you the revision of your current checkout without the network hit of a call to svn log.
To get the current version of the repo itself (hits the network), add "-r HEAD" to the svn info call:
1280
Of course, svn info also supports outputting info as xml, so you could use that to parse things in a more advanced environment but one where you're still not using the svn api bindings.
Posted by Ammon in play














