use strict;
use IkiWiki;
+use URI::Escape q{uri_escape_utf8};
use File::chdir;
return undef # success
}
-sub cvs_keyword_subst_args ($) {
- my $file = shift;
-
- local $CWD = $config{srcdir};
-
- eval q{use File::MimeInfo};
- error($@) if $@;
- my $filemime = File::MimeInfo::default($file);
- # if (-T $file) {
-
- if (defined($filemime) && $filemime eq 'text/plain') {
- return ($file);
- }
- else {
- return ('-kb', $file);
- }
-}
-
sub rcs_add ($) {
# filename is relative to the root of the srcdir
my $file=shift;
$oldrev =~ s/INITIAL/0/;
$newrev =~ s/\(DEAD\)//;
my $diffurl = defined $config{diffurl} ? $config{diffurl} : "";
- $diffurl=~s/\[\[file\]\]/$page/g;
+ my $epage = uri_escape_utf8($page);
+ $diffurl=~s/\[\[file\]\]/$epage/g;
$diffurl=~s/\[\[r1\]\]/$oldrev/g;
$diffurl=~s/\[\[r2\]\]/$newrev/g;
unshift @pages, {
return (-d "$dir/CVS") ? 1 : 0;
}
+sub cvs_keyword_subst_args ($) {
+ my $file = shift;
+
+ local $CWD = $config{srcdir};
+
+ eval q{use File::MimeInfo};
+ error($@) if $@;
+ my $filemime = File::MimeInfo::default($file);
+ # if (-T $file) {
+
+ if (defined($filemime) && $filemime eq 'text/plain') {
+ return ($file);
+ }
+ else {
+ return ('-kb', $file);
+ }
+}
+
sub cvs_runcvs(@) {
my @cmd = @_;
unshift @cmd, 'cvs', '-Q';