[Feat] Switch to another mapset when in use (aka force remove lock) #898
Labels
enhancement
New feature or request
gsoc
Reserved for Google Summer of Code student(s)
GUI
wxGUI related
Projects
Is your feature request related to a problem? Please describe.
When there is a stale session in a mapset, i.e., mapset is locked after some non-standard end of GRASS GIS session, user needs to be able to forcibly remove the lock and switch to that mapset anyway. This is possible in the startup window. In the data tab, you get an error message which is okay for that standard case when it is really in use, but you can't resolve the situation when it is a stale session.
Describe the solution you'd like
The data catalog should inform about the mapset being in use as indicated by the presence of the lock, but offer an option to force removal of the lock and switch to the mapset anyway. The primary choice/button should be the "stay in current mapset" option.
I think the asking twice as it is now in the startup window should be removed and instead information about the lock (i.e., the possible session there) should be provided. Some code for this is already in
lib/init/grass.pyand is used when usinggrass db/loc/mapset_which_is_in_use --textin the command line (not a reusable library function, but something to copy-paste and maybe to add tograss.grassdb).This basically leads to
switch_mapset_interactively()function. Using it in the startup window instead of the current code could help in making it more generic.Describe alternatives you've considered
Additional option in the menu just to remove lock, but that's much harder to describe to the user in the GUI and it is unclear how that would/should impact cleaning of temporary files (which is something which happens during switching mapsets BTW).
Not adding the new function back to the startup window is an option, but currently it is still in use and I think there are current testing and future coding benefits to using it also in the startup (i.e., replacing and refactoring what is there).
Additional context
This seems to be the last feature present in the startup screen missing in the data catalog. I'm trying to keep a list here: #767.
The text was updated successfully, but these errors were encountered: