diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-06-23 12:12:59 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-06-23 12:12:59 +0000 |
commit | 3bfa109971637f4f813968f69f70921c23445dbe (patch) | |
tree | 2a4b9dfce606413a23d0d806b252aabc9369188c /IkiWiki | |
parent | 9a122f001aa44af70b8a6c0861c1ab869d4379f7 (diff) | |
download | ikiwiki-3bfa109971637f4f813968f69f70921c23445dbe.tar ikiwiki-3bfa109971637f4f813968f69f70921c23445dbe.tar.gz |
* 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.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Rcs/svn.pm | 14 |
1 files changed, 13 insertions, 1 deletions
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()); |