Mercurial > hg
comparison mercurial/ui.py @ 21955:6dfb78f18bdb stable
config: allow 'user' in .hgrc ui section (issue3169)
author | anatoly techtonik <techtonik@gmail.com> |
---|---|
date | Sat, 26 Jul 2014 09:27:11 +0300 |
parents | 9336bc7dca8e |
children | 9fa429723f26 |
comparison
equal
deleted
inserted
replaced
21954:838025b15925 | 21955:6dfb78f18bdb |
---|---|
435 If not found and ui.askusername is True, ask the user, else use | 435 If not found and ui.askusername is True, ask the user, else use |
436 ($LOGNAME or $USER or $LNAME or $USERNAME) + "@full.hostname". | 436 ($LOGNAME or $USER or $LNAME or $USERNAME) + "@full.hostname". |
437 """ | 437 """ |
438 user = os.environ.get("HGUSER") | 438 user = os.environ.get("HGUSER") |
439 if user is None: | 439 if user is None: |
440 user = self.config("ui", "username") | 440 user = self.config("ui", ["username", "user"]) |
441 if user is not None: | 441 if user is not None: |
442 user = os.path.expandvars(user) | 442 user = os.path.expandvars(user) |
443 if user is None: | 443 if user is None: |
444 user = os.environ.get("EMAIL") | 444 user = os.environ.get("EMAIL") |
445 if user is None and self.configbool("ui", "askusername"): | 445 if user is None and self.configbool("ui", "askusername"): |