tests/test-histedit-edit.t
author Mads Kiilerich <mads@kiilerich.com>
Sat, 30 Jun 2012 03:34:44 +0200
changeset 17085 35729bdd59b6
parent 17067 tests/test-histedit-edit@81d681f8bdc1
child 17086 5f2cacb715dc
permissions -rw-r--r--
tests: convert histedit tests to .t Mostly a trivial conversion.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
     1
  $ . "$TESTDIR/histedit-helpers.sh"
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     2
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
     3
  $ cat >> $HGRCPATH <<EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
     4
  > [extensions]
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
     5
  > graphlog=
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
     6
  > histedit=
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
     7
  > EOF
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     8
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
     9
  $ EDITED=`pwd`/editedhistory
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    10
  $ cat > $EDITED <<EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    11
  > pick 177f92b77385 c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    12
  > pick 055a42cdd887 d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    13
  > edit e860deea161a e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    14
  > pick 652413bf663e f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    15
  > EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    16
  $ initrepo ()
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    17
  > {
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    18
  >     hg init r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    19
  >     cd r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    20
  >     for x in a b c d e f ; do
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    21
  >         echo $x > $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    22
  >         hg add $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    23
  >         hg ci -m $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    24
  >     done
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    25
  > }
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    26
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    27
  $ initrepo
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    28
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    29
log before edit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    30
  $ hg log --graph
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    31
  @  changeset:   5:652413bf663e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    32
  |  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    33
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    34
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    35
  |  summary:     f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    36
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    37
  o  changeset:   4:e860deea161a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    38
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    39
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    40
  |  summary:     e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    41
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    42
  o  changeset:   3:055a42cdd887
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    43
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    44
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    45
  |  summary:     d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    46
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    47
  o  changeset:   2:177f92b77385
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    48
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    49
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    50
  |  summary:     c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    51
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    52
  o  changeset:   1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    53
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    54
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    55
  |  summary:     b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    56
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    57
  o  changeset:   0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    58
     user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    59
     date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    60
     summary:     a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    61
  
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    62
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    63
edit the history
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    64
  $ HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    65
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    66
  abort: Make changes as needed, you may commit or record as needed now.
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    67
  When you are finished, run hg histedit --continue to resume.
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    68
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    69
commit, then edit the revision
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    70
  $ hg ci -m 'wat'
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    71
  created new head
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    72
  $ echo a > e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    73
  $ HGEDITOR='echo "foobaz" > ' hg histedit --continue 2>&1 | fixbundle
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    74
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    75
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    76
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    77
  $ hg log --graph
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    78
  @  changeset:   6:bf757c081cd0
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    79
  |  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    80
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    81
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    82
  |  summary:     f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    83
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    84
  o  changeset:   5:d6b15fed32d4
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    85
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    86
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    87
  |  summary:     foobaz
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    88
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    89
  o  changeset:   4:1a60820cd1f6
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    90
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    91
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    92
  |  summary:     wat
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    93
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    94
  o  changeset:   3:055a42cdd887
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    95
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    96
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    97
  |  summary:     d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    98
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
    99
  o  changeset:   2:177f92b77385
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   100
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   101
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   102
  |  summary:     c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   103
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   104
  o  changeset:   1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   105
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   106
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   107
  |  summary:     b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   108
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   109
  o  changeset:   0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   110
     user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   111
     date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   112
     summary:     a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   113
  
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   114
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   115
  $ hg cat e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   116
  a
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   117
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   118
  $ cat > $EDITED <<EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   119
  > edit bf757c081cd0 f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   120
  > EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   121
  $ HGEDITOR="cat $EDITED > " hg histedit tip 2>&1 | fixbundle
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   122
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   123
  abort: Make changes as needed, you may commit or record as needed now.
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   124
  When you are finished, run hg histedit --continue to resume.
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   125
  $ hg status
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   126
  A f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   127
  $ HGEDITOR='true' hg histedit --continue
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   128
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   129
  $ hg status
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   130
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   131
log after edit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   132
  $ hg log --limit 1
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   133
  changeset:   6:bf757c081cd0
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   134
  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   135
  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   136
  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   137
  summary:     f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   138
  
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   139
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   140
say we'll change the message, but don't.
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   141
  $ cat > ../edit.sh <<EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   142
  > #!/bin/sh
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   143
  > cat \$1 | sed s/pick/mess/ > tmp
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   144
  > mv tmp \$1
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   145
  > EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   146
  $ chmod +x ../edit.sh
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   147
  $ HGEDITOR="../edit.sh" hg histedit tip 2>&1 | fixbundle
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   148
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   149
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   150
  $ hg status
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   151
  $ hg log --limit 1
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   152
  changeset:   6:bf757c081cd0
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   153
  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   154
  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   155
  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   156
  summary:     f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   157
  
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   158
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   159
modify the message
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   160
  $ cat > $EDITED <<EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   161
  > mess bf757c081cd0 f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   162
  > EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   163
  $ HGEDITOR="cat $EDITED > " hg histedit tip 2>&1 | fixbundle
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   164
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   165
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   166
  $ hg status
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   167
  $ hg log --limit 1
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   168
  changeset:   6:0b16746f8e89
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   169
  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   170
  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   171
  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   172
  summary:     mess bf757c081cd0 f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   173
  
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   174
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   175
rollback should not work after a histedit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   176
  $ hg rollback
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   177
  no rollback information available
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   178
  [1]
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   179
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17067
diff changeset
   180
  $ cd ..