How do I preserve files' timestamps using SVN? [duplicate]

拈花ヽ惹草 提交于 2019-12-24 17:19:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!