archimatetool / archi-modelrepository-plugin

coArchi - a plug-in to share and collaborate on Archi models.
153 stars 52 forks source link

[improvement] Add ability to discard changes when switching branches. #87

Open WatchTh1 opened 5 years ago

WatchTh1 commented 5 years ago

Use case Switching branches

Prepequisites

Archi has model repository connected Repository has more than one branch Changes has been made to branch

Problem

There are no way to discard changes been made to model if they are unwanted. Feature "Restore to this commit" is unavailable for the last commit in "Change History". Pull repository requires to make a commit if changes to model has been made. If there are conflicts additional commits has to be made and then merged and so it spoils commit history or additional actions has to be made to revert branch to earlier commits.

User actions

  1. Select Branch in branches workspace to switch into
  2. Select "Switch to branch"
  3. Choice of action dialog is displayed
  4. User selects action
  5. Selected action is performed.

Current behaviour

At step 3 a dialog is displayed with buttons: "Save", "Cancel" Option "Save": saves the changes to model and calls "Commit dialog", after commit is made branch is switched to target branch. If commit is canceled - git branch left unchanged.

Option "Cancel" cancels the dialog

Proposed behaviour

At step 3 dialog options should be: "Save and commmit", "Reset and switch", "Cancel" is displayed.

Option "Save and commmit": Saves model and displays "Commit" dialog window. After commit is made branch is switched to targeted branch. If commit is canceled

Option "Reset and switch": Displays warning dialog:

  -  "This will reset branch to the last commit been made! Are you sure?" -  with options: "Continue", "Cancel".
  - "Continue" button reverts all changes been made to model to the last commit and branch is switches to target branch selected.
 -  Option "Cancel" cancels the dialog, git branch left unchanged.

Option "Cancel" of main dialog cancels the branch switching.

Phillipus commented 5 years ago

You can use the "Abort Uncommitted Changes" option?

WatchTh1 commented 5 years ago

Didn't find this thing at first glance, sorry. Yeah, it's possible, but on my sight not "user friendly". That's why could you please consider is as improvement.

вт, 5 мар. 2019 г. в 15:41, Phil Beauvoir notifications@github.com:

You can use the "Abort Uncommitted Changes" option?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/archimatetool/archi-modelrepository-plugin/issues/87#issuecomment-469665500, or mute the thread https://github.com/notifications/unsubscribe-auth/AlIkQ3waaKRZ_34irtrtqhc7FgJo4zJAks5vTmXpgaJpZM4begNi .

Phillipus commented 5 years ago

Perhaps this is something that could be looked at in the future.

Phillipus commented 4 years ago

This is being worked on and will be in a future release.