Commit Graph

12 Commits

Author SHA1 Message Date
Laurent Charignon
ff5c5b9b22 record_curses: fix ui bug for newly added file
With record's curses interface toggling and untoggling a newly added
file would lead to a confusing UI (the header was marked as partial
and the hunks as unselected). Tested additionally using the curses
interface with newly added, removed and modified files in a test repo.
2015-03-27 14:11:13 -07:00
Matt Harbison
ca3f9b0788 crecord: don't abort on Windows when curses isn't available
This is the hack portion of the previous patch, which can be backed out once we
figure out how to deal with curses.  Without this, the tests affected by the
import problem mentioned in the previous patch fail in exactly the same way, but
with the nicer 'module not available' error.
2015-03-20 23:35:13 -04:00
Matt Harbison
430072a9cc crecord: conditionalize the imports that are not available on Windows
'fcntl', 'termios' and 'wcurses' are not available on the default Windows python
installation, and importing them caused widespread carnage in the test suite.
There were 29 different changed test files (on top of unrelated errors), mostly
in the form of an ImportError.

The failures weren't related to actual crecord use, and followed the import
chain:

    'localrepo' -> 'subrepo' -> 'cmdutil' -> 'crecord' -> 'fcntl'
2015-03-20 23:32:00 -04:00
Matt Mackall
4d6168b480 crecord: use colwidth instead of ucolwidth 2015-03-18 13:38:06 -05:00
Laurent Charignon
ef841f66d2 record: change arguments of curses recording function
This way the arguments are the same for both curses and non-curses versions.
2015-03-13 10:51:25 -07:00
Matt Mackall
67ef525318 crecord: fix another underbar 2015-03-16 13:32:28 -05:00
Matt Mackall
ac77e7555a crecord: fiddle with vertical whitespace 2015-03-16 13:25:19 -05:00
Matt Mackall
0827849b4a crecord: fix underbar style for orig_stdout 2015-03-16 13:23:42 -05:00
Matt Mackall
3f4a5ca441 crecord: use encoding.ucolwidth 2015-03-16 13:22:37 -05:00
Matt Mackall
fe50ce41ab crecord: more import style 2015-03-16 12:58:06 -05:00
Matt Mackall
b4fd9bf79a crecord: fix some import style 2015-03-16 12:55:21 -05:00
Laurent Charignon
348f794262 record: add crecord's ui logic to core
Code adapted from https://bitbucket.org/edgimar/crecord/src to respect
coding convention an record's interface
2015-03-12 14:19:11 -07:00