]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
* Add -refresh option to ikiwiki-mass-rebuild and use that on upgrades that
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 27 May 2006 19:04:46 +0000 (19:04 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 27 May 2006 19:04:46 +0000 (19:04 +0000)
  do not need a full rebuild, in order to update any basewiki pages.

IkiWiki/CGI.pm
Makefile.PL
basewiki/style.css
debian/changelog
debian/postinst
doc/ikiwiki-mass-rebuild.mdwn
ikiwiki-mass-rebuild
templates/editpage.tmpl

index 6ead8fc56b141aba89de3c0e43bc739eb9d56c4b..cf6000314a15f3a07aa9a483f9b574b2da9b7bf2 100644 (file)
@@ -291,13 +291,13 @@ sub cgi_editpage ($$) { #{{{
 
        eval q{use CGI::FormBuilder};
        my $form = CGI::FormBuilder->new(
-               fields => [qw(do rcsinfo subpage from page content comments)],
+               fields => [qw(do rcsinfo subpage from page editcontent comments)],
                header => 1,
                method => 'POST',
                validate => {
-                       content => '/.+/',
+                       editcontent => '/.+/',
                },
-               required => [qw{content}],
+               required => [qw{editcontent}],
                javascript => 0,
                params => $q,
                action => $config{cgiurl},
@@ -330,7 +330,7 @@ sub cgi_editpage ($$) { #{{{
        $form->field(name => "subpage", type => 'hidden');
        $form->field(name => "page", value => "$page", force => 1);
        $form->field(name => "comments", type => "text", size => 80);
-       $form->field(name => "content", type => "textarea", rows => 20,
+       $form->field(name => "editcontent", type => "textarea", rows => 20,
                cols => 80);
        $form->tmpl_param("can_commit", $config{rcs});
        $form->tmpl_param("indexlink", indexlink());
@@ -351,7 +351,7 @@ sub cgi_editpage ($$) { #{{{
                require IkiWiki::Render;
                $form->tmpl_param("page_preview",
                        htmlize($config{default_pageext},
-                               linkify($page, $page, $form->field('content'))));
+                               linkify($page, $page, $form->field('editcontent'))));
        }
        else {
                $form->tmpl_param("page_preview", "");
@@ -410,14 +410,14 @@ sub cgi_editpage ($$) { #{{{
                }
                elsif ($form->field("do") eq "edit") {
                        page_locked($page, $session);
-                       if (! defined $form->field('content') || 
-                           ! length $form->field('content')) {
+                       if (! defined $form->field('editcontent') || 
+                           ! length $form->field('editcontent')) {
                                my $content="";
                                if (exists $pagesources{lc($page)}) {
                                        $content=readfile(srcfile($pagesources{lc($page)}));
                                        $content=~s/\n/\r\n/g;
                                }
-                               $form->field(name => "content", value => $content,
+                               $form->field(name => "editcontent", value => $content,
                                        force => 1);
                        }
                        $form->tmpl_param("page_select", 0);
@@ -431,7 +431,7 @@ sub cgi_editpage ($$) { #{{{
                # save page
                page_locked($page, $session);
                
-               my $content=$form->field('content');
+               my $content=$form->field('editcontent');
                $content=~s/\r\n/\n/g;
                $content=~s/\r/\n/g;
                writefile($file, $config{srcdir}, $content);
@@ -463,7 +463,7 @@ sub cgi_editpage ($$) { #{{{
                                $form->field(name => "rcsinfo", value => rcs_prepedit($file),
                                        force => 1);
                                $form->tmpl_param("page_conflict", 1);
-                               $form->field("content", value => $conflict, force => 1);
+                               $form->field("editcontent", value => $conflict, force => 1);
                                $form->field("do", "edit)");
                                $form->tmpl_param("page_select", 0);
                                $form->field(name => "page", type => 'hidden');
index aac6946baba3bc6de2dadf97146aad80b2aefddb..b20070869fe8f26f7b0e277196dd6795dc139259 100755 (executable)
@@ -22,7 +22,7 @@ extra_build:
                
 extra_clean:
        rm -rf html doc/.ikiwiki
-       rm -f ikiwiki.man
+       rm -f ikiwiki.man ikiwiki-mass-rebuild.man
 
 extra_install:
        install -d $(PREFIX)/share/ikiwiki/templates
index 0d64240e609fea1fafc5e72fddbc81d0ac408500..8d51685fb7a97a7a2583e6a69320f7242ec251d3 100644 (file)
@@ -26,7 +26,7 @@
        border-bottom: 1px solid #000;
 }
 
-#content textarea {
+#editcontent {
        width: 100%;
 }      
 
index 667a49c30806ff202afd96b54822cb3bd6a28cd2..44d324dd8cef9a4aea8328e3455c2b7bb29360bf 100644 (file)
@@ -35,8 +35,10 @@ ikiwiki (1.4) UNRELEASED; urgency=low
     (This was slightly complex to do as the link still has to be constructed
     relative to the inlining page.)
   * Make page edit textarea resize to fit browser window.
+  * Add -refresh option to ikiwiki-mass-rebuild and use that on upgrades that
+    do not need a full rebuild, in order to update any basewiki pages.
 
- -- Joey Hess <joeyh@debian.org>  Sat, 27 May 2006 14:28:19 -0400
+ -- Joey Hess <joeyh@debian.org>  Sat, 27 May 2006 15:01:52 -0400
 
 ikiwiki (1.3) unstable; urgency=low
 
index 9135af7548285142c401de312895ee0f1ebda58d..72b457716af6434e74b45994bc4c23d42b647df6 100755 (executable)
@@ -9,4 +9,6 @@ firstcompat=1.4
 if [ "$1" = configure ] && \
    dpkg --compare-versions "$2" lt "$firstcompat"; then
        ikiwiki-mass-rebuild
+else
+       ikiwiki-mass-rebuild -refresh
 fi
index 5c2cf40e57af4c93be829e361434c65c3ede5dd8..a9a7f4adb8d8b2f45e111a06d8cd67c3d8cbff3a 100644 (file)
@@ -14,6 +14,13 @@ on a system. You will need to list the wikis it shuld build in the file
 
 user /path/to/wiki
 
+# OPTIONS
+
+* -refresh
+
+  Rather than rebuilding all the wikis, just build any changed pages
+  (including pages inherited from the basewiki).
+
 # AUTHOR
 
 Joey Hess <joey@kitenet.net>
index daba2ca4351f10b6c2c0ae3131eab2ec51278e76..dac54cb8ee5d2fa00864543d4a5cb29effefe9a9 100755 (executable)
@@ -1,6 +1,11 @@
 #!/bin/sh
 set -e
 
+action=""
+if [ -n "$1" ]; then
+       action="$1"
+fi
+
 wikilist=/etc/ikiwiki/wikilist
 
 processline () {
@@ -15,8 +20,8 @@ processline () {
        if [ ! -f "$setup" ]; then
                echo "warning: $setup specified in /etc/ikiwiki/wikilist does not exist, skipping" >&2
        else
-               echo "Rebuilding $setup as user $user ..."
-               su "$user" -c "ikiwiki -setup $setup"
+               echo "Processing $setup as user $user ..."
+               su "$user" -c "ikiwiki -setup $setup $action"
        fi
 }
 
index 89f01e6643ada046c38a6568edccf17be519ee45..ec48df4c223995ddd70001a79b6e6d1ab77e332b 100644 (file)
@@ -27,11 +27,12 @@ confict and commit again to save your changes.
 <TMPL_VAR FIELD-FROM>
 <TMPL_VAR FIELD-RCSINFO>
 <TMPL_IF NAME="PAGE_SELECT">
-Page location: <TMPL_VAR FIELD-PAGE><br />
+Page location: <TMPL_VAR FIELD-PAGE>
 <TMPL_ELSE>
+<br />
 <TMPL_VAR FIELD-PAGE>
 </TMPL_IF>
-<TMPL_VAR FIELD-CONTENT><br />
+<TMPL_VAR FIELD-EDITCONTENT><br />
 <TMPL_IF NAME="CAN_COMMIT">
 Optional comment about this change:<br />
 <TMPL_VAR FIELD-COMMENTS><br />