How can I get the revision number of a branch on certain date.
I have tried :
svn checkout -r {2006-02-17}
but can't get any output.
"svn info --show-item revision" will give the current revision to which the current directory is updated.
To find information about the history of a file or directory, use the svn log command. svn log will provide you with a record of who made changes to a file or directory, at what revision it changed, the time and date of that revision, and, if it was provided, the log message that accompanied the commit.
As we described in the section called “Revisions”, revision numbers in Subversion are pretty straightforward—integers that keep getting larger as you commit more changes to your versioned data. Still, it doesn't take long before you can no longer remember exactly what happened in each and every revision.
1 Answer. "http://your-jenkins-host/env-vars.html/" and you'd find a constant called "SVN_REVISION" Each job build will keep the SVN revision in the given variable. Check out this Jenkins Certification , if you want to up your Jenkins' skills.
svn co -r {2011-11-28} svn://location/of/my/repository/branch
works for me. May be you are missing URL. however if I try to checkout a revision of a time when repo did not exist, I get
svn co -r {2006-11-28} svn://location/of/my/repository/branch
svn: Unable to find repository location for 'svn://location/of/my/repository/branch' in revision 0
Update After reading your comment you seem to be just interested in seeing committed file in a date range. Here is what I do:
svn log -r {2011-12-02}
------------------------------------------------------------------------
r10514 | nishant | 2011-12-01 22:47:44 +0000 (Thu, 01 Dec 2011) | 1 line
fixed issue#2993
------------------------------------------------------------------------
refer: SVN doc for revision specifiers Do read why it gives results for the commits made a day earlier.
Update:
Revision range is not applied on date.
svn co -r {2012-09-04}:{2012-09-14} svn://location/of/my/repository/branch
svn: Revision range is not allowed
However, if you just wanted to see the files altered between two date range. Just see the log
svn log -r {2012-09-04}:{2012-09-14}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With