Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 3466:8b55c0ba8048
makes username mandatory
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Wed, 18 Oct 2006 22:24:03 +0200 |
parents | 5ee5a0fec904 |
children | fd8f1110562c |
line wrap: on
line diff
--- a/mercurial/ui.py Wed Oct 18 10:37:34 2006 -0700 +++ b/mercurial/ui.py Wed Oct 18 22:24:03 2006 +0200 @@ -226,10 +226,8 @@ Searched in this order: $HGUSER, [ui] section of hgrcs, $EMAIL and stop searching if one of these is set. - Abort if found username is an empty string to force specifying - the commit user elsewhere, e.g. with line option or repo hgrc. - If not found, use ($LOGNAME or $USER or $LNAME or - $USERNAME) +"@full.hostname". + Abort if no username is found, to force specifying the commit user + with line option or repo hgrc. """ user = os.environ.get("HGUSER") if user is None: @@ -237,10 +235,7 @@ if user is None: user = os.environ.get("EMAIL") if user is None: - try: - user = '%s@%s' % (util.getuser(), socket.getfqdn()) - except KeyError: - raise util.Abort(_("Please specify a username.")) + raise util.Abort(_("No default username available, use -u")) return user def shortuser(self, user):