Show More
@@ -345,12 +345,14 b' class ui(object):' | |||
|
345 | 345 | user = self.config("ui", "username") |
|
346 | 346 | if user is None: |
|
347 | 347 | user = os.environ.get("EMAIL") |
|
348 |
if |
|
|
348 | if user is None: | |
|
349 | 349 | try: |
|
350 | 350 | user = '%s@%s' % (util.getuser(), socket.getfqdn()) |
|
351 | self.warn(_("No username found, using '%s' instead\n") % user) | |
|
351 | 352 | except KeyError: |
|
353 | pass | |
|
354 | if not user: | |
|
352 | 355 |
|
|
353 | self.warn(_("No username found, using '%s' instead\n") % user) | |
|
354 | 356 | return user |
|
355 | 357 | |
|
356 | 358 | def shortuser(self, user): |
@@ -24,5 +24,8 b' echo 1 > asdf' | |||
|
24 | 24 | hg commit -d '1000000 0' -u "foo@bar.com" -m commit-1 |
|
25 | 25 | hg tip |
|
26 | 26 | echo 123 > asdf |
|
27 | echo "[ui]" > .hg/hgrc | |
|
28 | echo "username = " >> .hg/hgrc | |
|
29 | hg commit -d '1000000 0' -m commit-1 | |
|
27 | 30 | rm .hg/hgrc |
|
28 | 31 | hg commit -d '1000000 0' -m commit-1 2>&1 | sed -e "s/'[^']*'/user@host/" |
General Comments 0
You need to be logged in to leave comments.
Login now