Differences between revisions 2 and 3
Revision 2 as of 2008-08-23 14:32:32
Size: 1027
Editor: ZoomQuiet
Comment:
Revision 3 as of 2009-11-28 20:15:39
Size: 1009
Editor: Elias
Comment: 删除对PageComment2组件的引用
Deletions are marked like this. Additions are marked like this.
Line 43: Line 43:
[[PageComment2]]

通过定制 pre-commit 禁止提交空注释的代码 ::-- ZoomQuiet [DateTime(2007-08-04T14:50:43Z)] TableOfContents

Include(CPUGnav)

# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed.  Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
#   [1] REPOS-PATH   (the path to this repository)
#   [2] TXN-NAME     (the name of the txn about to be committed)
#


REPOS="$1"
TXN="$2"
# Make sure that the log message contains some text.
SVNLOOK=/usr/local/bin/svnlook
$SVNLOOK log -t "$TXN" "$REPOS" | \
   grep "[a-zA-Z0-9]" > /dev/null 

if [ $? != 0 ]; then
        echo "$TXN $REPOS" 1>&2
        echo "Alert! Commit message can not be empty." 1>&2
        exit 1
fi

exit 0

1. 反馈

SubVerSion/AntiEmptyCi (last edited 2009-12-25 07:16:41 by localhost)