开发者

GUI for conflicts resolution

I 开发者_如何学JAVAhave 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.


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.


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