Subversion - 始终使用我的解决一组文件的冲突
我们在 subversion 中保留了大量自动生成的代码。有时,我正在处理发电机的一部分,而另一位同事正在处理发电机的另一部分。我们中的一个人签到,另一个人得到最新的信息。现在我们生成的代码存在冲突。因为它是生成的,所以下次生成器运行时它将是正确的,但 subversion 已将其标记为冲突。四处寻找这些冲突,验证它们确实是由于生成的代码造成的,然后手动“接受我的”来清除冲突,这有点痛苦。
有没有办法让 subversion 识别出对于给定文件夹中的所有文件我只想自动接受我的?我不想使用专用的批处理文件,因为大多数办公室都使用 Tortoise SVN,而我正在寻找一个每个人都可以使用的解决方案。
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.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您应该首先避免在 SVN 中生成文件 - 正如您所知,这是冲突的根源。最好忽略它们,并将它们作为构建的一部分进行构建。
但至于你的问题,你应该能够使用
--accept mine-full
选项来svn update
,这使得冲突自动解决给我。请参阅 Subversion 手册 和手册页了解更多详情。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.
But as to your question, you should be able to use the
--accept mine-full
option tosvn update
, which makes conflicts automatically resolve to mine. See the Subversion manual and man pages for more details.svn update --accept [推迟|基地|我的已满|他们的已满|编辑|启动]
svn update --accept [postpone|base|mine-full|theirs-full|edit|launch]
那应该是
“否”?
That should be
No?