$ci{ "${who}_epoch" } = $epoch;
$ci{ "${who}_tz" } = $tz;
- if ($name =~ m/^[^<]+\s+<([^@>]+)/) {
- $ci{"${who}_username"} = $1;
+ if ($name =~ m/^([^<]+)\s+<([^@>]+)/) {
+ $ci{"${who}_name"} = $1;
+ $ci{"${who}_username"} = $2;
}
elsif ($name =~ m/^([^<]+)\s+<>$/) {
$ci{"${who}_username"} = $1;
push @messages, { line => $line };
}
- my $user=$ci->{'author_username'};
+ my $user=$ci->{'author_name'};
+ my $usershort=$ci->{'author_username'};
my $web_commit = ($ci->{'author'} =~ /\@web>/);
-
+
+ if ($usershort =~ /:\/\//) {
+ $usershort=undef; # url; not really short
+ }
+
# compatability code for old web commit messages
if (! $web_commit &&
defined $messages[0] &&
push @rets, {
rev => $sha1,
user => $user,
+ usershort => $usershort,
committype => $web_commit ? "web" : "git",
when => $when,
message => [@messages],
];
push @{$change->{pages}}, { link => '...' } if $is_excess;
- # See if the committer is an openid.
$change->{author}=$change->{user};
my $oiduser=eval { IkiWiki::openiduser($change->{user}) };
if (defined $oiduser) {
$change->{authorurl}=$change->{user};
- $change->{user}=$oiduser;
+ $change->{user}=defined $change->{usershort} ? $change->{usershort} : $oiduser;
}
elsif (length $config{cgiurl}) {
$change->{authorurl} = IkiWiki::cgiurl(
+ikiwiki (3.20100624) UNRELEASED; urgency=low
+
+ * Add new optional field usershort to rcs_recentchanges.
+
+ -- Joey Hess <joeyh@debian.org> Wed, 23 Jun 2010 15:30:04 -0400
+
ikiwiki (3.20100623) unstable; urgency=low
* openid: Add openid_realm and openid_cgiurl configuration options,
{
rev => # the RCSs id for this commit
- user => # name of user who made the change,
+ user => # user who made the change (may be an openid),
+ usershort => # short name of user (optional; not an openid),
+
committype => # either "web" or the name of the rcs,
when => # time when the change was made,
message => [