Mercurial > hg
comparison mercurial/crecord.py @ 24316:d61aa383e2e5
crecord: fix underbar style for orig_stdout
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 16 Mar 2015 13:23:42 -0500 |
parents | 7d5f935bd705 |
children | f559cae7892f |
comparison
equal
deleted
inserted
replaced
24315:7d5f935bd705 | 24316:d61aa383e2e5 |
---|---|
29 except NameError: | 29 except NameError: |
30 raise util.Abort( | 30 raise util.Abort( |
31 _('the python curses/wcurses module is not available/installed')) | 31 _('the python curses/wcurses module is not available/installed')) |
32 | 32 |
33 | 33 |
34 orig_stdout = sys.__stdout__ # used by gethw() | 34 _origstdout = sys.__stdout__ # used by gethw() |
35 | 35 |
36 | 36 |
37 | 37 |
38 class patchnode(object): | 38 class patchnode(object): |
39 """abstract class for patch graph nodes | 39 """abstract class for patch graph nodes |
465 useful / necessary because otherwise curses.initscr() must be called, | 465 useful / necessary because otherwise curses.initscr() must be called, |
466 which can leave the terminal in a nasty state after exiting. | 466 which can leave the terminal in a nasty state after exiting. |
467 | 467 |
468 """ | 468 """ |
469 h, w = struct.unpack( | 469 h, w = struct.unpack( |
470 "hhhh", fcntl.ioctl(orig_stdout, termios.TIOCGWINSZ, "\000"*8))[0:2] | 470 "hhhh", fcntl.ioctl(_origstdout, termios.TIOCGWINSZ, "\000"*8))[0:2] |
471 return h, w | 471 return h, w |
472 | 472 |
473 | 473 |
474 def chunkselector(headerlist, ui): | 474 def chunkselector(headerlist, ui): |
475 """ | 475 """ |