OpenNeuroOrg / openneuro

A free and open platform for analyzing and sharing neuroimaging data
https://openneuro.org/
MIT License
111 stars 39 forks source link

Add ability to revert draft of dataset to most recent snapshot #547

Open jbwexler opened 6 years ago

jbwexler commented 6 years ago

If I accidentally delete a large directory in a draft, it would be a major hassle to reupload the directory. The ability to revert to a snapshot could potentially save lots of time. I'm sure there are many other instances in which this would be useful.

If we wanted to get really fancy, drafts could function like a google doc and have a history of changes that could be reverted to. It's probably not worth the hassle to build that though... But perhaps the ability to undo/redo a single change would worth having?

nellh commented 6 years ago

This will be pretty easy to build on top of the new backend in #331 - since we'll be able to rely on git-annex to generate diffs and reset the draft to a tag. The 'revert to snapshot' flow would show you a diff of the changes being made, ask you to confirm it, and run git reset on the working tree when confirmed.

Per change undo/redo could also be added on top of that by making a commit for each change but we would need to explore the impact of that.