Revision 22
Added by pcwacht about 19 years ago
trunk/SVNRepository/hooks/pre-revprop-change.tmpl | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
# PRE-REVPROP-CHANGE HOOK |
|
4 |
# |
|
5 |
# The pre-revprop-change hook is invoked before a revision property |
|
6 |
# is added, modified or deleted. Subversion runs this hook by invoking |
|
7 |
# a program (script, executable, binary, etc.) named 'pre-revprop-change' |
|
8 |
# (for which this file is a template), with the following ordered |
|
9 |
# arguments: |
|
10 |
# |
|
11 |
# [1] REPOS-PATH (the path to this repository) |
|
12 |
# [2] REVISION (the revision being tweaked) |
|
13 |
# [3] USER (the username of the person tweaking the property) |
|
14 |
# [4] PROPNAME (the property being set on the revision) |
|
15 |
# [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted) |
|
16 |
# |
|
17 |
# [STDIN] PROPVAL ** the new property value is passed via STDIN. |
|
18 |
# |
|
19 |
# If the hook program exits with success, the propchange happens; but |
|
20 |
# if it exits with failure (non-zero), the propchange doesn't happen. |
|
21 |
# The hook program can use the 'svnlook' utility to examine the |
|
22 |
# existing value of the revision property. |
|
23 |
# |
|
24 |
# WARNING: unlike other hooks, this hook MUST exist for revision |
|
25 |
# properties to be changed. If the hook does not exist, Subversion |
|
26 |
# will behave as if the hook were present, but failed. The reason |
|
27 |
# for this is that revision properties are UNVERSIONED, meaning that |
|
28 |
# a successful propchange is destructive; the old value is gone |
|
29 |
# forever. We recommend the hook back up the old value somewhere. |
|
30 |
# |
|
31 |
# On a Unix system, the normal procedure is to have 'pre-revprop-change' |
|
32 |
# invoke other programs to do the real work, though it may do the |
|
33 |
# work itself too. |
|
34 |
# |
|
35 |
# Note that 'pre-revprop-change' must be executable by the user(s) who will |
|
36 |
# invoke it (typically the user httpd runs as), and that user must |
|
37 |
# have filesystem-level permission to access the repository. |
|
38 |
# |
|
39 |
# On a Windows system, you should name the hook program |
|
40 |
# 'pre-revprop-change.bat' or 'pre-revprop-change.exe', |
|
41 |
# but the basic idea is the same. |
|
42 |
# |
|
43 |
# The hook program typically does not inherit the environment of |
|
44 |
# its parent process. For example, a common problem is for the |
|
45 |
# PATH environment variable to not be set to its usual value, so |
|
46 |
# that subprograms fail to launch unless invoked via absolute path. |
|
47 |
# If you're having unexpected problems with a hook program, the |
|
48 |
# culprit may be unusual (or missing) environment variables. |
|
49 |
# |
|
50 |
# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in |
|
51 |
# the Subversion repository at |
|
52 |
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and |
|
53 |
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ |
|
54 |
|
|
55 |
|
|
56 |
REPOS="$1" |
|
57 |
REV="$2" |
|
58 |
USER="$3" |
|
59 |
PROPNAME="$4" |
|
60 |
ACTION="$5" |
|
61 |
|
|
62 |
if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi |
|
63 |
|
|
64 |
echo "Changing revision properties other than svn:log is prohibited" >&2 |
|
65 |
exit 1 |
trunk/SVNRepository/hooks/post-commit.tmpl | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
# POST-COMMIT HOOK |
|
4 |
# |
|
5 |
# The post-commit hook is invoked after a commit. Subversion runs |
|
6 |
# this hook by invoking a program (script, executable, binary, etc.) |
|
7 |
# named 'post-commit' (for which this file is a template) with the |
|
8 |
# following ordered arguments: |
|
9 |
# |
|
10 |
# [1] REPOS-PATH (the path to this repository) |
|
11 |
# [2] REV (the number of the revision just committed) |
|
12 |
# |
|
13 |
# The default working directory for the invocation is undefined, so |
|
14 |
# the program should set one explicitly if it cares. |
|
15 |
# |
|
16 |
# Because the commit has already completed and cannot be undone, |
|
17 |
# the exit code of the hook program is ignored. The hook program |
|
18 |
# can use the 'svnlook' utility to help it examine the |
|
19 |
# newly-committed tree. |
|
20 |
# |
|
21 |
# On a Unix system, the normal procedure is to have 'post-commit' |
|
22 |
# invoke other programs to do the real work, though it may do the |
|
23 |
# work itself too. |
|
24 |
# |
|
25 |
# Note that 'post-commit' must be executable by the user(s) who will |
|
26 |
# invoke it (typically the user httpd runs as), and that user must |
|
27 |
# have filesystem-level permission to access the repository. |
|
28 |
# |
|
29 |
# On a Windows system, you should name the hook program |
|
30 |
# 'post-commit.bat' or 'post-commit.exe', |
|
31 |
# but the basic idea is the same. |
|
32 |
# |
|
33 |
# The hook program typically does not inherit the environment of |
|
34 |
# its parent process. For example, a common problem is for the |
|
35 |
# PATH environment variable to not be set to its usual value, so |
|
36 |
# that subprograms fail to launch unless invoked via absolute path. |
|
37 |
# If you're having unexpected problems with a hook program, the |
|
38 |
# culprit may be unusual (or missing) environment variables. |
|
39 |
# |
|
40 |
# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in |
|
41 |
# the Subversion repository at |
|
42 |
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and |
|
43 |
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ |
|
44 |
|
|
45 |
|
|
46 |
REPOS="$1" |
|
47 |
REV="$2" |
|
48 |
|
|
49 |
commit-email.pl "$REPOS" "$REV" commit-watchers@example.org |
|
50 |
log-commit.py --repository "$REPOS" --revision "$REV" |
trunk/SVNRepository/hooks/post-lock.tmpl | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
# POST-LOCK HOOK |
|
4 |
# |
|
5 |
# The post-lock hook is run after a path is locked. Subversion runs |
|
6 |
# this hook by invoking a program (script, executable, binary, etc.) |
|
7 |
# named 'post-lock' (for which this file is a template) with the |
|
8 |
# following ordered arguments: |
|
9 |
# |
|
10 |
# [1] REPOS-PATH (the path to this repository) |
|
11 |
# [2] USER (the user who created the lock) |
|
12 |
# |
|
13 |
# The paths that were just locked are passed to the hook via STDIN (As |
|
14 |
# of Subversion 1.2, only one path is passed per invocation, but the |
|
15 |
# plan is to pass all locked paths at once in Subversion 1.3 and |
|
16 |
# later). |
|
17 |
# |
|
18 |
# The default working directory for the invocation is undefined, so |
|
19 |
# the program should set one explicitly if it cares. |
|
20 |
# |
|
21 |
# Because the lock has already been created and cannot be undone, |
|
22 |
# the exit code of the hook program is ignored. The hook program |
|
23 |
# can use the 'svnlook' utility to help it examine the |
|
24 |
# newly-created lock. |
|
25 |
# |
|
26 |
# On a Unix system, the normal procedure is to have 'post-lock' |
|
27 |
# invoke other programs to do the real work, though it may do the |
|
28 |
# work itself too. |
|
29 |
# |
|
30 |
# Note that 'post-lock' must be executable by the user(s) who will |
|
31 |
# invoke it (typically the user httpd runs as), and that user must |
|
32 |
# have filesystem-level permission to access the repository. |
|
33 |
# |
|
34 |
# On a Windows system, you should name the hook program |
|
35 |
# 'post-lock.bat' or 'post-lock.exe', |
|
36 |
# but the basic idea is the same. |
|
37 |
# |
|
38 |
# Here is an example hook script, for a Unix /bin/sh interpreter: |
|
39 |
|
|
40 |
REPOS="$1" |
|
41 |
USER="$2" |
|
42 |
|
|
43 |
# Send email to interested parties, let them know a lock was created: |
|
44 |
mailer.py lock "$REPOS" "$USER" /path/to/mailer.conf |
trunk/SVNRepository/hooks/pre-commit.tmpl | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
# PRE-COMMIT HOOK |
|
4 |
# |
|
5 |
# The pre-commit hook is invoked before a Subversion txn is |
|
6 |
# committed. Subversion runs this hook by invoking a program |
|
7 |
# (script, executable, binary, etc.) named 'pre-commit' (for which |
|
8 |
# this file is a template), with the following ordered arguments: |
|
9 |
# |
|
10 |
# [1] REPOS-PATH (the path to this repository) |
|
11 |
# [2] TXN-NAME (the name of the txn about to be committed) |
|
12 |
# |
|
13 |
# The default working directory for the invocation is undefined, so |
|
14 |
# the program should set one explicitly if it cares. |
|
15 |
# |
|
16 |
# If the hook program exits with success, the txn is committed; but |
|
17 |
# if it exits with failure (non-zero), the txn is aborted, no commit |
|
18 |
# takes place, and STDERR is returned to the client. The hook |
|
19 |
# program can use the 'svnlook' utility to help it examine the txn. |
|
20 |
# |
|
21 |
# On a Unix system, the normal procedure is to have 'pre-commit' |
|
22 |
# invoke other programs to do the real work, though it may do the |
|
23 |
# work itself too. |
|
24 |
# |
|
25 |
# *** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT *** |
|
26 |
# *** FOR REVISION PROPERTIES (like svn:log or svn:author). *** |
|
27 |
# |
|
28 |
# This is why we recommend using the read-only 'svnlook' utility. |
|
29 |
# In the future, Subversion may enforce the rule that pre-commit |
|
30 |
# hooks should not modify the versioned data in txns, or else come |
|
31 |
# up with a mechanism to make it safe to do so (by informing the |
|
32 |
# committing client of the changes). However, right now neither |
|
33 |
# mechanism is implemented, so hook writers just have to be careful. |
|
34 |
# |
|
35 |
# Note that 'pre-commit' must be executable by the user(s) who will |
|
36 |
# invoke it (typically the user httpd runs as), and that user must |
|
37 |
# have filesystem-level permission to access the repository. |
|
38 |
# |
|
39 |
# On a Windows system, you should name the hook program |
|
40 |
# 'pre-commit.bat' or 'pre-commit.exe', |
|
41 |
# but the basic idea is the same. |
|
42 |
# |
|
43 |
# The hook program typically does not inherit the environment of |
|
44 |
# its parent process. For example, a common problem is for the |
|
45 |
# PATH environment variable to not be set to its usual value, so |
|
46 |
# that subprograms fail to launch unless invoked via absolute path. |
|
47 |
# If you're having unexpected problems with a hook program, the |
|
48 |
# culprit may be unusual (or missing) environment variables. |
|
49 |
# |
|
50 |
# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in |
|
51 |
# the Subversion repository at |
|
52 |
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and |
|
53 |
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ |
|
54 |
|
|
55 |
|
|
56 |
REPOS="$1" |
|
57 |
TXN="$2" |
|
58 |
|
|
59 |
# Make sure that the log message contains some text. |
|
60 |
SVNLOOK=/usr/local/bin/svnlook |
|
61 |
$SVNLOOK log -t "$TXN" "$REPOS" | \ |
|
62 |
grep "[a-zA-Z0-9]" > /dev/null || exit 1 |
|
63 |
|
|
64 |
# Check that the author of this commit has the rights to perform |
|
65 |
# the commit on the files and directories being modified. |
|
66 |
commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1 |
|
67 |
|
|
68 |
# All checks passed, so allow the commit. |
|
69 |
exit 0 |
trunk/SVNRepository/hooks/pre-lock.tmpl | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
# PRE-LOCK HOOK |
|
4 |
# |
|
5 |
# The pre-lock hook is invoked before an exclusive lock is |
|
6 |
# created. Subversion runs this hook by invoking a program |
|
7 |
# (script, executable, binary, etc.) named 'pre-lock' (for which |
|
8 |
# this file is a template), with the following ordered arguments: |
|
9 |
# |
|
10 |
# [1] REPOS-PATH (the path to this repository) |
|
11 |
# [2] PATH (the path in the repository about to be locked) |
|
12 |
# [3] USER (the user creating the lock) |
|
13 |
# |
|
14 |
# The default working directory for the invocation is undefined, so |
|
15 |
# the program should set one explicitly if it cares. |
|
16 |
# |
|
17 |
# If the hook program exits with success, the lock is created; but |
|
18 |
# if it exits with failure (non-zero), the lock action is aborted |
|
19 |
# and STDERR is returned to the client. |
|
20 |
|
|
21 |
# On a Unix system, the normal procedure is to have 'pre-lock' |
|
22 |
# invoke other programs to do the real work, though it may do the |
|
23 |
# work itself too. |
|
24 |
# |
|
25 |
# Note that 'pre-lock' must be executable by the user(s) who will |
|
26 |
# invoke it (typically the user httpd runs as), and that user must |
|
27 |
# have filesystem-level permission to access the repository. |
|
28 |
# |
|
29 |
# On a Windows system, you should name the hook program |
|
30 |
# 'pre-lock.bat' or 'pre-lock.exe', |
|
31 |
# but the basic idea is the same. |
|
32 |
# |
|
33 |
# Here is an example hook script, for a Unix /bin/sh interpreter: |
|
34 |
|
|
35 |
REPOS="$1" |
|
36 |
PATH="$2" |
|
37 |
USER="$3" |
|
38 |
|
|
39 |
# If a lock exists and is owned by a different person, don't allow it |
|
40 |
# to be broken. |
|
41 |
|
|
42 |
# (Maybe this script could send email to the to the lock owner?) |
|
43 |
SVNLOOK=/usr/local/bin/svnlook |
|
44 |
GREP=/bin/grep |
|
45 |
SED=/bin/sed |
|
46 |
|
|
47 |
LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \ |
|
48 |
$GREP '^Owner:' | $SED 's/Owner: //'` |
|
49 |
|
|
50 |
# If we get no result from svnlook, there's no lock, allow the lock to |
|
51 |
# happen: |
|
52 |
if [ "$LOCK_OWNER" == "" ]; then |
|
53 |
exit 0 |
|
54 |
fi |
|
55 |
|
|
56 |
# If the person locking matches the lock's owner, allow the lock to |
|
57 |
# happen: |
|
58 |
if [ "$LOCK_OWNER" == "$USER" ]; then |
|
59 |
exit 0 |
|
60 |
fi |
|
61 |
|
|
62 |
# Otherwise, we've got an owner mismatch, so return failure: |
|
63 |
echo "Error: $PATH already locked by ${LOCK_OWNER}." 1>&2 |
|
64 |
exit 1 |
trunk/SVNRepository/hooks/post-unlock.tmpl | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
# POST-UNLOCK HOOK |
|
4 |
# |
|
5 |
# The post-unlock hook runs after a path is unlocked. Subversion runs |
|
6 |
# this hook by invoking a program (script, executable, binary, etc.) |
|
7 |
# named 'post-unlock' (for which this file is a template) with the |
|
8 |
# following ordered arguments: |
|
9 |
# |
|
10 |
# [1] REPOS-PATH (the path to this repository) |
|
11 |
# [2] USER (the user who destroyed the lock) |
|
12 |
# |
|
13 |
# The paths that were just unlocked are passed to the hook via STDIN |
|
14 |
# (As of Subversion 1.2, only one path is passed per invocation, but |
|
15 |
# the plan is to pass all locked paths at once in Subversion 1.3 and |
|
16 |
# later). |
|
17 |
# |
|
18 |
# The default working directory for the invocation is undefined, so |
|
19 |
# the program should set one explicitly if it cares. |
|
20 |
# |
|
21 |
# Because the lock has already been destroyed and cannot be undone, |
|
22 |
# the exit code of the hook program is ignored. |
|
23 |
# |
|
24 |
# On a Unix system, the normal procedure is to have 'post-unlock' |
|
25 |
# invoke other programs to do the real work, though it may do the |
|
26 |
# work itself too. |
|
27 |
# |
|
28 |
# Note that 'post-unlock' must be executable by the user(s) who will |
|
29 |
# invoke it (typically the user httpd runs as), and that user must |
|
30 |
# have filesystem-level permission to access the repository. |
|
31 |
# |
|
32 |
# On a Windows system, you should name the hook program |
|
33 |
# 'post-unlock.bat' or 'post-unlock.exe', |
|
34 |
# but the basic idea is the same. |
|
35 |
# |
|
36 |
# Here is an example hook script, for a Unix /bin/sh interpreter: |
|
37 |
|
|
38 |
REPOS="$1" |
|
39 |
USER="$2" |
|
40 |
|
|
41 |
# Send email to interested parties, let them know a lock was removed: |
|
42 |
mailer.py unlock "$REPOS" "$USER" /path/to/mailer.conf |
trunk/SVNRepository/hooks/pre-unlock.tmpl | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
# PRE-UNLOCK HOOK |
|
4 |
# |
|
5 |
# The pre-unlock hook is invoked before an exclusive lock is |
|
6 |
# destroyed. Subversion runs this hook by invoking a program |
|
7 |
# (script, executable, binary, etc.) named 'pre-unlock' (for which |
|
8 |
# this file is a template), with the following ordered arguments: |
|
9 |
# |
|
10 |
# [1] REPOS-PATH (the path to this repository) |
|
11 |
# [2] PATH (the path in the repository about to be unlocked) |
|
12 |
# [3] USER (the user destroying the lock) |
|
13 |
# |
|
14 |
# The default working directory for the invocation is undefined, so |
|
15 |
# the program should set one explicitly if it cares. |
|
16 |
# |
|
17 |
# If the hook program exits with success, the lock is destroyed; but |
|
18 |
# if it exits with failure (non-zero), the unlock action is aborted |
|
19 |
# and STDERR is returned to the client. |
|
20 |
|
|
21 |
# On a Unix system, the normal procedure is to have 'pre-unlock' |
|
22 |
# invoke other programs to do the real work, though it may do the |
|
23 |
# work itself too. |
|
24 |
# |
|
25 |
# Note that 'pre-unlock' must be executable by the user(s) who will |
|
26 |
# invoke it (typically the user httpd runs as), and that user must |
|
27 |
# have filesystem-level permission to access the repository. |
|
28 |
# |
|
29 |
# On a Windows system, you should name the hook program |
|
30 |
# 'pre-unlock.bat' or 'pre-unlock.exe', |
|
31 |
# but the basic idea is the same. |
|
32 |
# |
|
33 |
# Here is an example hook script, for a Unix /bin/sh interpreter: |
|
34 |
|
|
35 |
REPOS="$1" |
|
36 |
PATH="$2" |
|
37 |
USER="$3" |
|
38 |
|
|
39 |
# If a lock is owned by a different person, don't allow it be broken. |
|
40 |
# (Maybe this script could send email to the to the lock owner?) |
|
41 |
|
|
42 |
SVNLOOK=/usr/local/bin/svnlook |
|
43 |
GREP=/bin/grep |
|
44 |
SED=/bin/sed |
|
45 |
|
|
46 |
LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \ |
|
47 |
$GREP '^Owner: ' | $SED 's/Owner: //'` |
|
48 |
|
|
49 |
# If we get no result from svnlook, there's no lock, return success: |
|
50 |
if [ "$LOCK_OWNER" == "" ]; then |
|
51 |
exit 0 |
|
52 |
fi |
|
53 |
# If the person unlocking matches the lock's owner, return success: |
|
54 |
if [ "$LOCK_OWNER" == "$USER" ]; then |
|
55 |
exit 0 |
|
56 |
fi |
|
57 |
|
|
58 |
# Otherwise, we've got an owner mismatch, so return failure: |
|
59 |
echo "Error: $PATH locked by ${LOCK_OWNER}." 1>&2 |
|
60 |
exit 1 |
trunk/SVNRepository/hooks/post-revprop-change.tmpl | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
# POST-REVPROP-CHANGE HOOK |
|
4 |
# |
|
5 |
# The post-revprop-change hook is invoked after a revision property |
|
6 |
# has been added, modified or deleted. Subversion runs this hook by |
|
7 |
# invoking a program (script, executable, binary, etc.) named |
|
8 |
# 'post-revprop-change' (for which this file is a template), with the |
|
9 |
# following ordered arguments: |
|
10 |
# |
|
11 |
# [1] REPOS-PATH (the path to this repository) |
|
12 |
# [2] REV (the revision that was tweaked) |
|
13 |
# [3] USER (the username of the person tweaking the property) |
|
14 |
# [4] PROPNAME (the property that was changed) |
|
15 |
# [5] ACTION (the property was 'A'dded, 'M'odified, or 'D'eleted) |
|
16 |
# |
|
17 |
# [STDIN] PROPVAL ** the old property value is passed via STDIN. |
|
18 |
# |
|
19 |
# Because the propchange has already completed and cannot be undone, |
|
20 |
# the exit code of the hook program is ignored. The hook program |
|
21 |
# can use the 'svnlook' utility to help it examine the |
|
22 |
# new property value. |
|
23 |
# |
|
24 |
# On a Unix system, the normal procedure is to have 'post-revprop-change' |
|
25 |
# invoke other programs to do the real work, though it may do the |
|
26 |
# work itself too. |
|
27 |
# |
|
28 |
# Note that 'post-revprop-change' must be executable by the user(s) who will |
|
29 |
# invoke it (typically the user httpd runs as), and that user must |
|
30 |
# have filesystem-level permission to access the repository. |
|
31 |
# |
|
32 |
# On a Windows system, you should name the hook program |
|
33 |
# 'post-revprop-change.bat' or 'post-revprop-change.exe', |
|
34 |
# but the basic idea is the same. |
|
35 |
# |
|
36 |
# The hook program typically does not inherit the environment of |
|
37 |
# its parent process. For example, a common problem is for the |
|
38 |
# PATH environment variable to not be set to its usual value, so |
|
39 |
# that subprograms fail to launch unless invoked via absolute path. |
|
40 |
# If you're having unexpected problems with a hook program, the |
|
41 |
# culprit may be unusual (or missing) environment variables. |
|
42 |
# |
|
43 |
# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in |
|
44 |
# the Subversion repository at |
|
45 |
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and |
|
46 |
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ |
|
47 |
|
|
48 |
|
|
49 |
REPOS="$1" |
|
50 |
REV="$2" |
|
51 |
USER="$3" |
|
52 |
PROPNAME="$4" |
|
53 |
ACTION="$5" |
|
54 |
|
|
55 |
propchange-email.pl "$REPOS" "$REV" "$USER" "$PROPNAME" watchers@example.org |
trunk/SVNRepository/hooks/start-commit.tmpl | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
# START-COMMIT HOOK |
|
4 |
# |
|
5 |
# The start-commit hook is invoked before a Subversion txn is created |
|
6 |
# in the process of doing a commit. Subversion runs this hook |
|
7 |
# by invoking a program (script, executable, binary, etc.) named |
|
8 |
# 'start-commit' (for which this file is a template) |
|
9 |
# with the following ordered arguments: |
|
10 |
# |
|
11 |
# [1] REPOS-PATH (the path to this repository) |
|
12 |
# [2] USER (the authenticated user attempting to commit) |
|
13 |
# |
|
14 |
# The default working directory for the invocation is undefined, so |
|
15 |
# the program should set one explicitly if it cares. |
|
16 |
# |
|
17 |
# If the hook program exits with success, the commit continues; but |
|
18 |
# if it exits with failure (non-zero), the commit is stopped before |
|
19 |
# a Subversion txn is created, and STDERR is returned to the client. |
|
20 |
# |
|
21 |
# On a Unix system, the normal procedure is to have 'start-commit' |
|
22 |
# invoke other programs to do the real work, though it may do the |
|
23 |
# work itself too. |
|
24 |
# |
|
25 |
# Note that 'start-commit' must be executable by the user(s) who will |
|
26 |
# invoke it (typically the user httpd runs as), and that user must |
|
27 |
# have filesystem-level permission to access the repository. |
|
28 |
# |
|
29 |
# On a Windows system, you should name the hook program |
|
30 |
# 'start-commit.bat' or 'start-commit.exe', |
|
31 |
# but the basic idea is the same. |
|
32 |
# |
|
33 |
# The hook program typically does not inherit the environment of |
|
34 |
# its parent process. For example, a common problem is for the |
|
35 |
# PATH environment variable to not be set to its usual value, so |
|
36 |
# that subprograms fail to launch unless invoked via absolute path. |
|
37 |
# If you're having unexpected problems with a hook program, the |
|
38 |
# culprit may be unusual (or missing) environment variables. |
|
39 |
# |
|
40 |
# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in |
|
41 |
# the Subversion repository at |
|
42 |
# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and |
|
43 |
# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ |
|
44 |
|
|
45 |
|
|
46 |
REPOS="$1" |
|
47 |
USER="$2" |
|
48 |
|
|
49 |
commit-allower.pl --repository "$REPOS" --user "$USER" || exit 1 |
|
50 |
special-auth-check.py --user "$USER" --auth-level 3 || exit 1 |
|
51 |
|
|
52 |
# All checks passed, so allow the commit. |
|
53 |
exit 0 |
trunk/SVNRepository/conf/svnserve.conf | ||
---|---|---|
1 |
### This file controls the configuration of the svnserve daemon, if you |
|
2 |
### use it to allow access to this repository. (If you only allow |
|
3 |
### access through http: and/or file: URLs, then this file is |
|
4 |
### irrelevant.) |
|
5 |
|
|
6 |
### Visit http://subversion.tigris.org/ for more information. |
|
7 |
|
|
8 |
# [general] |
|
9 |
### These options control access to the repository for unauthenticated |
|
10 |
### and authenticated users. Valid values are "write", "read", |
|
11 |
### and "none". The sample settings below are the defaults. |
|
12 |
# anon-access = read |
|
13 |
# auth-access = write |
|
14 |
### The password-db option controls the location of the password |
|
15 |
### database file. Unless you specify a path starting with a /, |
|
16 |
### the file's location is relative to the conf directory. |
|
17 |
### Uncomment the line below to use the default password file. |
|
18 |
# password-db = passwd |
|
19 |
### This option specifies the authentication realm of the repository. |
|
20 |
### If two repositories have the same authentication realm, they should |
|
21 |
### have the same password database, and vice versa. The default realm |
|
22 |
### is repository's uuid. |
|
23 |
# realm = My First Repository |
trunk/SVNRepository/conf/passwd | ||
---|---|---|
1 |
### This file is an example password file for svnserve. |
|
2 |
### Its format is similar to that of svnserve.conf. As shown in the |
|
3 |
### example below it contains one section labelled [users]. |
|
4 |
### The name and password for each user follow, one account per line. |
|
5 |
|
|
6 |
# [users] |
|
7 |
# harry = harryssecret |
|
8 |
# sally = sallyssecret |
trunk/SVNRepository/db/revs/0 | ||
---|---|---|
1 |
PLAIN |
|
2 |
END |
|
3 |
ENDREP |
|
4 |
id: 0.0.r0/17 |
|
5 |
type: dir |
|
6 |
count: 0 |
|
7 |
text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e |
|
8 |
cpath: / |
|
9 |
|
|
10 |
|
|
11 |
17 107 |
trunk/SVNRepository/db/revprops/0 | ||
---|---|---|
1 |
K 8 |
|
2 |
svn:date |
|
3 |
V 27 |
|
4 |
2005-09-05T19:19:23.203125Z |
|
5 |
END |
trunk/SVNRepository/db/current | ||
---|---|---|
1 |
0 1 1 |
trunk/SVNRepository/db/uuid | ||
---|---|---|
1 |
6b03b328-9bc6-3d48-be0f-2860eb8a9d3d |
trunk/SVNRepository/db/fs-type | ||
---|---|---|
1 |
fsfs |
trunk/SVNRepository/db/format | ||
---|---|---|
1 |
1 |
trunk/SVNRepository/format | ||
---|---|---|
1 |
3 |
trunk/SVNRepository/README.txt | ||
---|---|---|
1 |
This is a Subversion repository; use the 'svnadmin' tool to examine |
|
2 |
it. Do not add, delete, or modify files here unless you know how |
|
3 |
to avoid corrupting the repository. |
|
4 |
|
|
5 |
If the directory "db" contains a Berkeley DB environment, |
|
6 |
you may need to tweak the values in "db/DB_CONFIG" to match the |
|
7 |
requirements of your site. |
|
8 |
|
|
9 |
Visit http://subversion.tigris.org/ for more information. |
trunk/SVNRepository/locks/db.lock | ||
---|---|---|
1 |
DB lock file, representing locks on the versioned filesystem. |
|
2 |
|
|
3 |
All accessors -- both readers and writers -- of the repository's |
|
4 |
Berkeley DB environment take out shared locks on this file, and |
|
5 |
each accessor removes its lock when done. If and when the DB |
|
6 |
recovery procedure is run, the recovery code takes out an |
|
7 |
exclusive lock on this file, so we can be sure no one else is |
|
8 |
using the DB during the recovery. |
|
9 |
|
|
10 |
You should never have to edit or remove this file. |
trunk/SVNRepository/locks/db-logs.lock | ||
---|---|---|
1 |
DB logs lock file, representing locks on the versioned filesystem logs. |
|
2 |
|
|
3 |
All log manipulators of the repository's |
|
4 |
Berkeley DB environment take out exclusive locks on this file |
|
5 |
to ensure that only one accessor manupulates the logs at the time. |
|
6 |
|
|
7 |
You should never have to edit or remove this file. |
Also available in: Unified diff