equal
deleted
inserted
replaced
233 user = os.environ.get("HGUSER") |
233 user = os.environ.get("HGUSER") |
234 if user is None: |
234 if user is None: |
235 user = self.config("ui", "username") |
235 user = self.config("ui", "username") |
236 if user is None: |
236 if user is None: |
237 user = os.environ.get("EMAIL") |
237 user = os.environ.get("EMAIL") |
238 if user is None: |
238 if not user: |
239 raise util.Abort(_("No default username available, use -u")) |
239 self.status(_("Please choose a commit username to be recorded " |
|
240 "in the changelog via\ncommand line option " |
|
241 '(-u "First Last <email@example.com>"), in the\n' |
|
242 "configuration files (hgrc), or by setting the " |
|
243 "EMAIL environment variable.\n\n")) |
|
244 raise util.Abort(_("No commit username specified!")) |
240 return user |
245 return user |
241 |
246 |
242 def shortuser(self, user): |
247 def shortuser(self, user): |
243 """Return a short representation of a user name or email address.""" |
248 """Return a short representation of a user name or email address.""" |
244 if not self.verbose: user = util.shortuser(user) |
249 if not self.verbose: user = util.shortuser(user) |