Commit Graph

67 Commits

Author SHA1 Message Date
Laurent Charignon
9b866fafac record: add default value for operation argument
This patch is part of a series of patches to change the recording ui to reflect
the operation currently running (commit, shelve, revert ...).
This patch adds the default value of the operation argument for record's
standard and curses interface to match what is displayed in the interface
as of today.
2015-05-27 15:56:10 -07:00
Laurent Charignon
92c99cc1a7 record: add an operation arguments to customize recording ui
This patch is part of a series of patches to change the recording ui to reflect
the operation currently running (commit, shelve, revert ...).
This patch adds a new argument to the recording function to reflect in the UI
what operation we are running.
2015-05-27 15:49:24 -07:00
Laurent Charignon
7e6cda9955 record: change wording for record curses interface
We are using record and crecord in different context, not just for commiting
changes but also reverting and shelving changes. This diff changes the wording
from commiting to confirming changes to avoid confusing the users with what
they are doing.
2015-04-21 16:20:43 -07:00
Laurent Charignon
8213891de3 record: add message when starting record's curses interface
We are adding this log message to reduce a confusion when a command prints
something just before starting the curses interface.

Since the interactive mode is taking over the entire screen, starts with no
delay and does wait for a key press, the user believes that messages printed
before opening the interactive mode were actually printed after using
interactive mode, not before.
The fix adds the line "Starting interactive mode" helping the user separate
the messages that were printed before and after the start of the
interactive mode.

One particular example where this was a problem is the revert command where we
first print the list of changes to be considered for revert, then opens the
curses interface right away without letting the user see the messages.
The user then selects the changes, validates and then see the messages from
before opening the interactive mode and is confused.
2015-04-16 14:26:50 -07:00
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
Matt Harbison
65f90257b1 crecord: fix mixed imports warning 2015-04-09 23:47:07 -04:00