comparison mercurial/ui.py @ 16940:6409a5c75125

ui: lowercase "no username" warning
author Martin Geisler <mg@aragost.com>
date Tue, 12 Jun 2012 14:18:18 +0200
parents fa91ddfc3f36
children fba17a64fa49
comparison
equal deleted inserted replaced
16939:fa91ddfc3f36 16940:6409a5c75125
407 if user is None and self.configbool("ui", "askusername"): 407 if user is None and self.configbool("ui", "askusername"):
408 user = self.prompt(_("enter a commit username:"), default=None) 408 user = self.prompt(_("enter a commit username:"), default=None)
409 if user is None and not self.interactive(): 409 if user is None and not self.interactive():
410 try: 410 try:
411 user = '%s@%s' % (util.getuser(), socket.getfqdn()) 411 user = '%s@%s' % (util.getuser(), socket.getfqdn())
412 self.warn(_("No username found, using '%s' instead\n") % user) 412 self.warn(_("no username found, using '%s' instead\n") % user)
413 except KeyError: 413 except KeyError:
414 pass 414 pass
415 if not user: 415 if not user:
416 raise util.Abort(_('no username supplied (see "hg help config")')) 416 raise util.Abort(_('no username supplied (see "hg help config")'))
417 if "\n" in user: 417 if "\n" in user: