equal
deleted
inserted
replaced
39 if sys.platform == 'plan9': |
39 if sys.platform == 'plan9': |
40 return [encoding.environ['home'] + '/lib/hgrc'] |
40 return [encoding.environ['home'] + '/lib/hgrc'] |
41 else: |
41 else: |
42 return [os.path.expanduser('~/.hgrc')] |
42 return [os.path.expanduser('~/.hgrc')] |
43 |
43 |
44 def termwidth(): |
44 def termwidth(ui): |
45 try: |
45 try: |
46 import array |
46 import array |
47 import termios |
47 import termios |
48 for dev in (sys.stderr, sys.stdout, sys.stdin): |
48 for dev in (ui.ferr, ui.fout, ui.fin): |
49 try: |
49 try: |
50 try: |
50 try: |
51 fd = dev.fileno() |
51 fd = dev.fileno() |
52 except AttributeError: |
52 except AttributeError: |
53 continue |
53 continue |