If you're working n multiple terminals on the same repository, it is
often useful to know if a command you're about to run might block due to an
already-held lock on the repository. This upgrade to scm-prompt gives the
user this information.
Details
- Reviewers
stash - Group Reviewers
Restricted Project - Commits
- rFBHGXb6676a0d1298: scm-prompt: add locked state
updated the test
Diff Detail
- Repository
- rFBHGX Facebook Mercurial Extensions
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
I'm not sure if there is an easy way to fix it, but names like WDIR-LOCKED and STORE-LOCKED are quite confusing to users. Maybe simple LOCKED is clearer to users unfamiliar with hg internals, and experienced users can find out on their own whether it's wdir locked or store locked?
tests/test-scm-prompt-hg.t | ||
---|---|---|
235–238 | In that case I'd expect it to print both - "|WDIR-LOCKED|STORE-LOCKED" |
I'm not sure if there is an easy way to fix it, but names like WDIR-LOCKED and STORE-LOCKED are quite confusing to users. Maybe simple LOCKED is clearer to users unfamiliar with hg internals, and experienced users can find out on their own whether it's wdir locked or store locked?
I thought about this and I don't have a really strong reason to go one way or another. Power users will probably like this. We'll iterate if there's confusion.
tests/test-scm-prompt-hg.t | ||
---|---|---|
235–238 | Because of lock ordering, the WDIR will always be locked when the STORE is locked, so I don't think it adds much value. |
In that case I'd expect it to print both - "|WDIR-LOCKED|STORE-LOCKED"