Subversion-始终使用我的文件集解决冲突 [英] Subversion - Always resolve conflicts using mine for a set of files

查看:63
本文介绍了Subversion-始终使用我的文件集解决冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有大量的自动生成的代码,可以在Subversion中保存。有时我在发电机的一部分上工作,而另一位同事在发电机的另一部分上工作。我们一个人签入,另一个人获取最新的。现在,我们生成的代码发生冲突。由于它已生成,因此下次运行该生成器后它是正确的,但是Subversion已将其标记为冲突。四处走动,查找这些冲突,确认它们确实是由于生成的代码,然后手动接受我的以清除冲突,这有点痛苦。

We've got a sizable chunk of auto-generated code that we keep around in subversion. Sometimes I'm working on a piece of the generator while another coworker is working on a different piece of the generator. One of us checks in, and the other gets the latest. Now our generated code is in conflict. Because it's generated it'll be correct after the next time the generator is run, but subversion has flagged it as conflicted. It's a bit of a pain to go around, find these conflicts, verify that they are indeed due to generated code, and then manually "accept mine" to clear the conflicts.

是否有一种方法可以让Subversion认识到,对于给定文件夹中的所有文件,我只想自动接受我的?我想远离专用的批处理文件,因为大多数办公室使用Tortoise SVN,并且正在寻找每个人都可以使用的解决方案。

Is there a way to have subversion recognize that for all the files in a given folder I just want to automatically accept mine? I'd like to stay away from dedicated batch files, as most of the office uses Tortoise SVN and I'm looking for a solution that everyone can use.

推荐答案

您可能首先应该避免在SVN中生成文件-如您所知,这是冲突的根源。最好不要理会它们,并将它们作为构建的一部分进行构建。

You should probably avoid having generated files in SVN in the first place - as you can tell, this is a source of conflicts. Better to have them be ignored, and build them as part of the build.

但是对于您的问题,您应该可以使用 -接受 svn update 的mine-full 选项,这会使冲突自动解决。请参见 Subversion手册和手册页面以获取更多详细信息。

But as to your question, you should be able to use the --accept mine-full option to svn update, which makes conflicts automatically resolve to mine. See the Subversion manual and man pages for more details.

这篇关于Subversion-始终使用我的文件集解决冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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