Guilt v0.35
[guilt/mob.git] / regression / t-020.sh
blob6598b02783a9108a4458c97db7f45a8e521ce4a6
1 #!/bin/bash
3 # Test the push code
6 source $REG_DIR/scaffold
8 cmd setup_repo
11 # incremental push by 1
13 guilt series | while read n ; do
14 cmd guilt push
16 cmd list_files
18 cmd git log -p
19 done
22 # pop all
24 cmd guilt pop --all
27 # push by name (initially nothing applied)
29 guilt series | while read n ; do
30 cmd guilt push $t
32 cmd list_files
34 cmd git log -p
36 cmd guilt pop --all
37 done
40 # push by name (incrementally)
42 guilt series | while read n ; do
43 cmd guilt push $t
45 cmd list_files
47 cmd git log -p
48 done
51 # pop all
53 cmd guilt pop --all
55 npatches=`guilt series | wc -l`
56 for n in `_seq -2 $npatches`; do
57 if [ $n -ge 0 ]; then
58 cmd guilt push -n $n
59 else
60 shouldfail guilt push -n $n
63 cmd list_files
65 cmd git log -p
67 cmd guilt pop --all
68 done
70 cmd list_files
72 # FIXME:
73 # --all
74 # -a
75 # -n with some patches already applied