From 7fa3a2f83b1f5e67c96072a1a2185c36b0867332 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Jul 2008 15:05:59 -0400 Subject: [PATCH 1/3] response --- ...crubber_undoes_email_obfuscation_by_Text::Markdown.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/bugs/htmlscrubber_undoes_email_obfuscation_by_Text::Markdown.mdwn b/doc/bugs/htmlscrubber_undoes_email_obfuscation_by_Text::Markdown.mdwn index b010a02b3..f193efc0c 100644 --- a/doc/bugs/htmlscrubber_undoes_email_obfuscation_by_Text::Markdown.mdwn +++ b/doc/bugs/htmlscrubber_undoes_email_obfuscation_by_Text::Markdown.mdwn @@ -28,3 +28,10 @@ The relevant commits are on the master branch of [my "fork" of ikiwiki on Github --Gabriel. [github]: http://github.com/gmcmanus/ikiwiki/ + +> Thanks for coming up with a patch, but overriding +> `Text::Markdown::_EncodeEmailAddress` gets into its internals more than +> I'm comfortable with. +> +> It would probably be best to add an option to [[cpan Text;:Markdown]] to +> let the email address munging be disabled. --[[Joey]] From d9062864ee7ad8248ad41c0b1cd17ec5f2f4dafc Mon Sep 17 00:00:00 2001 From: Gabriel McManus Date: Sun, 20 Jul 2008 17:40:16 +1000 Subject: [PATCH 2/3] Rebuild pages that change their type. Previously, if a page changed its type but not its mtime (e.g. mv page.txt page.mdwn), then it would not be rebuilt. Now, check if the source of a page has changed, in which case force a rebuild of that page. (cherry picked from commit b6a3b8a683fed7a7f6d77a5b3f2dfbd14c849843) --- IkiWiki/Render.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index ab3ccd7ae..90058199c 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -319,6 +319,10 @@ sub refresh () { #{{{ # check for added or removed pages foreach my $file (@files) { my $page=pagename($file); + if (exists $pagesources{$page} && $pagesources{$page} ne $file) { + # the page has changed its type + $forcerebuild{$page}=1; + } $pagesources{$page}=$file; if (! $pagemtime{$page}) { if (isinternal($page)) { From b95669c3c80a9a9d04e88fedb66813c0be343b5b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 23 Jul 2008 16:13:37 -0400 Subject: [PATCH 3/3] Rebuild pages that change their type. (Gabriel McManus) --- debian/changelog | 1 + .../page_is_not_rebuilt_if_it_changes_extension.mdwn | 7 +++++++ doc/bugs/underlaydir_file_expose.mdwn | 11 +++-------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index c699f698b..2b216ca95 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ ikiwiki (2.55) UNRELEASED; urgency=low a security check that is a good safe default, but problimatic overkill in some situations. * attachment: Do not escape _ when determining attachment filenames. + * Rebuild pages that change their type. (Gabriel McManus) -- Joey Hess Mon, 21 Jul 2008 11:35:46 -0400 diff --git a/doc/bugs/page_is_not_rebuilt_if_it_changes_extension.mdwn b/doc/bugs/page_is_not_rebuilt_if_it_changes_extension.mdwn index d5719744e..e47be8d28 100644 --- a/doc/bugs/page_is_not_rebuilt_if_it_changes_extension.mdwn +++ b/doc/bugs/page_is_not_rebuilt_if_it_changes_extension.mdwn @@ -18,3 +18,10 @@ ikiwiki fails when trying to create a directory "a" where there is a file "a" (or vice versa). The same problem occurs if both "a" and "a.mdwn" exist in the wiki. + +> Thank you for looking into it! +> +> On the use of forcerebuild, I think it's acceptable; plugins that unset +> it would break other plugins that set it, too. +> +> [[cherry-picked|done]] --[[Joey]] diff --git a/doc/bugs/underlaydir_file_expose.mdwn b/doc/bugs/underlaydir_file_expose.mdwn index b8e84969c..c827c6dd8 100644 --- a/doc/bugs/underlaydir_file_expose.mdwn +++ b/doc/bugs/underlaydir_file_expose.mdwn @@ -1,9 +1,4 @@ If a file in the srcdir is removed, exposing a file in the underlaydir, -ikiwiki will not notice the change and rebuild it until the file in the -underlaydir gets a mtime newer than the mtime the removed file had. - -Relatedly, if there are two files with different extensions that build a -page with the same name, in a directory, ikiwiki will update the page -whenever either changes, using the changed one as the source. But if that -most recently changed one is removed, it won't rebuild the page using the -older one as the source. +ikiwiki will notice the removal and delete the page from the destdir. The +page from the underlay will not be built. (However, it will be if the wiki +gets rebuilt.)