【问题标题】:GUI for conflicts resolution用于解决冲突的 GUI
【发布时间】:2011-09-24 07:22:40
【问题描述】:

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

patch -p0 --merge my.patch

然后正确标记冲突(使用“

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

【问题讨论】:

    标签: user-interface merge diff patch


    【解决方案1】:

    如果您使用的是 git 存储库,那么您无需使用补丁命令 可以触发如下命令,如下图:

          $ 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
    

    【讨论】:

      【解决方案2】:

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

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-10-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-12-06
        • 1970-01-01
        相关资源
        最近更新 更多