Guilt v0.35
[guilt/mob.git] / regression / t-021.sh
blob035973cb449c079f3f9e3f7412649800d0ab24eb
1 #!/bin/bash
3 # Test the pop code
6 source $REG_DIR/scaffold
8 cmd setup_repo
10 cmd guilt push --all
12 cmd git log -p
15 # incremental pop by 1
17 guilt series | _tac | while read n ; do
18 cmd guilt pop
20 cmd list_files
22 cmd git log -p
23 done
26 # push all
28 cmd guilt push --all
31 # pop by name (initially all applied)
33 guilt series | _tac | while read n ; do
34 cmd guilt pop $n
36 cmd list_files
38 cmd git log -p
40 cmd guilt push --all
41 done
44 # pop by name (incrementally)
46 guilt series | _tac | while read n ; do
47 cmd guilt pop $t
49 cmd list_files
51 cmd git log -p
52 done
55 # push all
57 cmd guilt push --all
59 npatches=`guilt series | wc -l`
60 for n in `_seq -2 $npatches`; do
61 if [ $n -gt 0 ]; then
62 cmd guilt pop -n $n
63 else
64 shouldfail guilt pop -n $n 2>&1
67 cmd list_files
69 cmd git log -p
71 cmd guilt push --all
72 done
74 cmd list_files
76 # FIXME:
77 # --all
78 # -a
79 # -n with some patches already applied