Commit Graph

10 Commits

Author SHA1 Message Date
Pierre-Yves David
8136aa6698 histedit: move all arguments checks to the beginning of the command
This changeset move all checks and raises related to arguments
validation to the top of the file. This gathers all the logic in one
place and clarifies the code doing actual work. This paves the way for
splitting this gigantic function in separated functions.

A `goal` variable is introduced in the process. It holds the action to
be done by this invocation (new, continue or abort).

An invalid invocation is found in the process (the new code is a bit stricter).
2013-04-16 21:17:13 +02:00
Pierre-Yves David
6397296e45 histedit-test: generalise --commands "-" usage
This is simpler than temporary file version. There some minor test
changes since commit messages are no longer modifed. There is still
some tests using --commands with a real file.
2013-04-16 21:57:25 -05:00
Augie Fackler
45ed657bf8 histedit: switch from util.Abort to util.InterventionRequired where appropriate (bc) 2013-02-08 16:27:49 -06:00
Pierre-Yves David
5bda497c6d histedit: record histedit source (issue3681)
Have histedit record the hex of the original changeset as already done by:
- graft
- commit --amend
- rebase

My main motivation for adding this is to prevent the creation of obsolescence cycle
(see issue3681).

Note that commit created during edit are not affected yet.
2013-01-16 19:14:22 +01:00
Pierre-Yves David
b72bb7633e histedit-test: clarify the reason of a failure
There is multiple conflict during this test. This add a small comment that
highligh the reason of a particular failure.
2012-09-27 01:53:28 +02:00
Pierre-Yves David
7053ba6e9e histedit: replaces patching logic by merges
The old and fragile patching logic is replaced by smart merges (as rebase and
graft do). This should prevents some conflicts and smoother human resolution.

For this purpose the "foldchanges" function is renamed to "applychanges" and
handle a single revision only.
2012-09-21 19:27:22 +02:00
Pierre-Yves David
f88c060468 histedit-test: ensure that non commute test will never commute
The previous version would commute if using merge algorithm (to be accurate,
merge will cleanly prompt the user during the merge).

The new version create and initial commit with some content for all involved
files en ensure all changes are a content changes of the first lines. This lead
to guaranteed conflict when commuted.
2012-09-21 19:13:25 +02:00
Mads Kiilerich
e1e9922b2d tests: make histedit pass on Windows MSYS
The command file will now be named with $TESTTMP (with '\') instead of `pwd`
(with '/') to avoid wrong path conversions.
2012-07-02 01:47:59 +02:00
Mads Kiilerich
9fd035159b tests: make histedit tests more resilient to filesystem variation
Better quoting of odd filesystem paths and no dependency to execute bit.
2012-06-30 03:34:50 +02:00
Mads Kiilerich
db710d2031 tests: convert histedit tests to .t
Mostly a trivial conversion.
2012-06-30 03:34:44 +02:00