Permalink
Browse files

Merge branch 'prep-release-3.0.11'

* prep-release-3.0.11: (279 commits)
  [prep-release-3.0.11] Bumping version number for 3.0.11 final.
  [prep-release-3.0.11] Update Changelog for 3.0.11-RC2 release.
  [prep-release-3.0.11] Bumping version number for 3.0.11-RC2.
  [ticket/10965] Profile data is only grabbed when show_novalue is enabled
  [ticket/10965] Make sure all profile fields are always grabbed on viewtopic
  [ticket/10965] Database update was referring to 3.0.5 instead of 3.0.11-RC1
  [ticket/10965] Introduce a new profile field option to display no value
  [ticket/10667] Fix tests under MySQL 5.5 strict mode (once again)
  [ticket/10950] Fix grammar in comments
  [ticket/10950] Delete PMs for users that have not yet read the pm
  [ticket/10950] Fix unit tests to fit the new pm deleting behaviour
  [ticket/10950] Update undelivered pm counts in batches not 1 by 1 for each user
  [ticket/10950] Remove deleted entries in tests instead of commenting them out
  [ticket/10950] Use database count() and group by instead of doing that in php
  [ticket/10978] Fix typo in prosilver ucp_groups_membership.html
  [ticket/10950] Check $delete_ids to be not empty
  [ticket/10950] Recreated the behaviour of phpbb_delete_user_pms()
  [ticket/10950] Fix unit tests to reflect desired behaviour
  [ticket/10441] Make CDB linking more consistent
  [ticket/10937] Update documentation to say which comment styles are removed.
  ...
  • Loading branch information...
