]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge branch 'autotag'
authorJoey Hess <joey@kitenet.net>
Thu, 22 Apr 2010 04:34:03 +0000 (00:34 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 22 Apr 2010 04:34:03 +0000 (00:34 -0400)
1  2 
IkiWiki.pm
debian/NEWS
debian/changelog
doc/todo/auto-create_tag_pages_according_to_a_template.mdwn

diff --combined IkiWiki.pm
index 509f9ba2e721be581f65c9b5fbf5b0960b4f42c1,dbf50feb46d31cc1a97f14456527d7cd1ea6a2cd..19ed69d758557666d848e2f2656b57fa7ee61ad7
@@@ -12,19 -12,20 +12,20 @@@ use Storable
  use open qw{:utf8 :std};
  
  use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase
-           %pagestate %wikistate %renderedfiles %oldrenderedfiles
-           %pagesources %destsources %depends %depends_simple %hooks
-           %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks};
+       %pagestate %wikistate %renderedfiles %oldrenderedfiles
+       %pagesources %destsources %depends %depends_simple %hooks
+       %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks
+       %autofiles};
  
  use Exporter q{import};
  our @EXPORT = qw(hook debug error template htmlpage deptype
-                  add_depends pagespec_match pagespec_match_list bestlink
-                htmllink readfile writefile pagetype srcfile pagename
-                displaytime will_render gettext ngettext urlto targetpage
-                add_underlay pagetitle titlepage linkpage newpagefile
-                inject add_link
-                  %config %links %pagestate %wikistate %renderedfiles
-                  %pagesources %destsources %typedlinks);
+       add_depends pagespec_match pagespec_match_list bestlink
+       htmllink readfile writefile pagetype srcfile pagename
+       displaytime will_render gettext ngettext urlto targetpage
+       add_underlay pagetitle titlepage linkpage newpagefile
+       inject add_link add_autofile
+       %config %links %pagestate %wikistate %renderedfiles
+       %pagesources %destsources %typedlinks);
  our $VERSION = 3.00; # plugin interface version, next is ikiwiki version
  our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE
  our $installdir='/usr'; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE
@@@ -1818,12 -1819,10 +1819,12 @@@ sub add_depends ($$;$) 
        foreach my $p (keys %pagesources) {
                my $r=$sub->($p, location => $page);
                my $i=$r->influences;
 +              my $static=$r->influences_static;
                foreach my $k (keys %$i) {
 +                      next unless $r || $static || $k eq $page;
                        $depends_simple{$page}{lc $k} |= $i->{$k};
                }
 -              last if $r->influences_static;
 +              last if $static;
        }
  
        $depends{$page}{$pagespec} |= $deptype;
@@@ -1887,7 -1886,7 +1888,7 @@@ sub define_gettext () 
                        return shift;
                }
        };
