Show More
@@ -41,11 +41,11 b' def userrcpath():' | |||||
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 ( |
|
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() |
@@ -53,5 +53,5 b' def userrcpath():' | |||||
53 | path.append(os.path.join(userprofile, '.hgrc')) |
|
53 | path.append(os.path.join(userprofile, '.hgrc')) | |
54 | return path |
|
54 | return path | |
55 |
|
55 | |||
56 | def termwidth(): |
|
56 | def termwidth(ui): | |
57 | return win32.termwidth() |
|
57 | return win32.termwidth() |
@@ -822,7 +822,7 b' class ui(object):' | |||||
822 | return int(encoding.environ['COLUMNS']) |
|
822 | return int(encoding.environ['COLUMNS']) | |
823 | except ValueError: |
|
823 | except ValueError: | |
824 | pass |
|
824 | pass | |
825 | return scmutil.termwidth() |
|
825 | return scmutil.termwidth(self) | |
826 |
|
826 | |||
827 | def formatted(self): |
|
827 | def formatted(self): | |
828 | '''should formatted output be used? |
|
828 | '''should formatted output be used? |
General Comments 0
You need to be logged in to leave comments.
Login now