perfact / zodbsync

Dump and restore objects between a ZODB and a serialized file system structure
GNU General Public License v2.0
12 stars 5 forks source link

New subcommand: exec #70

Closed viktordick closed 3 years ago

viktordick commented 3 years ago

Is your feature request related to a problem? Please describe. There is a repeating pattern in some subcommands that would also repeat for some of the other ideas that I have for more subcommands: Check the current commit ID, do some git operation, check the files that were touched by this git operation and play them back. Something like this is used by pick and reset and I was thinking about implementing a revert that would also do the same.

Describe the solution you'd like If the above pattern is used by one specific subcommand, we no longer need to wrap every useful git command separately. This would allow something like

zodbsync exec "git checkout other-branch"
zodbsync exec "git revert my-broken-commit"
zodbsync exec "git reset --hard prod/master"

The rollback-mechanism including stashing and conflict checking with unstaged files must be ensured to still work.

viktordick commented 3 years ago

Implemented in #71