2

We have a web application deployed to a server, which was done via an svn update. Now, I want to know what revision number was deployed to that server. What command do I use to get this information?

Also, once I get this revision number, I want to deploy that revision to another server. How do I do an svn update and specify a revision number?

1

2 Answers 2

3

Try to launch svn info on the source directory:

svn info path/to/source | grep revision

And:

svn update -r revision
Sign up to request clarification or add additional context in comments.

3 Comments

what is the source directory supposed to be? I am at the web root of the application. When I do a pwd, I get /var/www/. So, I tried this command: svn info /var/www/ | grep revision; I got nothing.
If the directory you're in is the directory which you want to get the version number for, a simple svn info should work. If grep is failing for whatever reason, just look at it manually, it shouldn't be too hard to locate.
wouldn't that be grep "^Revision" ? or could it be svn-version-dependent ?
2

svnversion is another option. In addition to showing you the current version of the checkout, it will also tell you whether any files are modified or if you have a mixed revision working copy (ie not all files are at the same revision).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.