confusing message (or no message) if unable to open ~/.bzr.log

Bug #354843 reported by Jonathan Davies
22
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

Bazaar should check if the user owns the ~/.bzr.log file and report an error if this is not the case, instead of just displaying the error: 'No handlers could be found for logger "bzr"'. For example:

$ bzr ci
No handlers could be found for logger "bzr"
[24096] 2009-04-03 23:49:35.225 INFO: Committing to: /home/jpds/tmp/u-d-t/ubuntu-dev-tools
Committing to: /home/jpds/tmp/u-d-t/ubuntu-dev-tools
[24096] 2009-04-03 23:49:35.253 INFO: modified TODO
modified TODO
[24096] 2009-04-03 23:50:10.122 INFO: Committed revision 373.
Committed revision 373.

It took me a while to realize that this was because I'd use etckeeper+bzr with sudo earlier and root had ownership of my user's ~/.bazaar directory and ~/.bzr.log file.

This is using the latest bzr package on Jaunty.

Tags: easy trace
Jelmer Vernooij (jelmer)
Changed in bzr:
importance: Undecided → Medium
status: New → Triaged
Martin Pool (mbp)
summary: - Bzr should be smart about who owns ~/.bzr.log
+ better handle failure to open ~/.bzr.log - Bzr should be smart about who
+ owns ~/.bzr.log
Andrew Bennetts (spiv)
tags: added: easy
Revision history for this message
Martin Pool (mbp) wrote : Re: better handle failure to open ~/.bzr.log - Bzr should be smart about who owns ~/.bzr.log

With https://code.edge.launchpad.net/~mbp/bzr/remove-logging/+merge/14942 landed, you won't see precisely the same symptoms, however we should check what does happen.

Revision history for this message
Martin Pool (mbp) wrote :

You now get:

mbp@grace% HOME=/ ~/bzr/remove-logging/bzr st
bzr: ERROR: [Errno 13] Permission denied: '/.bazaar'
bzr: warning: some compiled extensions could not be loaded; see <https://answers.launchpad.net/bzr/+faq/703>

and obviously just nothing is written to it.

I don't know if this is ideal but it's not as confusing as the previous behaviour. Would people actually prefer a warning about it?

tags: added: trace
summary: - better handle failure to open ~/.bzr.log - Bzr should be smart about who
- owns ~/.bzr.log
+ confusing message (or no message) if unable to open ~/.bzr.log
Changed in bzr:
status: Triaged → Confirmed
importance: Medium → Low
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.