필터 지우기
필터 지우기

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

조회 수: 12 (최근 30일)
Vit Kolar
Vit Kolar 2021년 6월 22일
댓글: Vit Kolar 2022년 8월 15일
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
Fabien Jeanneteau Safran 2021년 9월 15일
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