使用 SVN 合并文件

发布于 2024-08-19 11:22:32 字数 338 浏览 8 评论 0原文

当更新期间工作副本和存储库之间存在冲突时,我使用 XCode 的内置工具 FileMerge。

如何保存合并后的文件?我当前所做的是保存合并的文件而不是原始的冲突文件。

但是在保存合并的文件并退出 FileMerge 后,“svn merge”命令不会退出,它正在等待一些输入,但我不知道要输入什么。

因此我被迫通过键入“退出命令” ctrl-c”在终端中。退出 svn 后,我得到:“svn:无法写入连接:管道损坏”。

如果我在执行此操作后输入“svn status”,则会出现“!”所有文件夹前面的文件。

如何使用 SVN 和 XCode 的 FileMerge 正确合并文件?

When there are conflicts between the working copy and the repository during updating, I'm using XCode's built in tool FileMerge.

How do I save the merged file? What I currently do is save the merged file instead of the original conflicted file.

But after saving the merged file and quitting FileMerge, the "svn merge" command doesn't quit, it's waiting for some input, but I don't know what to type in.

Hence I'm forced to quit the command by typing "ctrl-c" in the terminal. After quitting svn I get: "svn: Can't write to connection: broken pipe".

If I type in "svn status" after performing this operation there are "!" files in front of all the folders.

How do I merge files properly with SVN and XCode's FileMerge?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

平生欢 2024-08-26 11:22:32

它要求您说“r”代表“已解决”,这将从您的文件中删除“C”状态并接受您的合并文件作为已解决的副本。其他选项包括“tf”代表“theirs-full”,“mf”代表“mine-full”,和“h”代表帮助

您可以使用任何想要编辑合并的编辑器——可以使用“e”从命令行调用它(在处理“svn merge”操作时),也可以点击“p”推迟,这将使您返回到命令行,尽管您的文件仍然存在冲突(状态“C”),并且您必须手动调用“svnresolved”来清除 C 状态。

这 ”!” flag 意味着文件全部被锁定,因为就 svn 而言,它仍然处于合并操作的中间(因为你用 ^C 中止了它)。

It's asking for you to say "r" for "resolved", which will remove the 'C' status from your file and accept your merged file as the resolved copy. Other options include "tf" for "theirs-full", "mf" for "mine-full", and "h" for help.

You can use any editor you want to edit the merge -- either invoke it from the command-line with "e" (while processing the "svn merge" operation), or hit "p" to postpone which will get you back to the command-line, although your file will still be in conflict (status "C") and you will then have to manually invoke "svn resolved " to clear the C status.

The "!" flag means that the files are all locked, because as far as svn is concerned it's still in the middle of the merge operation (which died because you aborted it with ^C).

酷到爆炸 2024-08-26 11:22:32

看一下 第 4 章:分支和合并 SVN 文档。它有您需要的信息。

编辑

我可能误解了你的问题。如果您了解如何正常合并(即无需使用 FileMerge 等额外工具),但在使用 FileMerge 执行此操作时遇到困难,请尝试不使用 FileMerge,而仅使用普通编辑器编辑冲突文件。如果您不明白如何在没有专用工具的情况下合并,请阅读文档并重试。

Take a look at Chapter 4: Branching and Merging of the SVN documentation. It has the info you need.

EDIT

I may have misunderstood your question. If you understand how to merge normally (i.e. without an extra tool such as FileMerge) but are having trouble using FileMerge to do it, try not using FileMerge and just editing the conflict file with a normal editor. If you do not understand how to merge without a dedicated tool, then please do read the documentation and try again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文