On Tue, Jun 22, 2010 at 04:18:29PM +0200, Gour wrote: > I've created a new 'bug' with: > > be new -r "Gour <[email protected]>" "author test" > > and 'be show' displays: > > Reporter : Gour <[email protected]> > Creator : gour <g...@gaura-nitai> > > so I wonder why it's not the same and, assuming that 'gour' in > 'Creator' line comes from my uid (bug.creator = self._get_user_id()),
Your assumption is correct. gaura-nitai comes from socket.gethostname()
via libbe.ui.util.get_fallback_email().
> I wonder if do you plan to provide option for it (similar to '-r')
Added -c/--creator just now:
wk...@thialfi be $ ./be new -c 'I made it!' testing
Created bug with ID bea/3de
wk...@thialfi be $ ./be show /3de
ID : 3ded9f33-e5c7-41b2-9400-9cf85f8f1d9c
Short name : bea/3de
Severity : minor
Status : open
Assigned :
Reporter : I made it!
Creator : I made it!
Created : Tue, 22 Jun 2010 11:07 (Tue, 22 Jun 2010 15:07:34 +0000)
testing
> and/or some .berc or something so that user can pick some reasonable
> defaults, e.g. email etc. ?
call stack
libbe.command.base.UserInterface._get_user_id()
libbe.ui.util.user.get_user_id(storage)
which had the docstring:
"""Return a user ID, checking a list of possible sources.
The source order is:
1. Global BE configuration.
2. `storage.get_user_id`, if that function is defined.
3. :func:`get_fallback_username` and :func:`get_fallback_email`.
Notes
-----
Sometimes the storage will keep track of the user ID (e.g. most
VCSs, see :meth:`libbe.storage.vcs.base.VCS.get_user_id`). If so,
we prefer that ID to the fallback, since the user has likely
configured it directly.
"""
see
http://www.physics.drexel.edu/~wking/code/be/doc/libbe/libbe.ui.util.user.html#libbe.ui.util.user.get_user_id
The global config business was not so well documented (I just added a
bit more detail), but you can see from the
libbe.ui.util.user.get_user_id()
that it was looking for the value of 'user' in the 'DEFAULT' section.
From
libbe.storage.util.config.get_val()
we see that the config file path comes from
libbe.storage.util.config.path()
which returns
os.path.expanduser("~/.bugs_everywhere")
So if you wanted to override your username without setting it in your
VCS (still the recommended method), you could add
user = Your Name <yourem...@wherever>
to ~/.bugs_everywhere.
--
This email may be signed or encrypted with GPG (http://www.gnupg.org).
The GPG signature (if present) will be attached as 'signature.asc'.
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
My public key is at http://www.physics.drexel.edu/~wking/pubkey.txt
pgpr1A3WDVXEy.pgp
Description: PGP signature
_______________________________________________ Be-devel mailing list [email protected] http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
