mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
62b30a1922
of bugfix made to maria_repair() yesterday. Fail "bk delta" (and thus "bk citool") if an added or modified line of a C/C++ file has white space at end of line BitKeeper/triggers/pre-delta: detection gave false alarm on added newline storage/maria/ma_check.c: propagation to maria_repair_by_sort() and maria_repair_parallel() of bugfix made to maria_repair() yesterday. No effect now as those two repair variants are never used with BLOCK_RECORD.
37 lines
980 B
Bash
Executable file
37 lines
980 B
Bash
Executable file
#!/bin/sh
|
|
|
|
if [ "$BK_USER" = "Administrator" -o "$BK_USER" = "mysqldev" ]
|
|
then
|
|
echo "Error: you cannot checkin as 'Administrator' or 'mysqldev' user."
|
|
echo "as a workaround set BK_USER to your nickname"
|
|
echo "e.g.: export BK_USER='bar'"
|
|
echo ""
|
|
echo "Checkin FAILED!"
|
|
echo "Set BK_USER and retry."
|
|
exit 1
|
|
fi
|
|
|
|
if [ `tail -c1 $BK_FILE` ]
|
|
then
|
|
echo "File $BK_FILE does not end with a new-line character!"
|
|
echo ""
|
|
echo "Checkin FAILED!"
|
|
echo "Fix the problem and retry."
|
|
exit 1
|
|
fi
|
|
|
|
# detect if C/C++ files have new trailing white space
|
|
trailingblank=`echo $BK_FILE | egrep '\.(c|.h)'`
|
|
if [ -n "$trailingblank" ]
|
|
then
|
|
trailingblank=`bk diffs $BK_FILE | grep '^> .*[[:space:]]$'`
|
|
if [ -n "$trailingblank" ]
|
|
then
|
|
echo "bk diffs $BK_FILE | grep '^> .*[[:space:]]$'"
|
|
echo "reported white space at end of some added/modified lines"
|
|
echo ""
|
|
echo "Checkin FAILED!"
|
|
echo "Fix the problem and retry."
|
|
exit 1
|
|
fi
|
|
fi
|