SVN command to read revision of a root

Posted on

Problem :

I want to use the SVN command line to read the latest revision of a root folder, store it into a variable inside a bat file and echo it out.

I just need to find out that revision and store into a variable for later use. Any ideas?

Solution :

svn info shows information. Try:

svn info c:PathToFolder 

If you have unix-like tools available, you can pipe to grep

svn info c:PathToFolder | grep "Revision:"

This might work in windows:

svn info c:PathToFolder | find "Revision:"

Leave a Reply

Your email address will not be published. Required fields are marked *