2 parents 2345be3 + 6da0391 commit 7eb16cbbd5b5c148fe45ac6eb122401468b42109 @bantu bantu committed Aug 20, 2012
Showing with 3,235 additions and 1,074 deletions.
  1. +6 −0 .gitignore
  2. +27 −0 .travis.yml
  3. +6 −0 README.md
  4. +3 −3 build/build.xml
  5. +1 −1 build/build_changelog.php
  6. +2 −3 build/build_diff.php
  7. +1 −2 build/build_helper.php
  8. +1 −2 build/diff_class.php
  9. +1 −2 build/package.php
  10. +92 −22 git-tools/hooks/commit-msg
  11. +59 −6 git-tools/hooks/pre-commit
  12. +1 −1 git-tools/merge.php
  13. +1 −1 git-tools/setup_github_network.php
  14. BIN phpBB/adm/images/phpbb_logo.gif
  15. BIN phpBB/adm/images/phpbb_logo.png
  16. +1 −0 phpBB/adm/index.php
  17. +4 −0 phpBB/adm/style/acp_profile.html
  18. +6 −0 phpBB/adm/style/acp_styles.html
  19. +19 −14 phpBB/adm/style/acp_users_overview.html
  20. +3 −3 phpBB/adm/style/admin.css
  21. +5 −0 phpBB/adm/style/install_update.html
  22. +11 −15 phpBB/adm/style/install_update_diff.html
  23. +1 −1 phpBB/adm/style/overall_footer.html
  24. +1 −1 phpBB/adm/style/simple_footer.html
  25. +7 −11 phpBB/develop/add_permissions.php
  26. +7 −11 phpBB/develop/calc_email_hash.php
  27. +7 −19 phpBB/develop/change_smiley_ref.php
  28. +2 −5 phpBB/develop/check_flash_bbcodes.php
  29. +2 −2 phpBB/develop/create_schema_files.php
  30. +137 −0 phpBB/develop/create_search_index.php
  31. +9 −15 phpBB/develop/create_variable_overview.php
  32. +8 −11 phpBB/develop/fill.php
  33. +1 −2 phpBB/develop/generate_utf_casefold.php
  34. +1 −2 phpBB/develop/generate_utf_confusables.php
  35. +1 −2 phpBB/develop/generate_utf_tables.php
  36. +7 −11 phpBB/develop/merge_attachment_tables.php
  37. +7 −19 phpBB/develop/merge_post_tables.php
  38. +1 −3 phpBB/develop/mysql_upgrader.php
  39. +1 −2 phpBB/develop/utf_normalizer_test.php
  40. +5 −3 phpBB/docs/AUTHORS
  41. +146 −20 phpBB/docs/CHANGELOG.html
  42. +2 −2 phpBB/docs/FAQ.html
  43. +9 −9 phpBB/docs/INSTALL.html
  44. +47 −35 phpBB/docs/README.html
  45. +1 −1 phpBB/docs/auth_api.html
  46. +2 −3 phpBB/docs/coding-guidelines.html
  47. +1 −1 phpBB/docs/hook_system.html
  48. +1 −1 phpBB/download/file.php
  49. +17 −11 phpBB/includes/acp/acp_board.php
  50. +1 −1 phpBB/includes/acp/acp_captcha.php
  51. +9 −3 phpBB/includes/acp/acp_database.php
  52. +3 −3 phpBB/includes/acp/acp_main.php
  53. +36 −5 phpBB/includes/acp/acp_profile.php
  54. +1 −1 phpBB/includes/acp/acp_ranks.php
  55. +22 −11 phpBB/includes/acp/acp_styles.php
  56. +44 −21 phpBB/includes/acp/acp_users.php
  57. +1 −1 phpBB/includes/auth/auth_db.php
  58. +5 −1 phpBB/includes/auth/auth_ldap.php
  59. +1 −1 phpBB/includes/constants.php
  60. +1 −1 phpBB/includes/db/db_tools.php
  61. +90 −5 phpBB/includes/db/dbal.php
  62. +0 −43 phpBB/includes/db/firebird.php
  63. +8 −0 phpBB/includes/db/mssql.php
  64. +8 −43 phpBB/includes/db/mssql_odbc.php
  65. +8 −18 phpBB/includes/db/mssqlnative.php
  66. +70 −0 phpBB/includes/db/mysql.php
  67. +70 −0 phpBB/includes/db/mysqli.php
  68. +38 −17 phpBB/includes/functions.php
  69. +7 −26 phpBB/includes/functions_admin.php
  70. +8 −4 phpBB/includes/functions_convert.php
  71. +80 −1 phpBB/includes/functions_install.php
  72. +3 −3 phpBB/includes/functions_messenger.php
  73. +42 −27 phpBB/includes/functions_posting.php
  74. +205 −17 phpBB/includes/functions_privmsgs.php
  75. +32 −9 phpBB/includes/functions_profile_fields.php
  76. +29 −4 phpBB/includes/functions_upload.php
  77. +58 −54 phpBB/includes/functions_user.php
  78. +11 −0 phpBB/includes/mcp/mcp_topic.php
  79. +2 −2 phpBB/includes/mcp/mcp_warn.php
  80. +2 −6 phpBB/includes/search/fulltext_mysql.php
  81. +3 −12 phpBB/includes/search/fulltext_native.php
  82. +1 −1 phpBB/includes/search/search.php
  83. +39 −29 phpBB/includes/session.php
  84. +17 −1 phpBB/includes/startup.php
  85. +15 −2 phpBB/includes/ucp/ucp_pm_options.php
  86. +8 −1 phpBB/includes/ucp/ucp_prefs.php
  87. +2 −18 phpBB/includes/ucp/ucp_register.php
  88. +1 −1 phpBB/index.php
  89. +1 −1 phpBB/install/convertors/convert_phpbb20.php
  90. +87 −3 phpBB/install/database_update.php
  91. +41 −48 phpBB/install/install_install.php
  92. +1 −0 phpBB/install/schemas/firebird_schema.sql
  93. +1 −0 phpBB/install/schemas/mssql_schema.sql
  94. +1 −0 phpBB/install/schemas/mysql_40_schema.sql
  95. +1 −0 phpBB/install/schemas/mysql_41_schema.sql
  96. +1 −0 phpBB/install/schemas/oracle_schema.sql
  97. +1 −0 phpBB/install/schemas/postgres_schema.sql
  98. +4 −4 phpBB/install/schemas/schema_data.sql
  99. +1 −0 phpBB/install/schemas/sqlite_schema.sql
  100. +1 −1 phpBB/language/en/acp/attachments.php
  101. +1 −1 phpBB/language/en/acp/board.php
  102. +5 −5 phpBB/language/en/acp/common.php
  103. +9 −9 phpBB/language/en/acp/permissions.php
  104. +2 −0 phpBB/language/en/acp/profile.php
  105. +1 −0 phpBB/language/en/acp/styles.php
  106. +2 −1 phpBB/language/en/acp/users.php
  107. +3 −1 phpBB/language/en/common.php
  108. +1 −1 phpBB/language/en/help_faq.php
  109. +1 −0 phpBB/language/en/install.php
  110. +0 −1 phpBB/language/en/memberlist.php
  111. +1 −0 phpBB/language/en/posting.php
  112. +3 −1 phpBB/language/en/ucp.php
  113. +6 −15 phpBB/memberlist.php
  114. +37 −12 phpBB/search.php
  115. +5 −5 phpBB/style.php
  116. +1 −1 phpBB/styles/prosilver/imageset/imageset.cfg
  117. +1 −1 phpBB/styles/prosilver/style.cfg
  118. +2 −2 phpBB/styles/prosilver/template/editor.js
  119. +4 −1 phpBB/styles/prosilver/template/mcp_topic.html
  120. +1 −1 phpBB/styles/prosilver/template/memberlist_body.html
  121. +2 −2 phpBB/styles/prosilver/template/memberlist_leaders.html
  122. +1 −1 phpBB/styles/prosilver/template/memberlist_view.html
  123. +1 −1 phpBB/styles/prosilver/template/overall_footer.html
  124. +0 −4 phpBB/styles/prosilver/template/overall_header.html
  125. +5 −5 phpBB/styles/prosilver/template/posting_editor.html
  126. +1 −1 phpBB/styles/prosilver/template/search_body.html
  127. +1 −1 phpBB/styles/prosilver/template/simple_footer.html
  128. +6 −1 phpBB/styles/prosilver/template/template.cfg
  129. +1 −1 phpBB/styles/prosilver/template/ucp_groups_membership.html
  130. +2 −2 phpBB/styles/prosilver/template/ucp_main_front.html
  131. +8 −15 phpBB/styles/prosilver/template/ucp_pm_message_header.html
  132. +0 −1 phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
  133. +7 −4 phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
  134. +2 −2 phpBB/styles/prosilver/template/ucp_profile_reg_details.html
  135. +1 −1 phpBB/styles/prosilver/template/viewonline_body.html
  136. +13 −0 phpBB/styles/prosilver/theme/bidi.css
  137. +0 −6 phpBB/styles/prosilver/theme/colours.css
  138. +13 −1 phpBB/styles/prosilver/theme/common.css
  139. +23 −21 phpBB/styles/prosilver/theme/cp.css
  140. +1 −1 phpBB/styles/prosilver/theme/theme.cfg
  141. +10 −4 phpBB/styles/prosilver/theme/tweaks.css
  142. +1 −1 phpBB/styles/subsilver2/imageset/imageset.cfg
  143. +1 −1 phpBB/styles/subsilver2/style.cfg
  144. +1 −1 phpBB/styles/subsilver2/template/captcha_default.html
  145. +1 −1 phpBB/styles/subsilver2/template/captcha_qa.html
  146. +2 −2 phpBB/styles/subsilver2/template/editor.js
  147. +1 −1 phpBB/styles/subsilver2/template/faq_body.html
  148. +1 −1 phpBB/styles/subsilver2/template/login_body.html
  149. +1 −0 phpBB/styles/subsilver2/template/mcp_topic.html
  150. +1 −1 phpBB/styles/subsilver2/template/overall_footer.html
  151. +2 −1 phpBB/styles/subsilver2/template/posting_body.html
  152. +1 −0 phpBB/styles/subsilver2/template/posting_buttons.html
  153. +1 −1 phpBB/styles/subsilver2/template/simple_footer.html
  154. +5 −1 phpBB/styles/subsilver2/template/template.cfg
  155. +2 −2 phpBB/styles/subsilver2/template/ucp_header.html
  156. +2 −2 phpBB/styles/subsilver2/template/ucp_main_front.html
  157. +1 −1 phpBB/styles/subsilver2/template/ucp_profile_reg_details.html
  158. +1 −1 phpBB/styles/subsilver2/theme/theme.cfg
  159. +1 −1 phpBB/viewforum.php
  160. +1 −1 phpBB/viewtopic.php
  161. +4 −0 phpunit.xml.all
  162. +5 −0 phpunit.xml.dist
  163. +35 −0 phpunit.xml.functional
  164. +19 −9 tests/RUNNING_TESTS.txt
  165. +1 −1 tests/bbcode/url_bbcode_test.php
  166. +8 −19 tests/bootstrap.php
  167. +100 −0 tests/dbal/auto_increment_test.php
  168. +1 −1 tests/dbal/cross_join_test.php
  169. +18 −47 tests/dbal/db_tools_test.php
  170. +39 −0 tests/dbal/fixtures/styles.xml
  171. +62 −0 tests/dbal/order_lower_test.php
  172. +55 −2 tests/dbal/select_test.php
  173. +1 −1 tests/dbal/write_test.php
  174. +1 −1 tests/error_collector_test.php
  175. +40 −0 tests/functional/auth_test.php
  176. +32 −0 tests/functional/browse_test.php
  177. +45 −0 tests/functional/lang_test.php
  178. +1 −1 tests/mock/cache.php
  179. +1 −1 tests/mock/session_testable.php
  180. +1 −1 tests/mock_user.php
  181. +1 −1 tests/network/checkdnsrr_test.php
  182. +1 −1 tests/network/ftp_fsock_pasv_epsv_test.php
  183. +102 −0 tests/privmsgs/delete_user_pms_test.php
  184. +215 −0 tests/privmsgs/fixtures/delete_user_pms.xml
  185. +1 −1 tests/profile/custom_test.php
  186. +1 −1 tests/random/gen_rand_string_test.php
  187. +1 −1 tests/regex/censor_test.php
  188. +4 −1 tests/regex/email_test.php
  189. +1 −1 tests/regex/ipv4_test.php
  190. +1 −1 tests/regex/ipv6_test.php
  191. +1 −1 tests/regex/password_complexity_test.php
  192. +1 −1 tests/regex/table_prefix_test.php
  193. +1 −1 tests/regex/url_test.php
  194. +1 −1 tests/request/request_var_test.php
  195. +1 −1 tests/security/base.php
  196. +1 −1 tests/security/extract_current_page_test.php
  197. +1 −1 tests/security/hash_test.php
  198. +1 −1 tests/security/redirect_test.php
  199. +1 −1 tests/session/append_sid_test.php
  200. +1 −1 tests/session/continue_test.php
  201. +1 −1 tests/session/init_test.php
  202. +1 −1 tests/session/testable_factory.php
  203. +1 −1 tests/template/template_test.php
  204. +6 −38 tests/test_framework/phpbb_database_test_case.php
  205. +8 −39 tests/test_framework/phpbb_database_test_connection_manager.php
  206. +241 −0 tests/test_framework/phpbb_functional_test_case.php
  207. +1 −1 tests/test_framework/phpbb_test_case.php
  208. +68 −1 tests/test_framework/phpbb_test_case_helpers.php
  209. +1 −1 tests/text_processing/censor_text_test.php
  210. +1 −1 tests/text_processing/make_clickable_test.php
  211. +1 −1 tests/user/lang_test.php
  212. +1 −1 tests/utf/normalizer_test.php
  213. +1 −1 tests/utf/utf8_clean_string_test.php
  214. +1 −1 tests/utf/utf8_wordwrap_test.php
  215. +1 −1 tests/wrapper/gmgetdate_test.php
  216. +1 −1 tests/wrapper/mt_rand_test.php
  217. +1 −1 tests/wrapper/version_compare_test.php
  218. +38 −0 travis/phpunit-mysql-travis.xml
  219. +40 −0 travis/phpunit-postgres-travis.xml
  220. BIN vendor/goutte.phar
