From 577f5d38376141a9bad565c8bbd4c35cd1e5c6e2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 30 Jul 2011 10:46:26 +0200 Subject: [PATCH] fix mercurial commit with session but without nickname --- IkiWiki/Plugin/mercurial.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.26.2