File tree 1 file changed +27
-4
lines changed
1 file changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,21 @@ if ! type -p colordiff >/dev/null; then
8
8
}
9
9
fi
10
10
11
+ if ! type -p flip > /dev/null; then
12
+ echo flip not found
13
+ exit 1
14
+ fi
15
+
11
16
set -e
12
17
13
18
# determine last commit
14
- REV0=$( svn info | sed -ne " s/Revision: //p" )
19
+ if [ -f .lastcommit ]; then
20
+ REV0=$( < .lastcommit)
21
+ svn revert -R .
22
+ svn update -r$REV0
23
+ else
24
+ REV0=$( svn info | sed -ne " s/Revision: //p" )
25
+ fi
15
26
16
27
# update
17
28
MODIFIED=$( svn update | sed -ne " s/^[^ ]* *//p" )
@@ -30,11 +41,22 @@ ASTYLEDIFF=astyle.r$REV0-r$REV1.diff
30
41
# reformat
31
42
for f in $MODIFIED ; do
32
43
case " $f " in
44
+ src/core/spatialite/* )
45
+ echo $f skipped
46
+ continue
47
+ ;;
48
+
33
49
* .cpp|* .h|* .c|* .h|* .cxx|* .hxx|* .c++|* .h++|* .cc|* .hh|* .C|* .H)
50
+ cmd=astyle.sh
34
51
;;
35
52
53
+ * .ui|* .qgm|* .txt|* .t2t|* .py|* .sip|resources/context_help/* )
54
+ cmd=" flip -ub"
55
+ ;;
56
+
36
57
* )
37
- continue
58
+ echo $f skipped
59
+ continue
38
60
;;
39
61
esac
40
62
@@ -46,7 +68,7 @@ for f in $MODIFIED; do
46
68
m=$f .r$REV1 .prepare
47
69
48
70
cp $f $m
49
- astyle.sh $f
71
+ $cmd $f
50
72
if diff -u $m $f >> $ASTYLEDIFF ; then
51
73
# no difference found
52
74
rm $m
@@ -62,7 +84,8 @@ if [ -s "$ASTYLEDIFF" ]; then
62
84
fi
63
85
64
86
# just echo for now
65
- echo svn commit -m " automatic indentation update (r$REV0 -r$REV1 )"
87
+ echo " svn commit -m \" automatic indentation update (r$REV0 -r$REV1 )\" "
88
+ echo $REV1 > .lastcommit
66
89
else
67
90
echo " No indentation updates."
68
91
rm $ASTYLEDIFF
You can’t perform that action at this time.
0 commit comments