How can I import a directory structure into SVN, keeping the file and folder modifed dates the same?

人盡茶涼 提交于 2019-12-06 03:53:12

There is an svn config option that controls how timestamps are stored in the repository:

use-commit-times

Normally your working copy files have timestamps that reflect the last time they were touched by any process, whether that be your own editor or by some svn subcommand. This is generally convenient for people developing software, because build systems often look at timestamps as a way of deciding which files need to be recompiled.

In other situations, however, it's sometimes nice for the working copy files to have timestamps that reflect the last time they were changed in the repository. The svn export command always places these “last-commit timestamps” on trees that it produces. By setting this config variable to yes, the svn checkout, svn update, svn switch, and svn revert commands will also set last-commit timestamps on files that they touch.

See Runtime Configuration Area and Configuration Options

BTW, Beyond Compare rocks! I use all of the ones mentioned, svn diff, TortoiseMerge and BC2. BC2 is the most complete.

Subversion will do the comparsion much quicker than even beyond compare will do..

If you use tortoiseSVN you even can use beyond compare as external Diff tool.

After a quick check: If you commit a file from your working copy, it keeps it's timestamp (last modification time). Even after an update (without further remote changes to this file) the file keeps the timestamp of the last modification. The test was on Linux with Subversion version 1.4.6.

If you update a file, that was changed remotely it gets a new timestamp.

So you keep timestamps of last modification.

Besides: Why you want to use 'Beyond Compare' for diffs. You will no longer need to keep different directories to reflect different versions. And subversion has a diff-feature of it's own to prepare diffs for combinations of revisions.

Whether "use-commit-times" needs to be set to yes on every client m/c config file OR is there any option to centralize this on Subversion installation directory?.

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