archimatetool / archi-modelrepository-plugin

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

Create "Abort changes" action #17

Closed Phillipus closed 7 years ago

Phillipus commented 7 years ago

This action allows the user to undo any locally made but unpublished changes. An update is provided if changes have been made by other users to the model repository. Technically the update is a "git reset".

Phillipus commented 7 years ago

Does this require a new toolbar icon?

jbsarrodie commented 7 years ago

I'd say yes.

Phillipus commented 7 years ago

We need to be clear what we mean by "unpublished changes".

jbsarrodie commented 7 years ago

Local changes to the archimate.temp file and/or grafico files.

Yes, I agree on this.

Commits that have not been pushed. I'd say no, because this is covered in #16

Interresting remark. I would have said "yes" because IMO in #16, "Revert a commit" means keeping the commit in the history be undo changes with another commit, while here as nothing has been pushed we can just "roll back" without any trace in the commit history.

Phillipus commented 7 years ago

Yes, but roll back to what? All unpushed commits? The last one? The branch? If so, it would require a UI of the commit history to allow the user to be sure.

jbsarrodie commented 7 years ago

Yes, but roll back to what?

My answer would be "All unpushed commits". But I agree this requires to be able to show the list to the user to avoid any issue.

So... Let's do it step by step. In this issue let's limit ourselves to undoing only local changes to the .archimate file and working tree.

Phillipus commented 7 years ago

Agreed. When we have a commit history view and associated actions we will have a better idea of how these actions work together.

Phillipus commented 7 years ago

1st implementation.

Phillipus commented 7 years ago

We can change this to roll back any unpushed commits now. Shall we do that?

jbsarrodie commented 7 years ago

I m not sure to understand the difference... Is it only a different way to do the same thing or does this lead to a different result ?

Phillipus commented 7 years ago

At the moment this action will clear any staged, deleted and new (grafico) files that have not been committed. The other option is to do that and roll back any unpushed commits.

In reference to this:

My answer would be "All unpushed commits". But I agree this requires to be able to show the list to the user to avoid any issue.

jbsarrodie commented 7 years ago

The other option is to do that and roll back any unpushed commits.

Would it be done through a reset to origin/master or ? And is it now possible to show the comments associated to those local commits ?

Phillipus commented 7 years ago

Would it be done through a reset to origin/master?

Yes

And is it now possible to show the comments associated to those local commits?

Come back in an another hour.... ;-)

jbsarrodie commented 7 years ago

Mmmm, let me think about it. I've just played a bit with the revert actions and I might have some remarks that impact this action.