We had a power failure that exhausted our UPS and subsequently shutdown our SVN machine. When it booted back up it, the system time was incorrect.
Unfortunately, this was not caught until some people had already committed a changes. So now we have a few revisions that predate the first revision by several years.
Is there a way to correct this date, so things are in order?
On the file, simply right-click => Team => Switch to another branch/tag/revision.
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.
Unlike most version control systems, Subversion's revision numbers apply to the entire repository tree, not individual files. Each revision number selects an entire tree, a particular state of the repository after some committed change.
The date/time is a property of the revision. Figure out the revision number (or use HEAD), and modify it with propset or propedit and --revprop.
svn propset svn:date 'YYYY-MM-DDTHH:MM:SS.MMMMMMZ' --revprop -r HEAD /path/to/wc/file
You'll have to play around with it to get the right combination of settings. You can also look at the Red Book, under Advanced Properties. (I linked to 1.4, adjust to suit your version).
Change the svn:date property of the revision:
svn propset -rXXX --revprop svn:date "2008-03-10T03:00:00.000000Z" repository
Or using TortoiseSVN, Show log -> Right click on the revision -> Show revision properties:
You will need for that the pre-revprop-change hook, a empty shell script or batch file will do the work.
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