summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs/svn.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-26 21:00:11 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-26 21:00:11 -0400
commitc83fd4a32868d46765a88f6903dd807f18c9ae84 (patch)
tree8caffbf1eee77601014d4e58833e74e5cc55891c /IkiWiki/Rcs/svn.pm
parent4604fadf0acb92ec3e64092bcd9e76eae93b93b2 (diff)
wrapper setup reorg
Flattened the wrapper setup, as this lets it be handled better by the setup generation code.
Diffstat (limited to 'IkiWiki/Rcs/svn.pm')
-rw-r--r--IkiWiki/Rcs/svn.pm28
1 files changed, 24 insertions, 4 deletions
diff --git a/IkiWiki/Rcs/svn.pm b/IkiWiki/Rcs/svn.pm
index 9b8d4be13..e34d8fe3e 100644
--- a/IkiWiki/Rcs/svn.pm
+++ b/IkiWiki/Rcs/svn.pm
@@ -8,6 +8,9 @@ use IkiWiki;
use POSIX qw(setlocale LC_CTYPE);
hook(type => "checkconfig", id => "svn", call => sub { #{{{
+ if (! defined $config{diffurl}) {
+ $config{diffurl}="";
+ }
if (! defined $config{svnpath}) {
$config{svnpath}="trunk";
}
@@ -17,13 +20,18 @@ hook(type => "checkconfig", id => "svn", call => sub { #{{{
$config{svnpath}=~s/\/$//;
$config{svnpath}=~s/^\///;
}
+ if (exists $config{svn_wrapper}) {
+ push @{$config{wrappers}}, {
+ wrapper => $config{svn_wrapper},
+ wrappermode => (defined $config{svn_wrappermode} ? $config{svn_wrappermode} : "04755"),
+ };
+ }
}); #}}}
hook(type => "getsetup", id => "svn", call => sub { #{{{
return
svnrepo => {
type => "string",
- default => "",
example => "/svn/wiki",
description => "subversion repository location",
safe => 0, # path
@@ -31,14 +39,27 @@ hook(type => "getsetup", id => "svn", call => sub { #{{{
},
svnpath => {
type => "string",
- default => "trunk",
+ example => "trunk",
description => "path inside repository where the wiki is located",
safe => 0, # paranoia
rebuild => 0,
},
+ svn_wrapper => {
+ type => "string",
+ example => "/svn/wikirepo/hooks/post-commit",
+ description => "svn post-commit executable to generate",
+ safe => 0, # file
+ rebuild => 0,
+ },
+ svn_wrappermode => {
+ type => "string",
+ example => '04755',
+ description => "mode for svn_wrapper (can safely be made suid)",
+ safe => 0,
+ rebuild => 0,
+ },
historyurl => {
type => "string",
- default => "",
example => "http://svn.example.org/trunk/[[file]]",
description => "viewvc url to show file history ([[file]] substituted)",
safe => 1,
@@ -46,7 +67,6 @@ hook(type => "getsetup", id => "svn", call => sub { #{{{
},
diffurl => {
type => "string",
- default => "",
example => "http://svn.example.org/trunk/[[file]]?root=wiki&amp;r1=[[r1]]&amp;r2=[[r2]]",
description => "viewvc url to show a diff ([[file]], [[r1]], and [[r2]] substituted)",
safe => 1,