equal
deleted
inserted
replaced
|
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 pick 177f92b77385 c |
|
14 pick 055a42cdd887 d |
|
15 pick bfa474341cc9 does not commute with e |
|
16 pick e860deea161a e |
|
17 pick 652413bf663e f |
|
18 EOF |
|
19 initrepo () |
|
20 { |
|
21 hg init r |
|
22 cd r |
|
23 for x in a b c d e f ; do |
|
24 echo $x > $x |
|
25 hg add $x |
|
26 hg ci -m $x |
|
27 done |
|
28 echo a >> e |
|
29 hg ci -m 'does not commute with e' |
|
30 } |
|
31 |
|
32 initrepo |
|
33 |
|
34 echo % log before edit |
|
35 hg log --graph |
|
36 |
|
37 echo % edit the history |
|
38 HGEDITOR="cat $EDITED > " hg histedit 177f92b77385 2>&1 | fixbundle |
|
39 |
|
40 echo '% fix up (pre abort)' |
|
41 echo a > e |
|
42 hg add e |
|
43 hg histedit --continue 2>&1 | fixbundle |
|
44 |
|
45 echo % abort the edit |
|
46 hg histedit --abort 2>&1 | fixbundle |
|
47 |
|
48 echo % log after abort |
|
49 hg log --graph |
|
50 echo % EOF |