Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Compare current model to most recent (or other) commit #123

Open
michaelansley opened this issue Feb 19, 2020 · 9 comments

Comments

@michaelansley
Copy link

michaelansley commented Feb 19, 2020

Hi,

I'd like to propose a new feature, which allows a user to compare the current model (assumed to have changed since the last commit) to the last commit, or potentially some other commit.

Such a function could be accessed by a simple menu item on the Collaboration menu, or context menu item for the Change History UI.

Implementation could be similar to the diff management UI.

Regards,
Michael

@Phillipus
Copy link
Member

@jbsarrodie and I discussed this recently to at least show some diff when doing a commit.

@michaelansley
Copy link
Author

Great! I often find myself wondering what, exactly, I'm about to commit when I, for example, switch branches.
Or wondering what exactly I'm committing, compared to what I think I'm committing. Given that I'm usually working on three or four different aspects of the model at any one time, I can easily do work in the wrong branch, especially if it is small changes to demonstrate something to a colleague.

@Phillipus
Copy link
Member

Yes, indeed. We discussed this same thing and it did seem essential to want to see what changed in the same way as when you do a merge conflict.

@WatchTh1
Copy link

Will this feature be put into roadmap ?

@Phillipus
Copy link
Member

Will this feature be put into roadmap ?

Yes. But don't know when I will work on it (I'm working on a lot of stuff)

@eduardobbs
Copy link

eduardobbs commented Apr 29, 2021

Hi, if it helps I've created a JArchi script and a batch that does the job for me on Windows.
This is the content of the JArchi script:

exec("GitCompare.bat");
console.log("GitK will open, the comparison will also be available on Archi under the Scripts Manager tab: 'GitCompareRESULT.diff' file");

And this is the content of the batch file:

cd instance\model-repository\MyGitRepoXYZ
git show > jarchi-scripts\Architecture\GitCompareRESULT.diff
gitk &

I use a portable version and my repository folder resides on a relative path to Archi, but you could set it up differently, here is my folder structure:
image

Besides opening the GITK tool, which is interactive, it also saves the differences to the file below under your Scripts Manager tab:
image

So, as an alternative to GITK, you can right-click on it and then click on edit. It should open the tool you selected on the Edit-->Preferences-->Scripting menu:
image

In my case the batch file makes a call to the Visual Studio Code IDE:

@echo off
REM cls

set vsCodePath="C:\Users\%username%\AppData\Local\Programs\Microsoft VS Code\Code.exe"

IF EXIST %vsCodePath% (
	%vsCodePath% %*
) ELSE (
	notepad %*
)

This is the result on the VS Code IDE:
image

@CamilleDominique
Copy link

CamilleDominique commented Sep 7, 2022

Hi all,
For me the issue is not only to know in advance what are the differences between current local save and last commit on an xml point of view. An xml diff would be nice already but in reality not really useful if there are a lot of differences and hundreds of xml files have been changed.
Something even more useful would be to sort the differences by views and provide visual comparison to the user.
That is a personal idea, not sure how feasible it is though.

Has this feature request been included in 2022/2023 roadmap?

@Phillipus
Copy link
Member

Has this feature request been included in 2022/2023 roadmap?

It's something we're looking at for coArchi version 2.

@startsevsa
Copy link

startsevsa commented Jul 6, 2023

Has this feature request been included in 2022/2023 roadmap?

It's something we're looking at for coArchi version 2.

Maybe start from parsing the result of the git ls-files -m command ?
At first time get the list of names of changed objects (or highlight them in a objects tree)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants