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 "^refresh" &&
39 stg log --full | grep -q -e "^refresh"
43 'Check the log annotation' \
45 stg log foo | grep -q -e "\[refresh\] foo notes " &&
46 stg log bar | grep -q -e "\[refresh\] " &&
47 stg refresh -p foo --annotate="foo notes 2" &&
48 stg log foo | grep -q -v -e "\[refresh\] foo notes " &&
49 stg log foo | grep -q -e "\[refresh\] foo notes 2"
53 'Check the "push" log' \
56 echo foo > test2 && git add test2 && stg refresh &&
58 stg log --full | grep -q -e "^push "
62 'Check the "push(f)" log' \
65 stg edit -m "Foo2 Patch" &&
67 stg log --full | grep -q -e "^push(f) "
71 'Check the "push(m)" log' \
74 echo foo2 > test && stg refresh &&
76 stg log --full | grep -q -e "^push(m) "
80 'Check the "push(c)" log' \
82 echo bar > test && stg refresh &&
84 echo foo > test && stg refresh &&
85 conflict_old stg push &&
86 stg log --full | grep -q -e "^push(c) "
90 'Check the push "undo" log' \
93 stg log --full bar | grep -q -e "^undo "
97 'Check the refresh "undo" log' \
100 stg log --full | grep -q -e "^undo "