View
@@ -1,12 +1,18 @@
*~
/phpunit.xml
+/phpBB/cache/*.html
/phpBB/cache/*.php
/phpBB/cache/queue.php.lock
+/phpBB/composer.phar
/phpBB/config.php
+/phpBB/config_dev.php
+/phpBB/config_test.php
+/phpBB/ext/*
/phpBB/files/*
/phpBB/images/avatars/gallery/*
/phpBB/images/avatars/upload/*
/phpBB/store/*
+/phpBB/vendor
/tests/phpbb_unit_tests.sqlite2
/tests/test_config.php
/tests/tmp/*
View
@@ -0,0 +1,27 @@
+language: php
+php:
+ - 5.2
+ - 5.3.3
+ - 5.3
+ - 5.4
+
+env:
+ - DB=mysql
+ - DB=postgres
+
+before_script:
+ - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; else pyrus install --force phpunit/DbUnit; fi"
+ - phpenv rehash
+
+script:
+ - phpunit --configuration travis/phpunit-$DB-travis.xml
+
+notifications:
+ email:
+ recipients:
+ - dev-team@phpbb.com
+ on_success: change
+ on_failure: change
View
@@ -15,6 +15,12 @@ Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the dev
3. [Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
4. Send us a pull request
+## AUTOMATED TESTING
+
+We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below.
+develop - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop)](http://travis-ci.org/phpbb/phpbb3)
+develop-olympus - [![Build Status](https://secure.travis-ci.org/phpbb/phpbb3.png?branch=develop-olympus)](http://travis-ci.org/phpbb/phpbb3)
+
## LICENSE
[GNU General Public License v2](http://opensource.org/licenses/gpl-2.0.php)
View
@@ -2,9 +2,9 @@
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
<!-- a few settings for the build -->
- <property name="newversion" value="3.0.10" />
- <property name="prevversion" value="3.0.9" />
- <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.10-RC1, 3.0.10-RC2, 3.0.10-RC3" />
+ <property name="newversion" value="3.0.11" />
+ <property name="prevversion" value="3.0.10" />
+ <property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9, 3.0.11-RC1, 3.0.11-RC2" />
<!-- no configuration should be needed beyond this point -->
<property name="oldversions" value="${olderversions}, ${prevversion}" />
@@ -4,7 +4,7 @@
*
* @package build
* @copyright (c) 2011 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU General Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
View
@@ -3,9 +3,8 @@
/**
*
* @package build
-* @version $Id$
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -388,7 +387,7 @@ function build_header($mode, $filenames, $header)
$html .= "## {$filename['phpbb_filename']}\n";
}
}
- $html .= "## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 \n";
+ $html .= "## License: http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 \n";
$html .= "############################################################## \n";
$html .= "\n";
View
@@ -2,9 +2,8 @@
/**
*
* @package build
-* @version $Id$
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
View
@@ -2,10 +2,9 @@
/**
*
* @package build
-* @version $Id$
* @copyright (c) 2000 Geoffrey T. Dairiki <dairiki@dairiki.org>
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
View
@@ -3,9 +3,8 @@
/**
*
* @package build
-* @version $Id$
* @copyright (c) 2010 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
View
@@ -11,14 +11,30 @@
#
# ln -s ../../git-tools/hooks/commit-msg \\
# .git/hooks/commit-msg
+#
+# You can configure whether invalid commit messages abort commits:
+#
+# git config phpbb.hooks.commit-msg.fatal true (abort)
+# git config phpbb.hooks.commit-msg.fatal false (warn only, do not abort)
+#
+# The default is to warn only.
+#
+# Warning/error messages use color by default if the output is a terminal
+# ("output" here is normally standard error when you run git commit).
+# To force or disable the use of color:
+#
+# git config phpbb.hooks.commit-msg.color true (force color output)
+# git config phpbb.hooks.commit-msg.color false (disable color output)
config_ns="phpbb.hooks.commit-msg";
-if [ "$(git config --bool $config_ns.fatal)" = "false" ]
+if [ "$(git config --bool $config_ns.fatal)" = "true" ]
then
- fatal=0;
-else
fatal=1;
+ severity=Error;
+else
+ fatal=0;
+ severity=Warning;
fi
debug_level=$(git config --int $config_ns.debug || echo 0);
@@ -47,14 +63,68 @@ debug()
quit()
{
- if [ $1 -gt 0 ] && [ $1 -ne $ERR_UNKNOWN ] && [ $fatal -eq 0 ]
+ if [ $1 -eq 0 ] || [ $1 -eq $ERR_UNKNOWN ]
+ then
+ # success
+ exit 0;
+ elif [ $fatal -eq 0 ]
then
+ # problems found but fatal is false
+ complain 'Please run `git commit --amend` and fix the problems mentioned.' 1>&2
exit 0;
else
+ complain "Aborting commit." 1>&2
exit $1;
fi
}
+use_color()
+{
+ if [ -z "$use_color_cached" ]
+ then
+ case $(git config --bool $config_ns.color)
+ in
+ false)
+ use_color_cached=1
+ ;;
+ true)
+ use_color_cached=0
+ ;;
+ *)
+ # tty detection in shell:
+ # http://hwi.ath.cx/jsh/list/shext/isatty.sh.html
+ tty 0>/dev/stdout >/dev/null 2>&1
+ use_color_cached=$?
+ ;;
+ esac
+ fi
+ # return value is the flag inverted -
+ # if return value is 0, this means use color
+ return $use_color_cached
+}
+
+complain()
+{
+ if use_color
+ then
+ # Careful: our argument may include arguments to echo like -n
+ # ANSI color codes:
+ # http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html
+ printf "\033[31m\033[1m"
+ if [ "$1" = "-n" ]
+ then
+ echo "$@"
+ printf "\033[0m"
+ else
+ # This will print one trailing space.
+ # Not sure how to avoid this at the moment.
+ echo "$@" $(printf "\033[0m")
+ fi
+ else
+ echo "$@"
+ fi
+}
+
# Check for empty commit message
if ! grep -qv '^#' "$1"
then
@@ -70,9 +140,9 @@ msg=$(grep -v '^#' "$1" |grep -nE '.{81,}')
if [ $? -eq 0 ]
then
- echo "The following lines are greater than 80 characters long:" >&2;
- echo >&2
- echo "$msg" >&2;
+ complain "The following lines are greater than 80 characters long:" >&2;
+ complain >&2
+ complain "$msg" >&2;
quit $ERR_LENGTH;
fi
@@ -126,9 +196,9 @@ do
# Don't be too strict.
# Commits may be temporary, intended to be squashed later.
# Just issue a warning here.
- echo "Warning: heading should be a sentence beginning with a capital letter." 1>&2
- echo "You entered:" 1>&2
- echo "$line" 1>&2
+ complain "$severity: heading should be a sentence beginning with a capital letter." 1>&2
+ complain "You entered:" 1>&2
+ complain "$line" 1>&2
fi
# restore exit code
(exit $result)
@@ -160,7 +230,7 @@ do
echo "$line" | grep -Eq "^#";
;;
*)
- echo "Unrecognised token $expect" >&2;
+ complain "Unrecognised token $expect" >&2;
quit $err;
;;
esac
@@ -231,7 +301,7 @@ do
expecting="eof";
;;
*)
- echo "Unrecognised token $expect" >&2;
+ complain "Unrecognised token $expect" >&2;
quit 254;
;;
esac
@@ -245,11 +315,11 @@ do
else
# None of the expected line formats matched
# Guess we'll call it a day here then
- echo "Syntax error on line $i:" >&2;
- echo ">> $line" >&2;
- echo -n "Expecting: " >&2;
- echo "$expecting" | sed 's/ /, /g' >&2;
- exit $err;
+ complain "Syntax error on line $i:" >&2;
+ complain ">> $line" >&2;
+ complain -n "Expecting: " >&2;
+ complain "$expecting" | sed 's/ /, /g' >&2;
+ quit $err;
fi
i=$(( $i + 1 ));
@@ -258,7 +328,7 @@ done
# If EOF is expected exit cleanly
echo "$expecting" | grep -q "eof" || (
# Unexpected EOF, error
- echo "Unexpected EOF encountered" >&2;
+ complain "Unexpected EOF encountered" >&2;
quit $ERR_EOF;
) && (
# Do post scan checks
@@ -269,17 +339,17 @@ echo "$expecting" | grep -q "eof" || (
if [ ! -z "$dupes" ]
then
- echo "The following tickets are repeated:" >&2;
- echo "$dupes" | sed 's/ /\n/g;s/^/* /g' >&2;
+ complain "The following tickets are repeated:" >&2;
+ complain "$dupes" | sed 's/ /\n/g;s/^/* /g' >&2;
quit $ERR_FOOTER;
fi
fi
# Check the branch ticket is mentioned, doesn't make sense otherwise
if [ $ticket -gt 0 ]
then
echo "$tickets" | grep -Eq "\bPHPBB3-$ticket\b" || (
- echo "Ticket ID [$ticket] of branch missing from list of tickets:" >&2;
- echo "$tickets" | sed 's/ /\n/g;s/^/* /g' >&2;
+ complain "Ticket ID [$ticket] of branch missing from list of tickets:" >&2;
+ complain "$tickets" | sed 's/ /\n/g;s/^/* /g' >&2;
quit $ERR_FOOTER;
) || exit $?;
fi
Oops, something went wrong.

0 comments on commit 7eb16cb

Please sign in to comment.