mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.43k stars 1.27k forks source link

Automated user controller mapping version control? #12776

Open mxmilkiib opened 7 months ago

mxmilkiib commented 7 months ago

Feature Description

Certainly not trivial I'd think, but it would be very handy, a form of backup.

Maybe each gets a subdir that has git initiated in it, with automatic commits on each change?

Maybe automated squishing for the end of a session (or for every hour in a session, idk)?

Swiftb0y commented 7 months ago

I don't think shipping a full blown VCS along with mixxx (or even just interacting with it) makes sense. I think it should be up to the user to decide on how they want to version their mappings (some people just copy paste files, other use proper VCS's), forcing something on them doesn't make sense. Even the people that do use VCS's will probably get annoyed when mixxx messes with it implicitly.

I appreciate your suggestion but I don't think it make sense in mixxx from a general point of view.

Maybe we can find a better solution if you describe some of your usecases. Why would mixxx need to do an automated backup of mappings?

mxmilkiib commented 7 months ago

I don't think shipping a full blown VCS along with mixxx (or even just interacting with it) makes sense. ... I don't think it make sense in mixxx from a general point of view.

When a user starts to make a new mapping, it's based on a copy of the original map files, so what they have access to edit is everything; both default and custom maps jumbled together (#12670), and, if by accident they delete, overwrite or amend the wrong mapping entry, especially if that accident was missed at first, they very well may struggle to fix/restore things to how they were before.

That, imo, makes mapping configurations fragile. Even I always have a modicum of "be bloody careful/mindful here, you could overwrite something, like doing multiple library things and in that process accidentally changing a track star rating by accident then losing track and not knowing what track or what rating it was." in my mind when editing mappings via the GUI. I ended up starting a git repo just to

I don't think shipping a full blown VCS along with mixxx

I'd guess there are options between nothing and a full blown VCS, maybe some system like Klunok, maybe just a set of historical backup copies that are added to and removed from on some kind of schedule or such?

Even the people that do use VCS's will probably get annoyed when mixxx messes with it implicitly.

It could be opt-in. Primaraly it would be orientated towards someone who doesn't understand the command-line.

daschuer commented 7 months ago

I can confirm the issue in general.

The user wants an undo/redo feature. It can be solved by making the controller folder a check-in folder. Mixxx may use its own "working" copy when running. After restart or a changes are detected, Mixxx may copy the file found (which may be under version control of users choice) into its working copy folder and append a version suffix. Just a integer number like we do for the mixxx.log file.

This way have a redo/undo chain an the main issue is solved.

It would be possible to use git for it, but it is difficult to clear out old mess.

daschuer commented 7 months ago

A first step would be to copy the logic from mixxx.log https://github.com/mixxxdj/mixxx/blob/b67d216702d9b2fe98de4b34ce7251055d87fb35/src/util/logging.cpp#L223 to the file watcher which is implemented here: https://github.com/mixxxdj/mixxx/blob/b67d216702d9b2fe98de4b34ce7251055d87fb35/src/controllers/scripting/controllerscriptenginebase.cpp#L64