ugly error message when dirstate lock is already active
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Unassigned | ||
Breezy |
Triaged
|
Medium
|
Unassigned |
Bug Description
[Problem]
bzr diff gives the following nasty looking error if done while in the middle of a bzr --commit operation:
bzr: ERROR: Could not acquire lock "[Errno 11] Resource temporarily unavailable"
/usr/lib/
warn("lock on %r not released" % self.f)
[Discussion]
Frequently when I'm writing my commit message in emacs, I want to refer to the diff so I can remind myself of exactly what I'd done. So, I ctrl-z to background the editor and run 'bzr diff' to see.
I guess I'm used to doing this in other version control systems, but in bzr unfortunately it doesn't seem to work. This error gets printed instead:
bryce@blackwold
Committing to: /home/bryce/
modified contrib/new-bugs.py
[1]+ Stopped bzr commit
bryce@blackwold
bzr: ERROR: Could not acquire lock "[Errno 11] Resource temporarily unavailable"
/usr/lib/
warn("lock on %r not released" % self.f)
bryce@blackwold
Now, I know that I can do `bzr commit --show-diff`, and that's a more than adequate workaround for the problem itself, however the error message is pretty disconcerting if you're new to bzr and don't yet know about the --show-diff option.
Now, it would be ideal if one could safely use bzr diff while a bzr commit was in progress. But maybe that's not feasible for whatever reason. But at least please improve the error message! I would recommend something along the lines of:
bzr: ERROR: Could not perform diff while repository locked.
(Are you in the middle of a commit and need to see a diff? Try `bzr commit --show-diff`.)
[Workaround]
Add to your ~/.bazaar/
[ALIASES]
commit=commit --show-diff
description: | updated |
summary: |
- bzr diff while in middle of a bzr commit gives an ugly error message + bzr diff while in middle of a bzr commit complains about locking |
tags: | added: dirstate ui |
tags: | added: check-for-breezy |
tags: |
added: confusing-ui removed: check-for-breezy |
affects: | bzr → brz |
affects: | brz → bzr |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → Medium |
This is a known bug - I think its a dup.
Anyhow, --show-diff on the commit line will include the diff for you.
-Rob