Matlab models GIT - LFS storage. Not able to compare models

12 次查看(过去 30 天)
Hello. I have .slx models stored as LFS in Bitbucket. When I try to compare previous revisions I get mesage:
and truly the file at the location contains just the following.
version https://git-lfs.github.com/spec/v1
oid sha256:a46f1364fc7d03ee20ad71600b77....
size 82305
The LFS is correctly installed. For models stored without LFS the comparing works well. I was told LFS should be set for models (MLD, SLX) otherwise it'll slow the responsiveness of the git. Is there anything I'm missing? Thanks.
  2 个评论
Fabian Stein
Fabian Stein 2022-5-19
Is there still no solution available, such that the conflict can be resolved within MATLAB? Basically MATLAB would need to create the base/mine/theirs and merged files using the git mergetool command. I would understand that MATLABs git lfs support means that I can use this intuatively.
Fabian Stein
Fabian Stein 2022-5-25
I just tested it with 2021b, where it works like a charm. According to MATLAB support this has been solved in 2021a.

请先登录,再进行评论。

采纳的回答

Fabien Jeanneteau Safran
Hello Vit,
I have the same issue in Simulink 2018b.
As there is not so much documentation on LFS for the version (instead of 2021a), I assumed the feature "Compare LFS objects" is not working/possible in my version.
As a workaround, I configured another Git Client to use the MATLAB Diff executables. Please refer to page https://fr.mathworks.com/help/releases/R2018b/matlab/matlab_prog/customize-external-source-control-to-use-matlab-for-comparison-and-merge.html?s_tid=doc_srchtitle (please check for the MATLAB version you have).
Short story, use following command to get paths for Diff and Merge operations that you will need to give to your other Git Client:
comparisons.ExternalSCMLink.setup
This preference is now enabled: Allow external source control tools to use open MATLAB sessions for diffs and merges. Use the following file paths to customize your external source control client. Diff: /MATLAB/bin/glnxa64/mlDiff Merge: /MATLAB/bin/glnxa64/mlMerge AutoMerge: /MATLAB/bin/glnxa64/mlAutoMerge
For me, it gave:
>>>
This preference is now enabled: Allow external source control tools to use open MATLAB sessions for diffs and merges.
Use the following file paths to customize your external source control client.
Diff: C:\Program Files\MATLAB\R2018b\bin\win64\mlDiff.exe
Merge: C:\Program Files\MATLAB\R2018b\bin\win64\mlMerge.exe
<<<
Hoping it can help you.
  3 个评论
Arman
Arman 2022-8-15
编辑:Arman 2022-8-15
@Vit Kolar Did you happen to have an issue with mergetool also? I can compare using the workaround, but the mergetool still does not work. I get the following error
I tried calling the mergetool from Matlab (right click -> view conflicts) and Git Terminal (git mergetool -t mlMerge . . . ) but neither of them manages to open the file
Vit Kolar
Vit Kolar 2022-8-15
I cannot help here, I use external GIT client. You can do that also, any client works.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Source Control Integration 的更多信息

标签

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by