views:

875

answers:

3

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?

+5  A: 

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).

Andrew Barnett
Note: I acutally used tortoiseSVN (see CMS's response below), but I never specified that in the question.
Greg Dean
+4  A: 
CMS
hmm - an empty bat file is not working. I get the following "'pre-revprop-change' hook failed with error output:"
Greg Dean
had to change it to "exit 0" and it worked
Greg Dean
@CMS - I did indeed take the tortoiseSVN path, however I'm going to accept @Andrew's answer since he was first, had the same answer (more or less), and will probably appreciate the rep more. Thanks for your help.
Greg Dean
@Greg: No problem, thank you!
CMS
+2  A: 
  1. Enable revision property change hook
  2. Modify svn:date property, using svnlook date if you need.
Si