I can't seem to find the correct variables needed to set up a new custom merge tool. Can anyone point me to a list of variables that SourceTree makes available to custom merge tool commands?
..\..\semanticmergetool.exe -s=src.cs -b=base.cs -d=dst.cs -r=semanticmergetoolresult.cs -emt="..\..\mergetool.exe -b=""@basefile"" -bn=""@basesymbolic"" -s=""@sourcefile"" -sn=""@sourcesymbolic"" -d=""@destinationfile"" -dn=""@destinationsymbolic"" -r=""@output"" -t=""@filetype"" -i=""@comparationmethod"" -e=""@fileencoding""" -edt="..\..\mergetool.exe -s=""@sourcefile"" -sn=""@sourcesymbolic"" -d=""@destinationfile"" -dn=""@destinationsymbolic"" -t=""@filetype"" -i=""@comparationmethod"" -e=""@fileencoding"""
This is the command that I would execute on the commandline. The 4 variables I need from SourceTree are sourcefile, basefile, destinationfile and resultfile.
The built-in SourceTree documents provide the help. Here's an extract:
Here is where you set the external diff/merge tools. SourceTree has in-built support for FileMerge, DiffMerge, Araxis Merge, KDiff3 and more, but if you wish to use another tool you can select 'Other' and provide your own tool information.
If you do choose to use 'Other', then you should supply the full path to the tool you wish to use in the 'Command' field, and the parameters that will be needed in the 'Arguments' field, with the following placeholders being available to supply file names:
- $LOCAL - the name of the file on your local system
- $REMOTE - the name of the file containing the other contents you're diffing or merging against
- $BASE - in the case of a merge, the name of a file containing the common ancestor of $LOCAL and $REMOTE
- $MERGED - the name of the file to save merge results to
Obviously 'Diff' only needs the first two parameters. For merges, you should really pick a tool which supports 3-way merging to make your life easier (all of the tools that SourceTree supports out of the box are capable of 3-way merging).
Hope that helps
I found this question on Google, as I was looking for the configuration for Semantic Merge Tool with SourceTree.
In case anyone else needs it, the External Diff Command arguments are: -d $LOCAL -s $REMOTE
The External Merge Command arguments are: -d $LOCAL -s $REMOTE -b $BASE -r $MERGED
It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG