Commit Graph

18 Commits

Author SHA1 Message Date
Adrian Zgorzałek
4f40289598 histedit: clarify description of fold command
N and (N-1) didn't add any information to description of fold.
More useful is refering to the commit list as it is displayed in editor.
2014-02-13 18:05:35 -08:00
Pierre-Yves David
681ea926e5 tests: prepare rebase test for wc parent preservation
In the way to solving issue3813 we'll preserve the working directory parent
after the rebase. Multiple rebases test expect the working directory parent to
be tip after rebase. We patches them before the actual change to prevent
confusion.
2013-10-14 16:49:54 +02:00
Augie Fackler
190da7405a histedit: refuse to edit history that contains merges (issue3962) 2013-07-24 17:39:29 -04: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
be59bb31f7 dispatch: exit with status 1 for an InterventionRequired exception (bc) 2013-02-08 16:17:46 -06: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
f7afd60d70 test-histedit: add tests for dropping head changeset
I got bug report from user in this specific case. I was unable to reproduce in
test situation. Testing this situation is still valuable.
2013-01-22 14:33:17 +01:00
Pierre-Yves David
f52bcf462a histedit: proper phase conservation (issue3724)
Before this changeset, histedit created all new changesets according
phases.new-commit option without any regards for the phases of the original
changesets.

This changeset fix that using the phase of rewritten changeset to decide the
phase of the resulting changeset. In case of reordering or folding, we keep
secret item secret as it seems the safer path.

temporary commit creation are not affected. They are head only and stripped at
the end of the histedit.

As for the resolution of issue3681 (obsolescence cycle prevention), we do not
handle changesets created by edit command.
2013-01-16 19:21:03 +01:00
Pierre-Yves David
cf318d81c3 test-histedit: reorder phases test and prepare for more
We are going to add a lot regarding phase of test while fixing issue3724.

This movement allows to put them after this first phase test.
2013-01-16 19:19:56 +01:00
Pierre-Yves David
dded39da4e test-histedit: fix instability creation test
The current test does not rewrite anything and therefor does not create any
instability.

We also clean up the repo state after the test. This required the rebase
extension.
2013-01-16 19:17:36 +01: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
4bf5a12ff2 test: fix in-test comments related to obsolescence
The `ui.prevent-unstable` option never made it into core. It always behaves
this way when obsolescence feature is enabled.

See changesets caaf2a66c719, f111507ae88a and 51dfebaadebc for details.
2013-01-16 00:46:29 +01:00
Pierre-Yves David
febbf1f08f histedit: allow operation from non-head if obsolete is enabled
Obsolescence markers can represent this situation just fine. Rewritten
revisions are marked as precursors of the ones creates by
histedit. Unaffected descendants become "unstable".

If obsolescence is not enabled we keep the current behavior of
aborting. This new behavior only applies when obsolete is
enabled and is subject to future discussion and changes.
2012-12-31 17:46:22 -06:00
Pierre-Yves David
4c13968496 histedit: create obsolescence markers in deterministic order
I arbitrary use the revnum of the precursor because it sound a right order.
2012-10-16 16:56:14 +02:00
Pierre-Yves David
0cada00ea6 test: fix invalid redirection for histedit text
Appending to the file is wrong, we want new content.
2012-10-14 23:03:58 +02:00
Pierre-Yves David
f329dd0261 histedit: refuse to edit public changeset
Public changeset are immutable. This changeset enforce that in histedit.
2012-10-12 21:41:08 +02:00
Pierre-Yves David
2237d9bd3f histedit: ignores hidden revision when checking for orphaned nodes
We do not want hidden revision to block histedit. They are already "dead"
and we do not care about dead orphans. see similar changeset 40db49347807 for
rebase.
2012-09-27 14:00:52 +02:00
Pierre-Yves David
e4f0351734 histedit: add obsolete support
When the obsolete feature is enabled, histedit creates obsolescence marker
instead of stripping replaced changesets.

For now, we keep stripping temporary nodes created along the way.
2012-09-27 13:59:48 +02:00