bzr-email fails if committer has non-ascii gecos
Glenn Morris
rgm at gnu.org
Tue Aug 27 20:48:15 UTC 2013
Hi,
I noticed that Savannah's bzr-email failed to send an email for one
particular commit. The commit worked ok, it was just the email that
failed. Checking the server log (traceback at the end of this message),
I see what looks like
https://bugs.launchpad.net/bzr/+bug/659763
(supposedly fixed in bzr 2.3.4; this is bzr 2.6b2).
The user does have whoami set; at least bzr log tells me so:
revno: 113996
committer: Vincent ... at users.sourceforge.net>
Short of asking the user to change his real name on his Savannah
account, is there any way to work around this?
(Maybe some way to convince osutils.get_user_encoding() to return
'utf-8' rather than ascii?)
TIA for any help.
0.075 bazaar version: 2.6b2
0.075 bzr arguments: [u'serve', u'--client-timeout=3600', u'--inet',
u'--directory=/srv/bzr', u'--allow-writes']
0.084 looking for plugins in
/usr/lib/python2.6/dist-packages/bzrlib/plugins
0.116 encoding stdout as osutils.get_user_encoding() 'ascii'
3.017 cannot decode passwd entry pwd.struct_passwd(pw_name='vincentb1',
pw_passwd='x', pw_uid=XXXX, pw_gid=XXXX, pw_gecos='Vincent
Bela\xefche', pw_dir='/srv', pw_shell='/usr/local/bin/sv_membersh')
4.702 size: 275709, z_size: 66335
9.890 cannot decode passwd entry pwd.struct_passwd(pw_name='vincentb1',
pw_passwd='x', pw_uid=XXXX, pw_gid=XXXX, pw_gecos='Vincent
Bela\xefche', pw_dir='/srv', pw_shell='/usr/local/bin/sv_membersh')
10.069 cannot decode passwd entry
pwd.struct_passwd(pw_name='vincentb1', pw_passwd='x', pw_uid=XXXX,
pw_gid=XXXX, pw_gecos='Vincent Bela\xefche', pw_dir='/srv',
pw_shell='/usr/local/bin/sv_membersh')
10.243 Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/bzrlib/smart/request.py", line
358, in _call_converting_errors
return callable(*args, **kwargs)
File "/usr/lib/python2.6/dist-packages/bzrlib/smart/request.py", line
143, in execute
return self.do(*args)
File "/usr/lib/python2.6/dist-packages/bzrlib/smart/branch.py", line
54, in do
return self.do_with_branch(branch, *args)
File "/usr/lib/python2.6/dist-packages/bzrlib/smart/branch.py", line
74, in do_with_branch
return self.do_with_locked_branch(branch, *args)
File "/usr/lib/python2.6/dist-packages/bzrlib/smart/branch.py", line
263, in do_with_locked_branch
return self.do_tip_change_with_locked_branch(branch, *args)
File "/usr/lib/python2.6/dist-packages/bzrlib/smart/branch.py", line
369, in do_tip_change_with_locked_branch
branch.set_last_revision_info(int(new_revno), new_last_revision_id)
File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line
218, in write_locked
result = unbound(self, *args, **kwargs)
File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2472,
in set_last_revision_info
self._run_post_change_branch_tip_hooks(old_revno, old_revid)
File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 1203,
in _run_post_change_branch_tip_hooks
hook(params)
File
"/usr/lib/python2.6/dist-packages/bzrlib/plugins/email/__init__.py",
line 93, in branch_post_change_hook
params.branch.get_config_stack(), local_branch=None,
op='change').send_maybe()
File
"/usr/lib/python2.6/dist-packages/bzrlib/plugins/email/emailer.py",
line 276, in send_maybe
if self.should_send():
File
"/usr/lib/python2.6/dist-packages/bzrlib/plugins/email/emailer.py",
line 273, in should_send
return bool(self.to() and self.from_address())
File
"/usr/lib/python2.6/dist-packages/bzrlib/plugins/email/emailer.py",
line 183, in from_address
result = self.config.get('email')
File "/usr/lib/python2.6/dist-packages/bzrlib/config.py", line 3703,
in get
value = opt.get_default()
File "/usr/lib/python2.6/dist-packages/bzrlib/config.py", line 2398,
in get_default
value = self.default()
File "/usr/lib/python2.6/dist-packages/bzrlib/config.py", line 1596,
in default_email
raise errors.NoWhoami()
NoWhoami: Unable to determine your name.
Please, set your name with the 'whoami' command.
E.g. bzr whoami "Your Name <name at example.com>"
10.775 return code 0
More information about the bazaar
mailing list