fixed a bug of not handling 'head revision' correctly in code_folder.php
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
|
||||
cfgdir=$(CFGDIR)
|
||||
cfg_DATA = codepot.ini codepot.sql codepot.a2ldap
|
||||
cfg_SCRIPTS = start-commit pre-commit post-commit
|
||||
cfg_SCRIPTS = start-commit pre-commit post-commit pre-revprop-change post-revprop-change
|
||||
|
||||
EXTRA_DIST = $(cfg_DATA) $(cfg_SCRIPTS)
|
||||
|
||||
|
13
codepot/etc/post-revprop-change
Executable file
13
codepot/etc/post-revprop-change
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
REPOBASE="`basename "${1}"`"
|
||||
REV="${2}"
|
||||
USER="${3}"
|
||||
PROPNAME="${4}"
|
||||
ACTION="${5}"
|
||||
|
||||
# [STDIN] PROPVAL ** the old property value is passed via STDIN.
|
||||
|
||||
# does not care if logging has failed.
|
||||
wget -q -O- "%API%/logRevpropChange/svn/${REPOBASE}/${REV}" 2>/dev/null
|
||||
exit 0
|
24
codepot/etc/pre-revprop-change
Executable file
24
codepot/etc/pre-revprop-change
Executable file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
REPOBASE="`basename "${1}"`"
|
||||
USER="${2}"
|
||||
USER="${3}"
|
||||
PROPNAME="${4}"
|
||||
ACTION="${5}"
|
||||
|
||||
# [STDIN] PROPVAL ** the new property value is passed via STDIN.
|
||||
|
||||
ans="`wget -q -O- "%API%/projectHasMember/${REPOBASE}/${USER}" 2>/dev/null`"
|
||||
[ "${ans}" = "YES" ] && exit 0
|
||||
|
||||
[ "${ans}" = "NO" ] && {
|
||||
echo "-------------------------------------------------------------" >&2
|
||||
echo " ${USER} is not a member of ${REPOBASE}" >&2
|
||||
echo "-------------------------------------------------------------" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "---------------------------------------------------------------------" >&2
|
||||
echo " Failed to check membership of ${REPOBASE} for ${USER}" >&2
|
||||
echo "---------------------------------------------------------------------" >&2
|
||||
exit 1
|
Reference in New Issue
Block a user