Commit Graph

13 Commits

Author SHA1 Message Date
Laurent Charignon
a48a11f98e revert: change the direction of revert -i
After the discussion on the list about hg revert -i, it seems like we are
satisfied with what we called proposition 2. It shows the changes to revert in
the same direction as hg diff. This patch makes it the default option.
It changes all the + in - and vice versa in the tests for revert -i.
2015-06-23 14:28:15 -07:00
Laurent Charignon
98f25a9c3d revert: change a test to make the change of direction of revert -i easier
Currently we are handling editing of newly-added files with the interactive
interface. We are not handling editing of deleted files. In the test for revert,
we were editing a newly-added file. Since we want to change the direction of
revert -i, this editing of a newly-added file will become editing of a deleted file.
Since we don't support that, this patch changes the test to make the rest of
the series cleaner.
2015-06-23 13:46:58 -07:00
Laurent Charignon
f9d447f8e4 revert: add an experimental config to use inverted selection
We had a discussion on the list about the interactive ui for revert. This patch
adds a flag to allow people to test the second alternative (referred to as
proposition 2 on the mailing list). It effectively inverts the signs in the
2015-05-29 13:11:52 -07:00
Laurent Charignon
673c4ef059 revert: remove unused debug code in the test file
I left a test environment variable in a previous commit and it is doing nothing
useful. This patch removes it.
2015-05-29 10:34:12 -07:00
Matt Harbison
b7d670b012 test-revert-interactive: don't escape the $ for $TESTTMP
Otherwise, sh tries to exec the literal path '${TESTTMP}/editor.sh' on Windows.
The test runs clean on OS X both with and without this change.
2015-05-27 12:11:13 -04:00
Laurent Charignon
9cd19c7de6 revert: fix edition of newly added file during --interactive
Before this patch: editing hunks of newly added file when performing a revert
--interactive had no effect: the edits were discarded.

After this patch, the edits are taken into account.
2015-05-21 14:34:24 -07:00
Laurent Charignon
301ad40550 revert: make revert --interactive use git style diff
This allows us to use existing code to detect files that are newly added and
modified. In turn, this allows us to make revert --interactive support
editing newly added and modified files.
2015-05-21 14:25:57 -07:00
Pierre-Yves David
9ec3313e25 revert: do not requires '--all' if '--interative' is present
The '--all' option have been introduced in 0a81b7721d8f (August 2006), most
probably to prevent user shooting themselves in the foot. As the record process
will let you, view and select the set of files and change you want to revert, I
feel like the '--all' flag is superfluous in the '--interactive' case.
2015-04-11 12:26:54 -04:00
Laurent Charignon
ce53ca6b37 revert: fix --interactive on local modification (issue4576)
We were moving files during the backup phase and it was incompatible with the
way record/crecord is working
2015-03-25 14:01:14 -07:00
Matt Harbison
2a4fd713bf test-interactive: use stable EOL in various file generating routines
The seq.py and shell echo redirected to a file ends up with platform
specific EOL, which throws off the hash when the file is committed to
the test repo on Windows. The other option is to glob the hashes, but
the ability to see if they have changed might point out problems that
would otherwise be missed.
2015-03-21 11:56:43 -04:00
Yuya Nishihara
86c988c8d2 test-revert-interactive: eliminate bashism in wildcard pattern
The test failed with Debian dash.
2015-03-20 00:22:37 +09:00
Matt Harbison
9741c43e48 tests: replace uses of 'seq' with portable 'seq.py' 2015-03-17 21:47:47 -04:00
Laurent Charignon
f97eaa8ce4 revert: add flag to make revert interactive 2015-03-16 16:33:59 -07:00