From: Joey Hess Date: Sat, 30 Jul 2011 08:46:26 +0000 (+0200) Subject: fix mercurial commit with session but without nickname X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=577f5d38376141a9bad565c8bbd4c35cd1e5c6e2;p=ikiwiki.git fix mercurial commit with session but without nickname --- diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index 102b4692b..c7f920ab9 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -180,7 +180,6 @@ sub rcs_commit_helper (@) { $ENV{HGENCODING} = 'utf-8'; my $user="Anonymous"; - my $nickname; if (defined $params{session}) { if (defined $params{session}->param("name")) { $user = $params{session}->param("name"); @@ -189,6 +188,7 @@ sub rcs_commit_helper (@) { $user = $params{session}->remote_addr(); } + my $nickname=$user; if (defined $params{session}->param("nickname")) { $nickname=encode_utf8($params{session}->param("nickname")); $nickname=~s/\s+/_/g;