equal
deleted
inserted
replaced
38 return path |
38 return path |
39 |
39 |
40 def userrcpath(): |
40 def userrcpath(): |
41 if pycompat.sysplatform == 'plan9': |
41 if pycompat.sysplatform == 'plan9': |
42 return [encoding.environ['home'] + '/lib/hgrc'] |
42 return [encoding.environ['home'] + '/lib/hgrc'] |
|
43 elif pycompat.sysplatform == 'darwin': |
|
44 return [os.path.expanduser('~/.hgrc')] |
43 else: |
45 else: |
44 return [os.path.expanduser('~/.hgrc')] |
46 confighome = encoding.environ.get('XDG_CONFIG_HOME') |
|
47 if confighome is None or not os.path.isabs(confighome): |
|
48 confighome = os.path.expanduser('~/.config') |
|
49 |
|
50 return [os.path.expanduser('~/.hgrc'), |
|
51 os.path.join(confighome, 'hg', 'hgrc')] |
45 |
52 |
46 def termsize(ui): |
53 def termsize(ui): |
47 try: |
54 try: |
48 import termios |
55 import termios |
49 TIOCGWINSZ = termios.TIOCGWINSZ # unavailable on IRIX (issue3449) |
56 TIOCGWINSZ = termios.TIOCGWINSZ # unavailable on IRIX (issue3449) |