--- a/tests/test-histedit-commute.t Tue Apr 16 20:48:37 2013 +0200
+++ b/tests/test-histedit-commute.t Tue Apr 16 21:57:25 2013 -0500
@@ -6,13 +6,6 @@
> histedit=
> EOF
- $ EDITED="$TESTTMP/editedhistory"
- $ cat > $EDITED <<EOF
- > pick 177f92b77385 c
- > pick e860deea161a e
- > pick 652413bf663e f
- > pick 055a42cdd887 d
- > EOF
$ initrepo ()
> {
> hg init r
@@ -79,6 +72,15 @@
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
edit the history
+(use a hacky editor to check histedit-last-edit.txt backup)
+
+ $ EDITED="$TESTTMP/editedhistory"
+ $ cat > $EDITED <<EOF
+ > pick 177f92b77385 c
+ > pick e860deea161a e
+ > pick 652413bf663e f
+ > pick 055a42cdd887 d
+ > EOF
$ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
0 files updated, 0 files merged, 3 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -128,13 +130,12 @@
put things back
- $ cat > $EDITED <<EOF
+ $ hg histedit 177f92b77385 --commands - 2>&1 << EOF | fixbundle
> pick 177f92b77385 c
> pick 07114f51870f d
> pick d8249471110a e
> pick 8ade9693061e f
> EOF
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
0 files updated, 0 files merged, 3 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -175,13 +176,12 @@
slightly different this time
- $ cat > $EDITED <<EOF
+ $ hg histedit 177f92b77385 --commands - << EOF 2>&1 | fixbundle
> pick 10517e47bbbb d
> pick 7eca9b5b1148 f
> pick 915da888f2de e
> pick 177f92b77385 c
> EOF
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
0 files updated, 0 files merged, 4 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -221,21 +221,16 @@
keep prevents stripping dead revs
- $ cat > $EDITED <<EOF
+ $ hg histedit 799205341b6b --keep --commands - 2>&1 << EOF | fixbundle
> pick 799205341b6b d
> pick be9ae3a309c6 f
> pick 38b92f448761 c
> pick de71b079d9ce e
> EOF
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 799205341b6b --keep 2>&1 | fixbundle
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg log --graph
- > cat > $EDITED <<EOF
- > pick de71b079d9ce e
- > pick 38b92f448761 c
- > EOF
@ changeset: 7:803ef1c6fcfd
| tag: tip
| user: test
@@ -280,7 +275,10 @@
try with --rev
- $ hg histedit --commands "$EDITED" --rev -2 2>&1 | fixbundle
+ $ hg histedit --commands - --rev -2 2>&1 <<EOF | fixbundle
+ > pick de71b079d9ce e
+ > pick 38b92f448761 c
+ > EOF
abort: may not use changesets other than the ones listed
$ hg log --graph
@ changeset: 7:803ef1c6fcfd