Git gui mergetool TortoiseMerge wrong file path

邮差的信 提交于 2019-12-22 18:19:39

问题


i'm having some problems configuring the git gui to run tortoisemerge

In my .config there are these lines

[merge]
    tool = tortoisemerge
[mergetool "tortoisemerge"]
        path = C:\\Program Files\\TortoiseSVN\\bin\\TortoiseMerge.exe
        cmd = 'C:\\Program Files\\TortoiseSVN\\bin\\TortoiseMerge.exe' -base:"$BASE" -mine:"$LOCAL" -theirs:"$REMOTE" -merged:"$MERGED"
        keepBackup = false

When i do

'git mergetool' from bash the tortoisemerge starts correctly

I also modified mergetool.tcl adding the in the switch which choose the mergetool to use

tortoisemerge {
        set cmdline [list "$merge_tool_path" -base:"$BASE" -mine:"$LOCAL" -theirs:"$REMOTE" -merged:"$MERGED"]
    }

This makes the tortoisemerge program start, but it raises an error:

The diffing engine aborted because of an error:

Can't open file '\".\Deliveries\RASD.tex.BASE.tex\"': The filename,directory name, or volume label syntax is incorrect

The file actually exist in my directory.

As an example of how a line of the files look here the one about p4merge

p4merge {
        set cmdline [list "$merge_tool_path" "$BASE" "$REMOTE" "$LOCAL" "$MERGED"]
    }

As you can see the code is really similar. I DID NOT TRY IF THE P4MERGE TOOL WORKS WITH THIS SETUP, this is just to show how the developers of git gui wrote the command line.

This is how the paths are build

    set MERGED   $current_diff_path
    set BASE     "./$MERGED.BASE$fileext"
    set LOCAL    "./$MERGED.LOCAL$fileext"
    set REMOTE   "./$MERGED.REMOTE$fileext"
    set BACKUP   "./$MERGED.BACKUP$fileext"

How can i modify the file to give the correct path to tortoisemerge? Why it doesn't give any problem with the command line?

来源:https://stackoverflow.com/questions/19819263/git-gui-mergetool-tortoisemerge-wrong-file-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!