]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
fix display of web commits in recentchanges
authorJoey Hess <joey@gnu.kitenet.net>
Sat, 4 Apr 2009 22:36:39 +0000 (18:36 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Sat, 4 Apr 2009 22:36:39 +0000 (18:36 -0400)
The darcs backend appends @web to the names of web committers, so remove it
when extracting.

IkiWiki/Plugin/darcs.pm

index 5927f23da7f220f790b32b35f6053bcaa81c8dd7..1ed9f0044aa25d3f6e8b5f914f3844b80307cf7b 100644 (file)
@@ -354,16 +354,19 @@ sub rcs_recentchanges ($) {
                push @message, { line => $_ } foreach (@{$patch->{name}});
 
                my $committype;
-               if ($patch->{author} =~ /\@web$/) {
+               my $author;
+               if ($patch->{author} =~ /(.*)\@web$/) {
+                       $author = $1;
                        $committype = "web";
                }
                else {
+                       $author=$patch->{author};
                        $committype = "darcs";
                }
 
                push @ret, {
                        rev => $patch->{hash},
-                       user => $patch->{author},
+                       user => $author,
                        committype => $committype,
                        when => $when, 
                        message => [@message],