Clarify uses of cli.Application.lock context manager
Inventory of lock types:
- Global
- Backport
- MediaWiki staging directory
- Scap3 deploy repo
The global and scap backport
lockfiles are specific hard-coded paths.
Locking for mediawiki staging and scap3 deploy repos used a single
get_lock_file()
method to handle both cases. The logic of that
method allowed for the case where if your current directory is a git
repo configured for scap3 deployment, and you ran scap sync-world
,
the wrong lock file would be used (the deployment repo would be locked
instead of the MediaWiki staging directory).
This commit separates the methods for retrieving the mediawiki staging
lockfile and a scap3 deploy repo's lockfile.
The scap lock
command retains its legacy behavior of determining
what you want to lock based on what directory you're in. If you're in
a repo directory configured for scap deploy
, it will lock that repo
(by its name). Otherwise it will lock the MediaWiki staging
directory.
Related MRs:
- !517 (merged)
- !516 (merged)
- !515 (merged) (This MR)
- master