My objective is to extract revisions from the repository that are at least 30 days apart from each other. Lets say I want to examine revisions starting from 30 to 100. For each of the revisions, I have used SVN info
command and use the last changed date as the date of that revision. The next steps are straightforward. Check the difference in days between two consecutive revisions.
My question is whether the approach is ok (or in another way, is it correct to get the date of a revision in this approach). Any suggestion would be helpful. Thanks.
Example of SVN info output.
$ svn info -r 200 https://itextsharp.svn.sourceforge.net/svnroot/itextsharp/trunk
Path: trunk
URL: https://itextsharp.svn.sourceforge.net/svnroot/itextsharp/trunk
Repository Root: https://itextsharp.svn.sourceforge.net/svnroot/itextsharp
Repository UUID: da003780-e18d-4f51-86a4-c2ecb517afe5
Revision: 200
Node Kind: directory
Last Changed Author: psoares33
Last Changed Rev: 200
Last Changed Date: 2010-10-17 12:25:23 -0600 (Sun, 17 Oct 2010)
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.
svn update brings changes from the repository into your working copy. If no revision is given, it brings your working copy up to date with the HEAD revision. Otherwise, it synchronizes the working copy to the revision given by the --revision ( -r ) option.
svn info — Display information about a local or remote item.
As you saw 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.
You are probably better off using the svn log
command, with the --xml
option for automated parsing. This will give you a quick list of revisions, including the dates.
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