问题
When I import files into a repository (svn import
), they get new timestamps. So when I checkout these files into a working copy, they have those new "last modification date". I would like to preserve the original files' timestamps. Is it possible with SVN 1.6.x?
回答1:
You can set the svn:date
revision property to simulate any commit time. See SVN commit with old date/time and Change the timestamp of an SVN revision.
回答2:
There is nothing in the default Subversion install to record the file's creation/modification dates. You may be able to add a custom property to record this if you wanted to go to that effort.
The next best option is to use the "set the file dates to the last commit time" option that others have linked to. That'll get you the commit time which (in an ideal world) shouldn't be too long after the file was last updated.
来源:https://stackoverflow.com/questions/4286633/how-do-i-preserve-files-timestamps-using-svn