MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
matlabroot/bin/maci64/mlMerge

Where matlabroot is replaced with the full path to your installation, for
example, C:\Program Files\MATLAB\R2016b.

(^2) Set up diff.
a In the MATLAB Command Window, copy the file path to mlDiff, for example,
C:\Program Files\MATLAB\R2016b\bin\win64\mlDiff.exe.
b In your source control tool, locate the diff setting, and add an entry to specify
what to do with a particular file extension (for example, .slx). Paste in the file
path to mlDiff that you copied from the MATLAB Command Window.
c After the path to the script, or in the arguments box, add arguments to specify
the input files. Look up the argument names specific to your source control tool.
Specify the inputs for diffs, in this order: leftFile, rightFile.
For example, for Tortoise SVN:
"C:\Program Files\MATLAB\R2016b\bin\win64\mlDiff.exe" %base %mine
For Perforce® P4V:
"C:\Program Files\MATLAB\R2016b\bin\win64\mlDiff.exe" %1 %2
(^3) Set up merge.
a In the MATLAB Command Window, copy the file path to mlMerge.
b In your source control tool, locate the merge setting, and add an entry to specify
what to do with a particular file extension (for example, .slx). Paste in the file
path to mlMerge that you copied from the MATLAB Command Window.
c After the path to the script, or in the arguments box, add arguments to specify
the input files. Look up the argument names specific to your source control tool.
Specify the inputs for merges, in this order: base, mine, theirs, and merged
target file.
For example, for Tortoise SVN:
"C:\Program Files\MATLAB\R2016b\bin\win64\mlMerge.exe" %base %mine %theirs %merged
For Perforce P4V:
"C:\Program Files\MATLAB\R2016b\bin\win64\mlMerge.exe" %b %2 %1 %r
(^4) After this setup, when you use diff or merge, your external source control tool opens
a report in MATLAB Comparison Tool. Use the report to view changes and resolve
merges.
Customize External Source Control to Use MATLAB for Diff and Merge

Free download pdf