From 6a3bbf126483eb2c4e89835547c1402977e7a1c4 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 7 Sep 2008 14:46:09 -0300 Subject: [PATCH] deliver mail relative to ikiwiki srcdir; comment out refresh in postal-accept.pl --- filters/postal-accept.pl | 7 +++++-- test-wiki/test.setup | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/filters/postal-accept.pl b/filters/postal-accept.pl index be15c86b6..6a90469ea 100644 --- a/filters/postal-accept.pl +++ b/filters/postal-accept.pl @@ -43,13 +43,16 @@ if ($to =~ m/$prefix($Convert::YText::valid_rex)/){ # hmm, not sure why pagesource is indexed by page.ext, but it is awkward here # die("page ".$page." does not exist") if (!exists $IkiWiki::pagesources{$page}); - + + chdir $config{srcdir} || die ("chdir $config{srcdir}: $!"); + my $comments_folder=$page."/comments".$folder_ext; # write the message to the comment $message->accept($comments_folder) || die("delivery failed"); + debug("delivered to $comments_folder\n"); # update vcs, copied from Ikiwiki::Plugins::attachment if ($config{rcs}) { @@ -63,7 +66,7 @@ if ($to =~ m/$prefix($Convert::YText::valid_rex)/){ # refresh wiki - IkiWiki::refresh(); +# IkiWiki::refresh(); IkiWiki::saveindex(); } diff --git a/test-wiki/test.setup b/test-wiki/test.setup index c8af8f328..0f30f9577 100644 --- a/test-wiki/test.setup +++ b/test-wiki/test.setup @@ -11,7 +11,7 @@ use IkiWiki::Setup::Standard { adminemail => 'me@example.org', # Be sure to customise these.. - srcdir => "test-src", + srcdir => $ENV{PWD}."/test-src", destdir => "/tmp/postal-test", url => "file:///tmp/postaltest-wiki/", @@ -30,8 +30,8 @@ use IkiWiki::Setup::Standard { rcs => "git", #historyurl => "http://git.example.org/gitweb.cgi?p=wiki.git;a=history;f=[[file]]", #diffurl => "http://git.example.org/gitweb.cgi?p=wiki.git;a=blobdiff;h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_parent]];f=[[file]]", - #gitorigin_branch => "origin", - gitmaster_branch => "testvcs", + gitorigin_branch => "origin", + gitmaster_branch => "master", # Tla stuff. #rcs => "tla" -- 2.26.2