From 3bfa109971637f4f813968f69f70921c23445dbe Mon Sep 17 00:00:00 2001 From: joey Date: Sat, 23 Jun 2007 12:12:59 +0000 Subject: * Allow svnpath config option to contain additional extra slashes anywhere w/o confusing ikiwiki. * Rcs modules are now imported, so other modules that need similar normalisation of configs etc can do so. --- IkiWiki/Rcs/svn.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'IkiWiki/Rcs/svn.pm') diff --git a/IkiWiki/Rcs/svn.pm b/IkiWiki/Rcs/svn.pm index c5e977bce..761a40a27 100644 --- a/IkiWiki/Rcs/svn.pm +++ b/IkiWiki/Rcs/svn.pm @@ -5,8 +5,20 @@ use strict; use IkiWiki; use POSIX qw(setlocale LC_CTYPE); +package IkiWiki::Rcs::svn; + +sub import { #{{{ + if (exists $IkiWiki::config{svnpath}) { + # code depends on the path not having extraneous slashes + $IkiWiki::config{svnpath}=~tr#/#/#s; + $IkiWiki::config{svnpath}=~s/\/$//; + $IkiWiki::config{svnpath}=~s/^\///; + } +} #}}} + + package IkiWiki; - + # svn needs LC_CTYPE set to a UTF-8 locale, so try to find one. Any will do. sub find_lc_ctype() { my $current = setlocale(LC_CTYPE()); -- cgit v1.2.3