Commit Graph

10 Commits

Author SHA1 Message Date
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
6714af104f histedit-test: make test-fold more verbose
This helps to check the validity of fold result and debug potential issue.
2012-09-24 15:46:01 +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
56df9607c6 histedit: fold in memory
Update the folding code to works in memory instead of applying patches on the
working directory. This is cleaner, faster and prepare the removal of the whole
patching logic.

This new collapse function will probably move into core sooner or later. A lot
of other rewriting operation may benefit from it.
2012-09-21 19:24:31 +02:00
Adrian Buehlmann
41df87291e test-histedit-fold: fix for Windows
Fixes 6d445c2db0df failing with MSYS.

MSYS sh.exe mangled that path by applying its path magic, which caused the
test to fail on Windows.
2012-07-26 23:08:34 +02:00
Patrick Mezard
e7c675580e histedit: fix new nodes computation with --continue (issue3534)
When running the following actions:

  pick 617f94f13c0f 1 +4
  drop 888f9082bf99 2 +5
  fold 251d831eeec5 3 +6

if the fold fails, is fixed by the user with a new changeset, --continue
will ignore the new revision when generating the fold changelog. This
was caused by --continue detecting new changesets as descendants of the
parent not descendants of changesets in the initial list. In this case,
dropped changesets must be ignored.

Even with the computation fixed, the 'newchildren' list was always
emptied by the filtering loop and passed empty to finishfold().

Note that changesets dropped and recreated identically will still be
missed. This probably cannot be solved but is unlikely to happen.

Other things, like 'newchildren' having multiple heads, should be
checked as well.
2012-07-25 16:27:26 +02:00
Augie Fackler
39b1dce60e histedit: don't crash if the result of fixing up a fold is empty 2012-07-06 11:39:02 -05: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