bzr whoami should print error if both username and --email were specified

Bug #680449 reported by Paul Sladen
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Jelmer Vernooij

Bug Description

Doing:

  bzr whoami --email <email address hidden> 'Paul Sladen'
  bzr whoami 'Paul Sladen' --email <email address hidden>

both give an error:

  bzr: ERROR: extra argument to command whoami:

Okay, fair enough, lets let them one-by-one:

  bzr whoami --email <email address hidden>

however, the output from:

  bzr whoami
  <email address hidden>

then shows that both the clear name and email have been set, despite only being passed --email.

Ideally input and output would have self-consistency.

Tags: easy

Related branches

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

As indicated by --help, "bzr whoami --email" will only extract and print the current users email address.

"bzr whoami 'Paul Sladen <email address hidden>'" should set your identity.

"bzr whoami --email <email address hidden>" should print an error rather than ignoring --email as it seems to do at the moment.

summary: - bzr whoami --email interaction not consistent
+ bzr whoami should print error if both username and --email were
+ specified
Changed in bzr:
status: New → Confirmed
importance: Undecided → Low
tags: added: easy
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Related to bug #272005

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 680449] [NEW] bzr whoami --email interaction not consistent

I'm very sure neither invocation set your whoami for bzr. Its bailing
out in option processing, as appropriate.

bzr whoami --email
 *reports*
bzr whoami 'Paul Sladen <email address hidden>'
would set it

and both are described in the help.

Revision history for this message
Paul Sladen (sladen) wrote :

$ bzr whoami
Paul Sladen <ubuntu@p.s.org>
$ bzr whoami --email '<email address hidden>'
$ bzr whoami
<email address hidden>

Note the successful, error free setting (and the none-display) of the name after the latter invocation.

Jelmer Vernooij (jelmer)
Changed in bzr:
status: Confirmed → In Progress
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in bzr:
status: In Progress → Fix Released
milestone: none → 2.4b1
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.