X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/db9f2b1b2b97fd92b09f170c3b567ec59030bf0a..fe1a69e11a16b337338593b784b48a4783de5cec:/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; }