3 # Copyright (c) 2006 Catalin Marinas
6 test_description
='Test the patch history generation.
13 'Initialize the StGIT repository' \
19 'Create the first patch' \
21 stg new foo -m "Foo Patch" &&
22 echo foo > test && echo foo2 >> test &&
24 stg refresh --annotate="foo notes"
28 'Create the second patch' \
30 stg new bar -m "Bar Patch" &&
36 'Check the "new" and "refresh" logs' \
38 stg log --full foo | grep -q -e "^new" &&
39 stg log --full foo | grep -q -e "^refresh" &&
40 stg log --full | grep -q -e "^new" &&
41 stg log --full | grep -q -e "^refresh"
45 'Check the log annotation' \
47 stg log foo | grep -q -e "\[refresh\] foo notes "
48 stg log bar | grep -q -e "\[refresh\] "
52 'Check the "push" log' \
55 echo foo > test2 && stg add test2 && stg refresh &&
57 stg log --full | grep -q -e "^push "
61 'Check the "push(f)" log' \
64 stg refresh -m "Foo2 Patch" &&
66 stg log --full | grep -q -e "^push(f) "
70 'Check the "push(m)" log' \
73 echo foo2 > test && stg refresh &&
75 stg log --full | grep -q -e "^push(m) "
79 'Check the "push(c)" log' \
81 echo bar > test && stg refresh &&
83 echo foo > test && stg refresh &&
85 stg log --full | grep -q -e "^push(c) "
89 'Check the push "undo" log' \
92 stg log --full bar | grep -q -e "^undo "
96 'Check the refresh "undo" log' \
99 stg log --full | grep -q -e "^undo "