Is there a Subversion command to show the current revision number?
After svn checkout I want to start a script and need the revision number in a variable. It would be great if there is a command like svn info get_revision_number.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Newer versions of svn support the
--show-itemargument:For the revision number of your local working copy, use:
You can use
os.system()to execute a command line like this:I do that in my nightly build scripts.
Also on some platforms there is a
svnversioncommand, but I think I had a reason not to use it. Ahh, right. You can’t get the revision number from a remote repository to compare it to the local one using svnversion.