]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
* Improve code that ignores files in the underlaydir if the srcdir has a
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 28 Dec 2006 22:15:38 +0000 (22:15 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 28 Dec 2006 22:15:38 +0000 (22:15 +0000)
  file building the same page. Now it will work even if the extensions of
  the source files differ.

IkiWiki/Render.pm
debian/changelog
doc/bugs/underlaydir_file_expose.mdwn
doc/index/discussion.mdwn

index 86396420736a8e7120815da60b579e9781b8b0cb..678075b821178b089ea7c4dab27874a5e15647c2 100644 (file)
@@ -247,13 +247,16 @@ sub refresh () { #{{{
                                        warn("skipping bad filename $_\n");
                                }
                                else {
-                                       # Don't add files that are in the
+                                       # Don't add pages that are in the
                                        # srcdir.
                                        $f=~s/^\Q$config{underlaydir}\E\/?//;
                                        if (! -e "$config{srcdir}/$f" && 
                                            ! -l "$config{srcdir}/$f") {
-                                               push @files, $f;
-                                               $exists{pagename($f)}=1;
+                                               my $page=pagename($f);
+                                               if (! $exists{$page}) {
+                                                       push @files, $f;
+                                                       $exists{$page}=1;
+                                               }
                                        }
                                }
                        }
@@ -266,10 +269,10 @@ sub refresh () { #{{{
        my @add;
        foreach my $file (@files) {
                my $page=pagename($file);
+               $pagesources{$page}=$file;
                if (! $oldpagemtime{$page}) {
                        push @add, $file;
                        $pagecase{lc $page}=$page;
-                       $pagesources{$page}=$file;
                        if ($config{getctime} && -e "$config{srcdir}/$file") {
                                $pagectime{$page}=rcs_getctime("$config{srcdir}/$file");
                        }
index f95d08403bef6109b46ed1e7532c469e10169d27..e455be1a33393be0123953acb03519c99c7afc77 100644 (file)
@@ -11,8 +11,11 @@ ikiwiki (1.37) UNRELEASED; urgency=low
     suprising behavior when using a setup file and not uncommenting any RCS
     options.
   * Fix some bugs in the commit email sending code.
+  * Improve code that ignores files in the underlaydir if the srcdir has a
+    file building the same page. Now it will work even if the extensions of
+    the source files differ.
 
- -- Joey Hess <joeyh@debian.org>  Sun, 24 Dec 2006 00:51:11 -0500
+ -- Joey Hess <joeyh@debian.org>  Thu, 28 Dec 2006 17:13:43 -0500
 
 ikiwiki (1.36) unstable; urgency=low
 
index 0c6f55425b2c1d2b5a529c78aa15854c52ff2438..b8e84969c894a771f582aa7b27cde3e1803c380d 100644 (file)
@@ -1,3 +1,9 @@
 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.
index ac4f32d2661076e4cb5ce4622dcd160a37f6d324..7197681172afc737a54950ca943b1b03d3b7b5db 100644 (file)
@@ -230,3 +230,5 @@ that sort of thing.  Where or how do I submit it for inclusion?
 >> Until I fix that, you can avoid the one from the underlay directory by
 >> setting `underlaydir` to point to an empty directory. --[[Joey]]
 >>
+>> Ok, fixed (in svn), it will now prefer files in the srcdir over files
+>> in the underlaydir that build the same page, no matter what extension.