tests/test-histedit-commute
changeset 17090 e64d416b6b94
parent 17076 75f4180509a4
parent 17089 0c1d10351869
child 17091 f7a2849ef8cd
--- a/tests/test-histedit-commute	Wed Jun 06 01:56:58 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-#!/bin/sh
-
-. "$TESTDIR/histedit-helpers.sh"
-
-cat >> $HGRCPATH <<EOF
-[extensions]
-graphlog=
-histedit=
-EOF
-
-EDITED=`pwd`/editedhistory
-cat > $EDITED <<EOF
-pick 177f92b77385 c
-pick e860deea161a e
-pick 652413bf663e f
-pick 055a42cdd887 d
-EOF
-initrepo ()
-{
-    hg init r
-    cd r
-    for x in a b c d e f ; do
-        echo $x > $x
-        hg add $x
-        hg ci -m $x
-    done
-}
-
-initrepo
-
-echo % log before edit
-hg log --graph
-
-echo % show the edit commands offered
-HGEDITOR=cat hg histedit 177f92b77385
-
-echo % edit the history
-HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
-
-echo % rules should end up in .hg/histedit-last-edit.txt:
-cat .hg/histedit-last-edit.txt
-echo '**** end of rules file ****'
-
-echo % log after edit
-hg log --graph
-
-echo % put things back
-
-cat > $EDITED <<EOF
-pick 177f92b77385 c
-pick 853c68da763f d
-pick b069cc29fb22 e
-pick 26f6a030ae82 f
-EOF
-HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
-
-hg log --graph
-
-
-echo % slightly different this time
-
-cat > $EDITED <<EOF
-pick 055a42cdd887 d
-pick 652413bf663e f
-pick e860deea161a e
-pick 177f92b77385 c
-EOF
-HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
-hg log --graph
-
-
-echo % keep prevents stripping dead revs
-cat > $EDITED <<EOF
-pick bfe4a5a76b37 d
-pick c4f52e213402 f
-pick 99a62755c625 c
-pick 7c6fdd608667 e
-EOF
-HGEDITOR="cat $EDITED > " hg histedit bfe4a5a76b37 --keep 2>&1 | fixbundle
-hg log --graph
-
-echo '% try with --rev'
-cat > $EDITED <<EOF
-pick 7c6fdd608667 e
-pick 99a62755c625 c
-EOF
-hg histedit --commands "$EDITED" --rev -2 2>&1 | fixbundle
-hg log --graph
-
-echo % should also work if a commit message is missing
-BUNDLE="$TESTDIR/missing-comment.hg"
-hg init missing
-cd missing
-hg unbundle $BUNDLE
-hg co tip
-hg log --graph
-hg histedit 0