Page 1 of 1
DSS + Source Management (e.g. Github)
Posted: Mon Jan 09, 2023 6:54 pm
by RobbieOrvis
Hello,
Moving a prior thread to its own thread here: has there been progress made on using DSS with source management tools, like Github. Previously, when attempting to do merges and other actions, the coordinate system in Vensim would get messed up and cause the model to visually fail. Travis Franck suggested that improvements were made that addressed this, but we still appear unable to successfully manage .mdl files and conduct merges.
Re: DSS + Source Management (e.g. Github)
Posted: Mon Jan 09, 2023 8:10 pm
by Travis
@Robbie what Vensim version are you using? I think source control works best on v9.2 or newer. [edited to v9, no v8]
Re: DSS + Source Management (e.g. Github)
Posted: Mon Jan 09, 2023 8:10 pm
by tomfid
Are you using the new file formats in Model>Settings?

- 2023-01-09_12-57-56.png (29.85 KiB) Viewed 4369 times
Re: DSS + Source Management (e.g. Github)
Posted: Tue Jan 10, 2023 10:45 pm
by RobbieOrvis
Aha! I have been using the old GUI, which doesn't have these options when I go to Model>Settings. I am gathering might be the issue here since these options aren't available.
I can test more tomorrow using the new GUI and settings above.
Re: DSS + Source Management (e.g. Github)
Posted: Tue Jan 10, 2023 11:02 pm
by RobbieOrvis
For what it's worth after some very brief testing, this is still causing merge conflicts when we try to merge separately edited model versions together. I'm not sure if it is a Git configuration setting or something else. The general issue is that when the same line number is edited in two .mdl files and you try to merge, it throws a conflict. It doesn't appear to recognize each variable as hunk and therefore allow for code merging.
For example, I created a couple of new branches in our repository and added a variable name Test Variable 1 in one and Test Variable 2 in the other. If I try to merge these together or try to merge both back into the parent branch, I get merge conflicts for where the new variables are entered into the code in the .mdl file.
Re: DSS + Source Management (e.g. Github)
Posted: Thu Jan 12, 2023 8:05 am
by Administrator
If you can send an example, I'd be happy to take a look.
Re: DSS + Source Management (e.g. Github)
Posted: Mon Jan 16, 2023 7:55 am
by adelibas
RobbieOrvis wrote: ↑Tue Jan 10, 2023 11:02 pm
For what it's worth after some very brief testing, this is still causing merge conflicts when we try to merge separately edited model versions together. I'm not sure if it is a Git configuration setting or something else. The general issue is that when the same line number is edited in two .mdl files and you try to merge, it throws a conflict. It doesn't appear to recognize each variable as hunk and therefore allow for code merging.
For example, I created a couple of new branches in our repository and added a variable name Test Variable 1 in one and Test Variable 2 in the other. If I try to merge these together or try to merge both back into the parent branch, I get merge conflicts for where the new variables are entered into the code in the .mdl file.
Robbie, I see that you are trying to modify the same line of the same file in two separate branches. When you modify the same line of the same file in parallel branches, that creates a conflict by definition in Github (see
https://docs.github.com/en/pull-request ... -conflicts).
Having said that I understand where you are coming from: I used different merge tools years ago that could figure out (looking at the common ancestor) that the edits to the same line in two parallel version are actually new lines so it would automatically merge them to include both lines.