X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/4fb26f4e60f2df282fc972e4b8506ccd306de789..7dd110ba51c738e249ea974b71f85477c543e5bc:/IkiWiki/Plugin/bzr.pm diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 3bc4ea8dd..e2b102dee 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -5,6 +5,7 @@ use warnings; use strict; use IkiWiki; use Encode; +use URI::Escape q{uri_escape_utf8}; use open qw{:utf8 :std}; sub import { @@ -194,7 +195,7 @@ sub rcs_add ($) { sub rcs_remove ($) { my ($file) = @_; - my @cmdline = ("bzr", "rm", "--force", "--quiet", "$config{srcdir}/$file"); + my @cmdline = ("bzr", "rm", "--quiet", "$config{srcdir}/$file"); if (system(@cmdline) != 0) { warn "'@cmdline' failed: $!"; } @@ -242,8 +243,10 @@ sub rcs_recentchanges ($) { # Skip source name in renames $filename =~ s/^.* => //; + my $efilename = uri_escape_utf8($filename); + my $diffurl = defined $config{'diffurl'} ? $config{'diffurl'} : ""; - $diffurl =~ s/\[\[file\]\]/$filename/go; + $diffurl =~ s/\[\[file\]\]/$efilename/go; $diffurl =~ s/\[\[file-id\]\]/$fileid/go; $diffurl =~ s/\[\[r2\]\]/$info->{revno}/go; @@ -299,7 +302,7 @@ sub extract_timestamp (@) { open (my $out, "-|", @_); my @log = bzr_log($out); - if (length @log < 1) { + if (length(scalar(@log)) < 1) { return 0; }