qconfig: Can't open if whoami not set with bzr 2.2

Bug #622336 reported by Martitza
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
QBzr
Fix Released
Critical
Alexander Belchenko
0.19
Fix Released
Critical
Alexander Belchenko

Bug Description

Ok. This is irony. This happens on Windows with explorer 1.1b1

1. Log into a Windows account which has never used bzr explorer (technically, one for which 'bzr whoami {name}' has never been run)
2. Select Settings>Configuration>User Configuration ==> no dialog
3. Run Bazaar>All Commands>whoami {some name}
4. Select Settings>Configuration>User Configuration ==> works now

Perhaps bazaar explorer should detect the condition in step 2 and run an "interactive whoami" to help the user get off to a good start.

Related branches

Revision history for this message
Alexander Belchenko (bialix) wrote :

I can't reproduce this with bzr 2.1.2 + latest explorer/qbzr.

Are you using bzr 2.2.0? I suspect it may be related to the changes in 2.2.
Can you rename/delete bazaar.conf and run `bzr qconfig` from command-line and tell me if it gives some error?

Changed in bzr-explorer:
status: New → Incomplete
Revision history for this message
Gary van der Merwe (garyvdm) wrote :

Yes - this is caused by changes to bzr 2.2.

Sun 2010-08-22 19:23:53 +0200
0.069 bazaar version: 2.2.0
0.069 bzr arguments: [u'qconfig']
0.139 looking for plugins in /home/garyvdm/.bazaar/plugins
0.139 looking for plugins in /usr/lib/python2.6/dist-packages/bzrlib/plugins
0.140 Plugin name qbzr already loaded
0.242 encoding stdout as sys.stdout encoding 'UTF-8'
0.775 Traceback (most recent call last):
  File "/home/garyvdm/qbzr/loggraphprovider/lib/commands.py", line 166, in run
    ret_code = self._qbzr_run(*args, **kwargs)
  File "/home/garyvdm/qbzr/loggraphprovider/lib/commands.py", line 492, in _qbzr_run
    window = QBzrConfigWindow()
  File "/usr/lib/python2.6/dist-packages/bzrlib/lazy_import.py", line 125, in __call__
    return obj(*args, **kwargs)
  File "/home/garyvdm/qbzr/loggraphprovider/lib/config.py", line 230, in __init__
    self.load()
  File "/home/garyvdm/qbzr/loggraphprovider/lib/config.py", line 265, in load
    username = config.username()
  File "/usr/lib/python2.6/dist-packages/bzrlib/config.py", line 280, in username
    raise errors.NoWhoami()
NoWhoami: Unable to determine your name.
Please, set your name with the 'whoami' command.
E.g. bzr whoami "Your Name <email address hidden>"

affects: bzr-explorer → qbzr
Changed in qbzr:
importance: Undecided → Critical
status: Incomplete → Confirmed
summary: - Setting whoami should not be a prerequite for accesing User
- Configuration dialog
+ qconfig: Can't open if whoami not set with bzr 2.2
Changed in qbzr:
milestone: none → 0.19.1
Changed in qbzr:
milestone: 0.19.1 → 0.20b1
Revision history for this message
Martitza (martitzam) wrote : Re: [Bug 622336] [NEW] Setting whoami should not be a prerequite for accesing User Configuration dialog

Yes. It happens with bzr 2,2 and not with 2,1.

~M

On 8/22/10, Alexander Belchenko <email address hidden> wrote:
> I can't reproduce this with bzr 2.1.2 + latest explorer/qbzr.
>
> Are you using bzr 2.2.0? I suspect it may be related to the changes in 2.2.
> Can you rename/delete bazaar.conf and run `bzr qconfig` from command-line
> and tell me if it gives some error?
>
> ** Changed in: bzr-explorer
> Status: New => Incomplete
>
> --
> Setting whoami should not be a prerequite for accesing User Configuration
> dialog
> https://bugs.launchpad.net/bugs/622336
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Bazaar Explorer: Incomplete
>
> Bug description:
> Ok. This is irony. This happens on Windows with explorer 1.1b1
>
> 1. Log into a Windows account which has never used bzr explorer
> (technically, one for which 'bzr whoami {name}' has never been run)
> 2. Select Settings>Configuration>User Configuration ==> no dialog
> 3. Run Bazaar>All Commands>whoami {some name}
> 4. Select Settings>Configuration>User Configuration ==> works now
>
> Perhaps bazaar explorer should detect the condition in step 2 and run an
> "interactive whoami" to help the user get off to a good start.
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/bzr-explorer/+bug/622336/+subscribe
>

Revision history for this message
Alexander Belchenko (bialix) wrote :

The fix in the trunk is not ideal: it allows qconfig to start but on OK it saves to bazaar.conf the following line:

email = " <>"

which is clearly wrong. We rather shouldn't save anything at all.

Revision history for this message
Alexander Belchenko (bialix) wrote :

This problem also affects qcommit command.

tags: added: qcommit qconfig
Revision history for this message
Alexander Belchenko (bialix) wrote :

We should suggest using qconfig if qcommit was invoked in --ui-mode, instead of standard error message:

bzr: ERROR: Unable to determine your name.
Please, set your name with the 'whoami' command.
E.g. bzr whoami "Your Name <email address hidden>"

Changed in qbzr:
status: Confirmed → Fix Released
Revision history for this message
Alexander Belchenko (bialix) wrote :

OK, I've made changes for win32 compatibilty, now qconfig works better and warn user if there is attempt to save config without name/email information. The improvements re qcommit should be tracked as separate bug, if users really want this change.

Changed in qbzr:
assignee: nobody → Gary van der Merwe (garyvdm)
assignee: Gary van der Merwe (garyvdm) → Alexander Belchenko (bialix)
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.