-       *ngettext=sub {
+       *ngettext=sub {
                $getobj->() if $getobj;
                if ($gettext_obj) {
                        $gettext_obj->nget(@_);
@@@ -1952,6 -1951,15 +1953,15 @@@ sub add_link ($$;$) 
        }
  }
  
+ sub add_autofile ($$$) {
+       my $file=shift;
+       my $plugin=shift;
+       my $generator=shift;
+       
+       $autofiles{$file}{plugin}=$plugin;
+       $autofiles{$file}{generator}=$generator;
+ }
  sub sortspec_translate ($$) {
        my $spec = shift;
        my $reverse = shift;
@@@ -2138,9 -2146,6 +2148,9 @@@ sub pagespec_match_list ($$;@) 
                my $r=$sub->($p, %params, location => $page);
                error(sprintf(gettext("cannot match pages: %s"), $r))
                        if $r->isa("IkiWiki::ErrorReason");
 +              unless ($r) {
 +                      $r->remove_influence($p);
 +              }
                $accum |= $r;
                if ($r) {
                        push @matches, $p;
@@@ -2226,7 -2231,7 +2236,7 @@@ sub merge_influences 
        my $anded=shift;
  
        if (! $anded || (($this || %{$this->[1]}) &&
 -                      ($other || %{$other->[1]}))) {
 +                       ($other || %{$other->[1]}))) {
                foreach my $influence (keys %{$other->[1]}) {
                        $this->[1]{$influence} |= $other->[1]{$influence};
                }
        }
  }
  
 +sub remove_influence {
 +      my $this=shift;
 +      my $torm=shift;
 +
 +      delete $this->[1]{$torm};
 +}
 +
  package IkiWiki::ErrorReason;
  
  our @ISA = 'IkiWiki::FailReason';
diff --combined debian/NEWS
index 2fbe0ea7bf81defcd907f41011d71ff16b359877,8b87bc601b97ca9e0c926263ca20091485845591..433fc845cdb925d522a82390db5e525c1e64429a
@@@ -1,4 -1,4 +1,4 @@@
 -ikiwiki (3.20100406) unstable; urgency=low
 +ikiwiki (3.20100422) unstable; urgency=low
  
    This version of ikiwiki has a lot of changes that you need to know about.
  
    not regular wikilinks. If your wiki accidentially relied on the old,
    buggy behavior, you might need to change pagespecs to use `link()`.
  
+   Tag pages can automatically be created as new tags are used. This
+   feature is enabled by default if you have configured a tagbase. It
+   can be turned on or off using the `tag_autocreate` setting.
    The title_natural sort method (as used by the inline directive, etc)
    have been moved to the new sortnaturally plugin, which is not enabled
    by default since it requires the Sort::Naturally perl module.
diff --combined debian/changelog
index 647124b8ac7958ffc567cfcd350c39e7ba87da13,a63860088a16c3a8b24e28bb0be5cedb46a91e0c..0ab04f522864ab2c1bff2bcae802f00b49d01801
@@@ -1,6 -1,8 +1,8 @@@
 -ikiwiki (3.20100415) UNRELEASED; urgency=low
 +ikiwiki (3.20100422) UNRELEASED; urgency=low
  
    [ Joey Hess ]
+   * tag: Automatic creation of tag pages can now be enabled using
+     the tag_autocreate setting. (David Riebenbauer)
    * bzr: Fix bzr log parsing to work with bzr 2.0. (liw)
    * comments: Fix missing entity encoding in title.
    * txt: Add a special case for robots.txt.
@@@ -62,8 -64,6 +64,8 @@@
      $pagestate{index}.
    * bzr: Support rcs_getmtime, and fix rcs_getctime implementation
      (Jelmer Vernooij)
 +  * Quite a lot of new optimisations, and one major fix to a recent
 +    performance regression.
  
   -- Joey Hess <joeyh@debian.org>  Sun, 04 Apr 2010 12:17:11 -0400
  
index b05e1db3d1cf6ea7d66d5ea52c14667cb3146b6e,1e0a910f46a88416a9ee16d03c4275858a006c55..f6d444890086df1f6e7740496280a98e808fd931
@@@ -239,7 -239,7 +239,7 @@@ wrong direction. (fixed --[[Joey]] 
  [[!template id=gitbranch branch=origin/autotag author="[[Joey]]"]]
  I've pushed an autotag branch of my own, which refactors
  things a bit and fixes bugs around deletion/recreation.
 -I've tested it somewhat. --[[Joey]]
 +I've tested it fairly thouroughly. --[[Joey]]
  
  [f3abeac919c4736429bd3362af6edf51ede8e7fe]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=f3abeac919c4736429bd3362af6edf51ede8e7fe (commitdiff for f3abeac919c4736429bd3362af6edf51ede8e7fe)
  [4af4d26582f0c2b915d7102fb4a604b176385748]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=4af4d26582f0c2b915d7102fb4a604b176385748 (commitdiff for 4af4d26582f0c2b915d7102fb4a604b176385748)
  [da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0 (commitdiff for da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0)
  [a358d74bef51dae31332ff27e897fe04834571e6]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=a358d74bef51dae31332ff27e897fe04834571e6 (commitdiff for a358d74bef51dae31332ff27e897fe04834571e6)
  [981400177d68a279f485727be3f013e68f0bf691]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=981400177d68a279f485727be3f013e68f0bf691 (commitdiff for 981400177d68a279f485727be3f013e68f0bf691)
+ [[!tag done]]