使用 TortoiseSVN 的“将文件日期设置为上次提交时间”是否安全? Visual Studio 的功能?
TortoiseSVN 具有将文件日期设置为“上次提交时间”的功能。默认为 false。
这对于 robocopy 安装脚本来说非常有用。如果一个开发人员对网站进行了 robocopy 安装,当我更新我的存储库时,我的文件更改日期与他的不同,因此,如果我尝试进行安装,日期都会不同,robocopy 认为它需要更新每个单个文件。
但是,TortoiseSVN 的文档提供了此警告:(强调我的)
该选项告诉TortoiseSVN进行设置 文件日期为上次提交时间 进行结账或更新时。 否则 TortoiseSVN 将使用 当前日期。 如果你正在开发 通常最好使用的软件 当前日期,因为构建系统 通常查看日期戳 决定哪些文件需要编译。如果 您使用“上次提交时间”并恢复 到较旧的文件修订版,您的 项目可能无法按您的预期编译 它到。
此警告是否正确适用于 Visual Studio?忽略此警告是否安全,或者我以后会遇到问题吗?
或者,是否有另一种极其简单的安装方案可以代替 robocopy?请记住,我不想引入大量额外的依赖项,因此第 3 方应用程序、我无法存储在 SVN 中的安装脚本或需要大量额外开发人员培训的解决方案都不是理想的选择。
TortoiseSVN has a feature to set the file dates to the "last commit time." The default is false.
This would be nice to use for the purpose of robocopy install scripts. If one developer does a robocopy install of a website, when I update my repository my file change dates aren't the same as his, so if I try to do an install, the dates are all different and robocopy thinks it needs to update every single file.
However, TortoiseSVN's docs provide this warning: (emphasis mine)
This option tells TortoiseSVN to set
the file dates to the last commit time
when doing a checkout or an update.
Otherwise TortoiseSVN will use the
current date. If you are developing
software it is generally best to use
the current date because build systems
normally look at the date stamps to
decide which files need compiling. If
you use “last commit time” and revert
to an older file revision, your
project may not compile as you expect
it to.
Does this warning rightly apply to Visual Studio? Is it safe to overlook this warning or will I run into problems down the road?
Or alternatively, is there another stupidly simple installing scheme that would work in place of robocopy? Keep in mind that I don't want to introduce a lot of extra dependencies, so a 3rd party app, an install script I can't store in SVN, or a solution that requires lot of extra developer training would not be ideal.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种解决方案是通过检查文件内容仅复制实际已更改的文件。我不确定 Robocopy 是否有此选项,但 rsync (对于 Windows,cwrsync) 确实如此。
编辑:哦,抱歉,“不理想”。好吧,我就把它留下,以防有帮助。
One solution would be to copy only files that have actually changed, by checking the file contents. I'm not sure if Robocopy has an option for this, but rsync (for Windows, cwrsync) does.
Edit: oh, sorry, "not ideal". Well, I'll just leave it in case it helps.