用于解决冲突的 GUI

发布于 2024-11-17 15:43:10 字数 229 浏览 1 评论 0原文

我有一个补丁和要打补丁的目录。我可以应用补丁,

patch -p0 --merge my.patch

然后正确标记冲突(使用“<<<<”、“====”等)。

问题是 - 是否有一个图形工具可以解决以这种方式标记的冲突?或者,如果我只有一个补丁和一组要修补的文件(目录),是否有其他图形冲突解决方法?我尝试过 Kompare,但效果不佳。

I have a patch and directory to be patched. I can apply the patch with

patch -p0 --merge my.patch

The conflicts are marked then properly (using "<<<<", "====" and so on).

The question is - is there a graphical tool that allow to resolve conflicts marked in such a way? Or is there any other way of graphical conflict resolution in the case i have only a patch and a set of files (directory) to be patched? I tried Kompare but it doesn't work well.

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

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

发布评论

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

评论(2

一场信仰旅途 2024-11-24 15:43:10

ECMerge,我使用的工具,有一个现成的命令来执行此操作,调用 ecmerge命令行中的 .exe --open-conflict mydocument.c 可以完成这项工作(还有适用于 Windows/Linux 和 Mac 的 shell 扩展以及 GUI 中的菜单项)。它为您提供了在这种情况下所期望的通常的 2 路或 3 路合并视图。

ECMerge 还可以直接完成补丁工作,并让您通过其补丁导入功能在 GUI 中完全预览和合并。

ECMerge, the tool I work on, has a command to do this off-the-shelf, calling ecmerge.exe --open-conflict mydocument.c from the command line does the job (there is a shell extension for Windows/Linux and Mac as well and menu item in the GUI). It offers you the usual 2 or 3-way merge view one would expect in this situation.

ECMerge can also do the job of patch directly and let you preview and merge completely in the GUI with its Patch Import feature.

落在眉间の轻吻 2024-11-24 15:43:10

如果您使用 git 存储库,那么您不必使用 patch 命令
可以触发以下命令,如下所示:

      $ git am -3 < /tmp/0001-Added-feature-hello.patch
      Applying: Added feature hello
      Using index info to reconstruct a base tree...
      M       code.c
      Falling back to patching base and 3-way merge...
      Auto-merging code.c
      CONFLICT (content): Merge conflict in code.c
      error: Failed to merge in the changes.
      Patch failed at 0001 Added feature hello
      Use 'git am --show-current-patch' to see the failed patch
      When you have resolved this problem, run "git am --continue".
      If you prefer to skip this patch, run "git am --skip" instead.
      To restore the original branch and stop patching, run "git am --abort".

要使用 GUI 解决冲突,请触发以下命令:

      $ git mergetool --tool=meld

In case you are using git repository then, instead of using a patch command you
can fire the following command, as shown below :

      $ git am -3 < /tmp/0001-Added-feature-hello.patch
      Applying: Added feature hello
      Using index info to reconstruct a base tree...
      M       code.c
      Falling back to patching base and 3-way merge...
      Auto-merging code.c
      CONFLICT (content): Merge conflict in code.c
      error: Failed to merge in the changes.
      Patch failed at 0001 Added feature hello
      Use 'git am --show-current-patch' to see the failed patch
      When you have resolved this problem, run "git am --continue".
      If you prefer to skip this patch, run "git am --skip" instead.
      To restore the original branch and stop patching, run "git am --abort".

To resolve the conflict using GUI fire the following command :

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