Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Switch to another mapset when in use (aka force remove lock) #898

Closed
wenzeslaus opened this issue Aug 12, 2020 · 0 comments · Fixed by #906
Closed

[Feat] Switch to another mapset when in use (aka force remove lock) #898

wenzeslaus opened this issue Aug 12, 2020 · 0 comments · Fixed by #906
Assignees
Labels
enhancement New feature or request gsoc Reserved for Google Summer of Code student(s) GUI wxGUI related

Comments

@wenzeslaus
Copy link
Member

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.py and is used when using grass db/loc/mapset_which_is_in_use --text in the command line (not a reusable library function, but something to copy-paste and maybe to add to grass.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.

@wenzeslaus wenzeslaus added enhancement New feature or request GUI wxGUI related gsoc Reserved for Google Summer of Code student(s) labels Aug 12, 2020
@wenzeslaus wenzeslaus added this to To do in New GUI Startup via automation Aug 12, 2020
@wenzeslaus wenzeslaus moved this from To do to Issues in progress in New GUI Startup Aug 16, 2020
New GUI Startup automation moved this from Issues in progress to Done Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gsoc Reserved for Google Summer of Code student(s) GUI wxGUI related
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants