如何强制颠覆提交未更改的文件? [英] How can I force subversion to commit an unchanged file?

查看:19
本文介绍了如何强制颠覆提交未更改的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使文件未更改,我也希望 Subversion 提交文件.有没有办法做到这一点?

解决方案

如果您希望文件内容保持不变(这意味着您不能像 johnstok 建议的那样仅仅更改空格),您可以随时更改文件.

例如

<前>svn propset dummyproperty 1 你的文件svn 提交你的文件

这将执行提交而无需更改文件.

只要确保您不使用特殊的 svn: 属性之一.其他应该没问题.

<小时>

许多其他发帖人询问为什么有人想要这样做 - 想必将这个答案标记下来的人也有同样的担忧.

我不能代表原始海报,但我看到使用的一种情况是尝试自动将 Visual Sourcesafe 存储库上的活动与 subversion 存储库同步.

I want subversion to commit a file even if it's unchanged. Is there a way to do this?

解决方案

If you want the file contents to remain unchanged (meaning that you can't merely change whitespace as johnstok suggested) you can always change one of the properties on the file.

eg.

svn propset dummyproperty 1 yourfile
svn commit yourfile

That will perform a commit without having to change the file.

Just make sure that you don't use one of the special svn: properties. Anything else should be ok.


Edit: A number of other posters have asked why someone would want to do this - presumably the people who have marked this answer down have also had the same concerns.

I can't speak for the original poster, but one scenario where I have seen this used is when attempting to automatically synchronise activities on a Visual Sourcesafe repository with a subversion repository.

这篇关于如何强制颠覆提交未更改的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