bzr blame gives error if user has not done 'bzr whoami'

Bug #667408 reported by Peter Maydell on 2010-10-27
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jonathan Riddell
bzr (Ubuntu)

Bug Description

Binary package hint: bzr

Package: bzr
Version: 2.2.0-1
Ubuntu version: 10.10

If you try to use 'bzr blame' and you haven't used 'bzr whoami' to tell bzr who you are then it complains. Actual behaviour:

petmay01@LinaroE102767:~/linaro/snapshot/linaro-image-tools$ bzr blame linaro-media-create
bzr: ERROR: Unable to determine your name.
Please, set your name with the 'whoami' command.
E.g. bzr whoami "Your Name <email address hidden>"

The expected behaviour is that it should give you the annotated file the same way it does once you have done 'bzr whoami', rather than a fatal error.

There shouldn't be any reason for bzr to need to know who the local user is in order to do 'blame' annotation, any more than it does for 'bzr log'. I'm guessing that the reason this happens is that bzr wants to know how to annotate local uncommitted changes, but it would be more user friendly to just annotate these as "[local user]" or something similar rather than just refuse to do anything.

Related branches

Martin Pool (mbp) wrote :

Thanks for the report. There are other similar bugs in other commands.

Perhaps we should check for a 'reliable' user id only in commit?

Changed in bzr (Ubuntu):
status: New → Confirmed
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed

Hash: SHA1

On 10/28/2010 7:16 AM, Martin Pool wrote:
> Thanks for the report. There are other similar bugs in other commands.
> Perhaps we should check for a 'reliable' user id only in commit?

I believe the trigger is that bzr wants to be able to annotate the
working copy for any changes relative to the basis, and be able to label
those lines as modified by you.

We could fall back to something else if we can't determine a valid "whoami".

Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla -


Jesse Katzman (j-kat) wrote :

I'm going to make a guess: is this because calling annotate locks the file, and locking requires writing information (including whoami) to a temporary file?

Jelmer Vernooij (jelmer) wrote :

bzr needs whoami information to generate metadata for the working tree.

Jelmer Vernooij (jelmer) on 2011-02-01
tags: added: annotate whoami
Martin Pool (mbp) on 2011-03-18
tags: added: affects-linaro
Vincent Ladeuil (vila) on 2011-06-15
Changed in bzr:
assignee: nobody → Jonathan Riddell (jr)
milestone: none → 2.4b4
status: Confirmed → Fix Released
Jelmer Vernooij (jelmer) on 2011-06-16
Changed in bzr (Ubuntu):
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bzr - 2.4.0~beta4-1ubuntu1

bzr (2.4.0~beta4-1ubuntu1) oneiric; urgency=low

  * Merge from Debian.

bzr (2.4.0~beta4-1) unstable; urgency=low

  * New upstream release.
   + Using "bzr blame" no longer requires user to set identity. LP: #667408
  * Bump standards version to 3.9.2 (no changes).

bzr (2.4.0~beta3-2) unstable; urgency=low

  * Add 04_fix_undecodable_argv; cope with $HOME not existing on some
    buildd machines.

bzr (2.4.0~beta3-1) unstable; urgency=low

  * New upstream release.
   + Requires at least Python 2.6 or higher.
   + Fixes permissions on directories in zip files. LP: #207253
   + Prints proper error when encountering encoding-invalid characters in
     commit messages on the commandline. LP: #745712
   + Drop patches merged upstream: 04_auto_user_id_test_fix,
  * Add upper bound version dependency on python-bzrlib in bzr.
    LP: #778696

bzr (2.4.0~beta2-3) unstable; urgency=low

  * Upload to unstable.
  * Update 05_fix_locale_test to cope with home directory not existing.
 -- Jelmer Vernooij <email address hidden> Fri, 17 Jun 2011 12:30:59 +0200

Changed in bzr (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers