]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Rcs/bzr.pm
web commit by http://jblevins.org/: Bug report update
[ikiwiki.git] / IkiWiki / Rcs / bzr.pm
index 43822fe8ffad4cc7fe2f73689d0d97b3c8f757fa..526036bf36e0ce5ec6fab47cb8a46991d2ebe0b2 100644 (file)
@@ -92,10 +92,8 @@ sub rcs_add ($) { # {{{
 sub rcs_recentchanges ($) { #{{{
        my ($num) = @_;
 
-       eval q{use CGI 'escapeHTML'};
-       error($@) if $@;
-
-       my @cmdline = ("bzr", "log", "-v", "--limit", $num, $config{srcdir});
+       my @cmdline = ("bzr", "log", "-v", "--show-ids", "--limit", $num, 
+                          $config{srcdir});
        open (my $out, "@cmdline |");
 
        eval q{use Date::Parse};
@@ -111,12 +109,14 @@ sub rcs_recentchanges ($) { #{{{
                }
 
                foreach my $file (split(/\n/, $info->{files})) {
+                       my ($filename, $fileid) = split(/[ \t]+/, $file);
                        my $diffurl = $config{'diffurl'};
-                       $diffurl =~ s/\[\[file\]\]/$file/go;
+                       $diffurl =~ s/\[\[file\]\]/$filename/go;
+                       $diffurl =~ s/\[\[file-id\]\]/$fileid/go;
                        $diffurl =~ s/\[\[r2\]\]/$info->{revno}/go;
 
                        push @pages, {
-                               page => pagename($file),
+                               page => pagename($filename),
                                diffurl => $diffurl,
                        };
                }