[merge] bzr whoami
John Arbash Meinel
john at arbash-meinel.com
Wed Jul 12 16:58:24 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robey Pointer wrote:
>
...
>> Can you add a blackbox test to make sure a warning is being printed if
>> the user doesn't supply an email address?
>
> Okay, done.
>
> http://www.lag.net/code/bzr.dev.whoami/
>
> robey
One thing I didn't catch before, arguments parsed from the command line
are in Unicode, so we get this warning:
u'foobar' doesn't seem to contain a reasonable email address
Which doesn't look very nice. (One of the consequences of our current
'use the exception as the error message' decision).
The other problem is we give a warning, but don't tell the user that we
are accepting what they wrote anyway. It was unclear when reading that
message what had happened.
So I think it would be better to do:
try:
config.extract_email_address(name)
except BzrError, e:
warning('"%s" does not seem to contain an email address.\n'
'This is allowed, but not recommended\n', name)
If you can fix this up, and update the test, I'll submit it today.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEtRwgJdeBCYSNAAMRAs2CAJ4hYD876QDuX8tn2gyimATWSyyILQCdGTpW
i5FqBMyvBQYV8M9W7tT5XFc=
=dF3a
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list