tests/test-histedit-drop
changeset 17085 35729bdd59b6
parent 17084 69dae7982c85
child 17086 5f2cacb715dc
equal deleted inserted replaced
17084:69dae7982c85 17085:35729bdd59b6
     1 #!/bin/sh
       
     2 
       
     3 . "$TESTDIR/histedit-helpers.sh"
       
     4 
       
     5 cat >> $HGRCPATH <<EOF
       
     6 [extensions]
       
     7 graphlog=
       
     8 histedit=
       
     9 EOF
       
    10 
       
    11 EDITED=`pwd`/editedhistory
       
    12 cat > $EDITED <<EOF
       
    13 drop 177f92b77385 c
       
    14 pick e860deea161a e
       
    15 pick 652413bf663e f
       
    16 pick 055a42cdd887 d
       
    17 EOF
       
    18 initrepo ()
       
    19 {
       
    20     hg init r
       
    21     cd r
       
    22     for x in a b c d e f ; do
       
    23         echo $x > $x
       
    24         hg add $x
       
    25         hg ci -m $x
       
    26     done
       
    27 }
       
    28 
       
    29 initrepo
       
    30 
       
    31 echo % log before edit
       
    32 hg log --graph
       
    33 
       
    34 echo % edit the history
       
    35 HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle
       
    36 
       
    37 echo % log after edit
       
    38 hg log --graph
       
    39 
       
    40 echo % manifest after edit
       
    41 hg manifest
       
    42 
       
    43 echo % EOF