Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I reset the external merge tool settings ?

Alex JULITA
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 7, 2023

Hello, 

I try to give to sourcetree a custom exe as external mergetool.

I am using a python script converted to .exe with pyinstaller.

I have something like this (simplified version)
```py
parser=argparse.ArgumentParser(description='''Script for diff''')
parser.add_argument('--local', type=pathlib.Path, help='local file')
parser.add_argument('--remote', type=pathlib.Path, help='remote file')
parser.add_argument('--mergetool', type=pathlib.Path, help='Path to merge tool')
args=vars(parser.parse_args())
# default value
my_merge_tool = 'C:/Program Files/WinMerge/WinMergeU.exe'
if args[mergetool] != None:
    my_merge_tool = args[mergetool]
os.system(my_merge_tool + args[local] + " " + args[remote])
```
I then used the created executable as external tool with the args:
--local=\"$LOCAL\"  --remote=\"$REMOTE\"
After that, i tried to change mergetool several time like (not sure at which point it started to be broken):
--local=\"$LOCAL\"  --remote=\"$REMOTE\" --mergetool="C:\Program Files\TortoiseGit\bin\TortoiseGitMerge.exe"
--local=\"$LOCAL\"  --remote=\"$REMOTE\" --mergetool="C:/Program Files/TortoiseGit/bin/TortoiseGitMerge.exe"
--local=\"$LOCAL\"  --remote=\"$REMOTE\" --mergetool=\"C:\\Program Files\\TortoiseGit\\bin\\TortoiseGitMerge.exe\"
Now it's stucked and the log shows me that the value of mergetool is always equal to: C:/Program
The other values are changing, only mergetool is stuck. Even if i remove the arg from the arguments

I also can not change the name of the executable. I tried to rename it and it will still try to call with the previous name.

Deleting C:\Users\<MyUserName>\AppData\Local\Atlassian\SourceTree.exe_Url_apscwdyxqjugvtivtrh4tbcjapcnzggm\3.4.10.0\user.config or other files as shown here https://confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html doesn't work either.

1 answer

0 votes
Alex JULITA
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 11, 2023

Is it possible that someone have a look about this please ?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events