Mercurial > public > mercurial-scm > hg
diff mercurial/ui.py @ 3489:c3345b0f2fcd
Commit username: Better error message, abort on empty name, fix documentation.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Mon, 23 Oct 2006 14:56:51 +0200 |
parents | fd8f1110562c |
children | 3b07e223534b |
line wrap: on
line diff
--- a/mercurial/ui.py Sun Oct 22 21:47:37 2006 -0300 +++ b/mercurial/ui.py Mon Oct 23 14:56:51 2006 +0200 @@ -235,8 +235,13 @@ user = self.config("ui", "username") if user is None: user = os.environ.get("EMAIL") - if user is None: - raise util.Abort(_("No default username available, use -u")) + if not user: + self.status(_("Please choose a commit username to be recorded " + "in the changelog via\ncommand line option " + '(-u "First Last <email@example.com>"), in the\n' + "configuration files (hgrc), or by setting the " + "EMAIL environment variable.\n\n")) + raise util.Abort(_("No commit username specified!")) return user def shortuser(self, user):