From 3428cdd9d5b4f9e537df39d971187ee1ffd9c2fb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 2 Jan 2009 14:15:47 -0500 Subject: ikiwiki-makerepo: Fix injecting of empty mercurial and bzr repositories. Closes: #510518 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 07062b04a..26e22aa94 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.01) UNRELEASED; urgency=low + + * ikiwiki-makerepo: Fix injecting of empty mercurial and bzr repositories. + Closes: #510518 + + -- Joey Hess Fri, 02 Jan 2009 14:12:16 -0500 + ikiwiki (3.00) unstable; urgency=low * Remove support for GlobLists. -- cgit v1.2.3 From 66ff63c296b5be28a95b32d849926714470049af Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 3 Jan 2009 12:40:22 -0500 Subject: Fix documentation about git hook to use right name. Closes: #510393 --- debian/changelog | 1 + doc/rcs/git.mdwn | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 26e22aa94..0f2c75787 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ ikiwiki (3.01) UNRELEASED; urgency=low * ikiwiki-makerepo: Fix injecting of empty mercurial and bzr repositories. Closes: #510518 + * Fix documentation about git hook to use right name. Closes: #510393 -- Joey Hess Fri, 02 Jan 2009 14:12:16 -0500 diff --git a/doc/rcs/git.mdwn b/doc/rcs/git.mdwn index deddfbd6d..000eb0b3c 100644 --- a/doc/rcs/git.mdwn +++ b/doc/rcs/git.mdwn @@ -20,9 +20,9 @@ working clones (with working directories) as leaf nodes. The root working clones. One of the leaf node clone repositories is special; it has working -directory which is used to compile the wiki from, and is also used by the +directory which is used to compile the wiki, and is also used by the [[cgi]] to commit changes made via the web interface. It is special -since the `post-commit` hook for the bare root repository is used to +since the `post-update` hook for the bare root repository is used to trigger an update of this repository, and then an ikiwiki refresh updates the published wiki itself. @@ -43,9 +43,9 @@ repositories: repositories will push to/pull from. It is a bare repository, since there are problems pushing to a repository that has a working directory. This is called _repository_ in [[ikiwiki-makerepo]]'s - manual page. Nominally, this bare repository has a `post-commit` hook + manual page. Nominally, this bare repository has a `post-update` hook that either is or calls ikiwiki's git wrapper, which changes to the - working directory for ikiwiki, does a _git pull_, and refreshes ikiwiki + working directory for ikiwiki, does a `git pull`, and refreshes ikiwiki to regenerate the wiki with any new content. The [[setup]] page describes how to do this. @@ -64,7 +64,7 @@ repositories: hack on your wiki. you can commit local changes to the version on the laptop, perhaps while offline. Any new content should be pushed to the bare master repository when you are ready to publish it, and then - the post-commit hook of the bare repository will ensure that the + the post-update hook of the bare repository will ensure that the ikiwiki's source directory is updated, and the ikiwiki refreshed with the new content. @@ -79,7 +79,7 @@ It is **paramount** that you **never** push to the non-bare repository Instead, clone the bare repository as mentioned above, and push **only** to the bare repository. -The ikiwiki `post-commit` hook should be put in the bare repository. +The ikiwiki `post-update` hook should be put in the bare repository. ## git repository with multiple committers @@ -147,7 +147,7 @@ is the normal behaviour of ikiwiki, set the configuration of the local wiki: gitorigin_branch => "", ## git post-commit wrapper - wrapper => "/working/dir/.git/hooks/post-commit", + git_wrapper => "/working/dir/.git/hooks/post-commit", Then just committing should refresh the private ikiwiki on the local host. Now just run `ikiwiki -setup localwiki.setup -getctime` and -- cgit v1.2.3 From b0a03fef656989ccf2552262ab8230f980821861 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 3 Jan 2009 12:52:47 -0500 Subject: yesno: Always accept English even when localised. It seems to be a failing of i18n in unix that the translation stops at the commands and the parameters to them, and ikiwiki is no exception with its currently untranslated directives. So the little bit that's translated sticks out like a sore thumb. It also breaks building of wikis if a different locale happens to be set. I suppose the best thing to do is either give up on the localisation of this part completly, or make it recognise English in addition to the locale. I've tenatively chosen the latter. (Also accept 1 and 0 as input.) --- IkiWiki.pm | 2 +- debian/changelog | 2 ++ t/yesno.t | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 t/yesno.t (limited to 'debian') diff --git a/IkiWiki.pm b/IkiWiki.pm index e509a7c2f..7eef4c320 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1658,7 +1658,7 @@ sub gettext { sub yesno ($) { my $val=shift; - return (defined $val && lc($val) eq gettext("yes")); + return (defined $val && (lc($val) eq gettext("yes") || lc($val) eq "yes" || $val eq "1")); } sub inject { diff --git a/debian/changelog b/debian/changelog index 0f2c75787..f892dc524 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ ikiwiki (3.01) UNRELEASED; urgency=low * ikiwiki-makerepo: Fix injecting of empty mercurial and bzr repositories. Closes: #510518 * Fix documentation about git hook to use right name. Closes: #510393 + * yesno: Always accept English even when localised. + * yesno: Also accept 1 and 0 as input. -- Joey Hess Fri, 02 Jan 2009 14:12:16 -0500 diff --git a/t/yesno.t b/t/yesno.t new file mode 100755 index 000000000..60a8c071d --- /dev/null +++ b/t/yesno.t @@ -0,0 +1,21 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Test::More tests => 10; + +BEGIN { use_ok("IkiWiki"); } + +# note: yesno always accepts English even if localized. +# So no need to bother setting locale to C. + +ok(IkiWiki::yesno("yes") == 1); +ok(IkiWiki::yesno("Yes") == 1); +ok(IkiWiki::yesno("YES") == 1); + +ok(IkiWiki::yesno("no") == 0); +ok(IkiWiki::yesno("No") == 0); +ok(IkiWiki::yesno("NO") == 0); + +ok(IkiWiki::yesno("1") == 1); +ok(IkiWiki::yesno("0") == 0); +ok(IkiWiki::yesno("mooooooooooo") == 0); -- cgit v1.2.3 From bc0de40c3c71206c927ec08ee78e8a726abc7995 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Jan 2009 18:26:09 -0500 Subject: A recent change to gitweb removed support for the form of diffurl that many ikiwiki setups use. Document how to use the new url form. --- IkiWiki/Plugin/git.pm | 4 ++-- debian/NEWS | 15 +++++++++++++++ debian/changelog | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 6a7f6c3ae..3085a3b67 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -94,8 +94,8 @@ sub getsetup () { }, diffurl => { type => "string", - example => "http://git.example.com/gitweb.cgi?p=wiki.git;a=blobdiff;h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_parent]];f=[[file]]", - description => "gitweb url to show a diff ([[sha1_to]], [[sha1_from]], [[sha1_parent]], [[sha1_commit]] and [[file]] substituted)", + example => "http://git.example.com/gitweb.cgi?p=wiki.git;a=blobdiff;f=[[file]];h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_commit]];hpb=[[sha1_parent]]", + description => "gitweb url to show a diff ([[file]], [[sha1_to]], [[sha1_from]], [[sha1_commit]], and [[sha1_parent]] substituted)", safe => 1, rebuild => 1, }, diff --git a/debian/NEWS b/debian/NEWS index 6fe70c9e4..22513cc4a 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,18 @@ +ikiwiki (3.01) unstable; urgency=low + + If your wiki uses git, and you have a `diffurl` configured in + its setup file, you should be aware that gitweb has stopped + supporting the url form commonly used for the `diffurl`. + + You can change your setup to use the newer gitweb url form: + + http://git.example.com/gitweb.cgi?p=wiki.git;a=blobdiff;f=[[file]];h=[[sha1_to]];hp=[[sha1_from]];hb=[[sha1_commit]];hpb=[[sha1_parent]] + + The changes from the old form are the addition of the `hpb` parameter, + and the change to the value used for the `hb` parameter. + + -- Joey Hess Mon, 05 Jan 2009 18:18:05 -0500 + ikiwiki (3.00) unstable; urgency=low The 3.0 release of ikiwiki changes several defaults and finishes diff --git a/debian/changelog b/debian/changelog index f892dc524..afaccc2d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ ikiwiki (3.01) UNRELEASED; urgency=low * Fix documentation about git hook to use right name. Closes: #510393 * yesno: Always accept English even when localised. * yesno: Also accept 1 and 0 as input. + * A recent change to gitweb removed support for the form of diffurl + that many ikiwiki setups use. Document how to use the new url form. -- Joey Hess Fri, 02 Jan 2009 14:12:16 -0500 -- cgit v1.2.3 From eadb078e4cd204a9264e33e47f36c36768c61db0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Jan 2009 19:04:03 -0500 Subject: releasing version 3.01 --- debian/changelog | 4 +-- po/fr.po | 81 ++++++++++++++++++++++++++++---------------------------- po/ikiwiki.pot | 4 +-- 3 files changed, 44 insertions(+), 45 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index afaccc2d2..f8eb49030 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.01) UNRELEASED; urgency=low +ikiwiki (3.01) unstable; urgency=low * ikiwiki-makerepo: Fix injecting of empty mercurial and bzr repositories. Closes: #510518 @@ -8,7 +8,7 @@ ikiwiki (3.01) UNRELEASED; urgency=low * A recent change to gitweb removed support for the form of diffurl that many ikiwiki setups use. Document how to use the new url form. - -- Joey Hess Fri, 02 Jan 2009 14:12:16 -0500 + -- Joey Hess Mon, 05 Jan 2009 18:53:50 -0500 ikiwiki (3.00) unstable; urgency=low diff --git a/po/fr.po b/po/fr.po index 4092f0367..1cec7fbe9 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 2.71 \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-20 18:07-0500\n" +"POT-Creation-Date: 2009-01-05 18:53-0500\n" "PO-Revision-Date: 2008-12-29 17:57+0100\n" "Last-Translator: Philippe Batailler \n" "Language-Team: French \n" @@ -25,7 +25,7 @@ msgstr "Vous devez d'abord vous identifier." msgid "login failed, perhaps you need to turn on cookies?" msgstr "Échec de l'identification, vous devez autoriser les cookies." -#: ../IkiWiki/CGI.pm:163 ../IkiWiki/CGI.pm:310 +#: ../IkiWiki/CGI.pm:163 ../IkiWiki/CGI.pm:280 msgid "Your login session has expired." msgstr "Session d'authentification expirée." @@ -41,87 +41,87 @@ msgstr "Préférences" msgid "Admin" msgstr "Administrateur" -#: ../IkiWiki/CGI.pm:253 +#: ../IkiWiki/CGI.pm:226 msgid "Preferences saved." msgstr "Les préférences ont été enregistrées." -#: ../IkiWiki/CGI.pm:271 +#: ../IkiWiki/CGI.pm:241 msgid "You are banned." msgstr "Vous avez été banni." -#: ../IkiWiki/CGI.pm:401 ../IkiWiki/CGI.pm:402 ../IkiWiki.pm:1204 +#: ../IkiWiki/CGI.pm:371 ../IkiWiki/CGI.pm:372 ../IkiWiki.pm:1204 msgid "Error" msgstr "Erreur" -#: ../IkiWiki/Plugin/aggregate.pm:80 +#: ../IkiWiki/Plugin/aggregate.pm:84 msgid "Aggregation triggered via web." msgstr "Agrégation déclenchée par le web" -#: ../IkiWiki/Plugin/aggregate.pm:89 +#: ../IkiWiki/Plugin/aggregate.pm:93 msgid "Nothing to do right now, all feeds are up-to-date!" msgstr "Rien à faire pour le moment, tous les flux sont à jour !" -#: ../IkiWiki/Plugin/aggregate.pm:216 +#: ../IkiWiki/Plugin/aggregate.pm:220 #, perl-format msgid "missing %s parameter" msgstr "Paramètre %s manquant" -#: ../IkiWiki/Plugin/aggregate.pm:251 +#: ../IkiWiki/Plugin/aggregate.pm:255 msgid "new feed" msgstr "Nouveau flux" -#: ../IkiWiki/Plugin/aggregate.pm:265 +#: ../IkiWiki/Plugin/aggregate.pm:269 msgid "posts" msgstr "Articles" -#: ../IkiWiki/Plugin/aggregate.pm:267 +#: ../IkiWiki/Plugin/aggregate.pm:271 msgid "new" msgstr "Nouveau" -#: ../IkiWiki/Plugin/aggregate.pm:431 +#: ../IkiWiki/Plugin/aggregate.pm:435 #, perl-format msgid "expiring %s (%s days old)" msgstr "Fin de validité de %s (date de %s jours)" -#: ../IkiWiki/Plugin/aggregate.pm:438 +#: ../IkiWiki/Plugin/aggregate.pm:442 #, perl-format msgid "expiring %s" msgstr "Fin de validité de %s" -#: ../IkiWiki/Plugin/aggregate.pm:465 +#: ../IkiWiki/Plugin/aggregate.pm:469 #, perl-format msgid "last checked %s" msgstr "dernière vérification : %s" -#: ../IkiWiki/Plugin/aggregate.pm:469 +#: ../IkiWiki/Plugin/aggregate.pm:473 #, perl-format msgid "checking feed %s ..." msgstr "Vérification du flux %s..." -#: ../IkiWiki/Plugin/aggregate.pm:474 +#: ../IkiWiki/Plugin/aggregate.pm:478 #, perl-format msgid "could not find feed at %s" msgstr "Impossible de trouver de flux à %s" -#: ../IkiWiki/Plugin/aggregate.pm:493 +#: ../IkiWiki/Plugin/aggregate.pm:497 msgid "feed not found" msgstr "Flux introuvable " -#: ../IkiWiki/Plugin/aggregate.pm:504 +#: ../IkiWiki/Plugin/aggregate.pm:508 #, perl-format msgid "(invalid UTF-8 stripped from feed)" msgstr "(chaîne UTF-8 non valable supprimée du flux)" -#: ../IkiWiki/Plugin/aggregate.pm:512 +#: ../IkiWiki/Plugin/aggregate.pm:516 #, perl-format msgid "(feed entities escaped)" msgstr "(échappement des entités de flux)" -#: ../IkiWiki/Plugin/aggregate.pm:520 +#: ../IkiWiki/Plugin/aggregate.pm:524 msgid "feed crashed XML::Feed!" msgstr "Plantage du flux XML::Feed !" -#: ../IkiWiki/Plugin/aggregate.pm:601 +#: ../IkiWiki/Plugin/aggregate.pm:605 #, perl-format msgid "creating new page %s" msgstr "Création de la nouvelle page %s" @@ -156,15 +156,15 @@ msgstr "Échec lors de la suppression du fichier sur S3 :" msgid "there is already a page named %s" msgstr "Il existe déjà une page nommée %s" -#: ../IkiWiki/Plugin/attachment.pm:82 +#: ../IkiWiki/Plugin/attachment.pm:65 msgid "prohibited by allowed_attachments" msgstr "Action interdite par allowed_attachments" -#: ../IkiWiki/Plugin/attachment.pm:190 +#: ../IkiWiki/Plugin/attachment.pm:140 msgid "bad attachment filename" msgstr "Nom de la pièce jointe incorrect" -#: ../IkiWiki/Plugin/attachment.pm:232 +#: ../IkiWiki/Plugin/attachment.pm:182 msgid "attachment upload" msgstr "Envoi de la pièce jointe" @@ -188,12 +188,12 @@ msgstr "%s sur %s" msgid "There are no broken links!" msgstr "Aucun lien cassé !" -#: ../IkiWiki/Plugin/comments.pm:119 ../IkiWiki/Plugin/format.pm:23 +#: ../IkiWiki/Plugin/comments.pm:120 ../IkiWiki/Plugin/format.pm:23 #, perl-format msgid "unsupported page format %s" msgstr "Format de page non reconnu %s" -#: ../IkiWiki/Plugin/comments.pm:124 +#: ../IkiWiki/Plugin/comments.pm:125 msgid "comment must have content" msgstr "Un commentaire doit avoir un contenu." @@ -201,44 +201,44 @@ msgstr "Un commentaire doit avoir un contenu." msgid "Anonymous" msgstr "Anonyme" -#: ../IkiWiki/Plugin/comments.pm:243 ../IkiWiki/Plugin/recentchanges.pm:101 +#: ../IkiWiki/Plugin/comments.pm:252 ../IkiWiki/Plugin/recentchanges.pm:110 msgid "missing page" msgstr "Page manquante" -#: ../IkiWiki/Plugin/comments.pm:245 ../IkiWiki/Plugin/recentchanges.pm:103 +#: ../IkiWiki/Plugin/comments.pm:254 ../IkiWiki/Plugin/recentchanges.pm:112 #, perl-format msgid "The page %s does not exist." msgstr "La page %s n'existe pas." -#: ../IkiWiki/Plugin/comments.pm:334 ../IkiWiki/Plugin/editpage.pm:124 +#: ../IkiWiki/Plugin/comments.pm:343 ../IkiWiki/Plugin/editpage.pm:124 msgid "bad page name" msgstr "Nom de page incorrect" -#: ../IkiWiki/Plugin/comments.pm:341 +#: ../IkiWiki/Plugin/comments.pm:350 #, perl-format msgid "commenting on %s" msgstr "Faire un commentaire sur %s" -#: ../IkiWiki/Plugin/comments.pm:359 +#: ../IkiWiki/Plugin/comments.pm:368 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "La page '%s' n'existe pas, commentaire impossible." -#: ../IkiWiki/Plugin/comments.pm:366 +#: ../IkiWiki/Plugin/comments.pm:375 #, perl-format msgid "comments on page '%s' are closed" msgstr "Le commentaire pour la page '%s' est terminé." -#: ../IkiWiki/Plugin/comments.pm:468 +#: ../IkiWiki/Plugin/comments.pm:483 msgid "Added a comment" msgstr "Commentaire ajouté" -#: ../IkiWiki/Plugin/comments.pm:472 +#: ../IkiWiki/Plugin/comments.pm:487 #, perl-format msgid "Added a comment: %s" msgstr "Commentaire ajouté : %s" -#: ../IkiWiki/Plugin/comments.pm:565 +#: ../IkiWiki/Plugin/comments.pm:601 msgid "Comments" msgstr "Commentaires" @@ -329,10 +329,6 @@ msgstr "Vous devez indiquer %s lors de l'utilisation du greffon « google »." msgid "Failed to parse url, cannot determine domain name" msgstr "Impossible d'analyser l'url, pas de nom de domaine" -#: ../IkiWiki/Plugin/googlecalendar.pm:32 -msgid "failed to find url in html" -msgstr "Impossible de trouver une URL dans le code HTML" - #: ../IkiWiki/Plugin/graphviz.pm:67 msgid "failed to run graphviz" msgstr "Échec du lancement de graphviz" @@ -406,7 +402,7 @@ msgstr "RPC::XML::Client introuvable, pas de réponse au ping" msgid "failed to run dot" msgstr "Échec du lancement de dot" -#: ../IkiWiki/Plugin/lockedit.pm:49 ../IkiWiki/Plugin/lockedit.pm:66 +#: ../IkiWiki/Plugin/lockedit.pm:47 #, perl-format msgid "%s is locked and cannot be edited" msgstr "%s est verrouillé et ne peut être modifié" @@ -1027,7 +1023,7 @@ msgstr "Impossible de charger le greffon externe nécessaire au greffon %s : %s msgid "preprocessing loop detected on %s at depth %i" msgstr "Une boucle de pré traitement a été détectée sur %s à hauteur de %i" -#: ../IkiWiki.pm:1688 +#: ../IkiWiki.pm:1661 msgid "yes" msgstr "oui" @@ -1051,6 +1047,9 @@ msgstr "Identifiant de l'administrateur (utilisateur ou openid) :" msgid "What is the domain name of the web server?" msgstr "Nom de domaine du serveur HTTP :" +#~ msgid "failed to find url in html" +#~ msgstr "Impossible de trouver une URL dans le code HTML" + #~ msgid "processed ok at %s" #~ msgstr "A été correctement traité à %s" diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 7f664d111..560a5b2a1 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-12-28 15:01-0500\n" +"POT-Creation-Date: 2009-01-05 18:53-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -237,7 +237,7 @@ msgstr "" msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:598 +#: ../IkiWiki/Plugin/comments.pm:601 msgid "Comments" msgstr "" -- cgit v1.2.3 From da166e74227d084fd15878ce9a3099e07ebcc2c2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Jan 2009 15:05:09 -0500 Subject: table: Fix misparsed links in external files linkify data from external files at the same time as data from an inlined table would be linkified. --- IkiWiki/Plugin/table.pm | 20 ++++++++------------ debian/changelog | 6 ++++++ doc/bugs/links_misparsed_in_CSV_files.mdwn | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) (limited to 'debian') diff --git a/IkiWiki/Plugin/table.pm b/IkiWiki/Plugin/table.pm index 479f3d745..dd124929d 100644 --- a/IkiWiki/Plugin/table.pm +++ b/IkiWiki/Plugin/table.pm @@ -50,22 +50,18 @@ sub preprocess (@) { defined $params{delimiter} ? $params{delimiter} : ",",); # linkify after parsing since html link quoting can # confuse CSV parsing - if (! exists $params{file}) { - @data=map { - [ map { - IkiWiki::linkify($params{page}, - $params{destpage}, $_); - } @$_ ] - } @data; - } + @data=map { + [ map { + IkiWiki::linkify($params{page}, + $params{destpage}, $_); + } @$_ ] + } @data; } elsif (lc $params{format} eq 'dsv') { # linkify before parsing since wikilinks can contain the # delimiter - if (! exists $params{file}) { - $params{data} = IkiWiki::linkify($params{page}, - $params{destpage}, $params{data}); - } + $params{data} = IkiWiki::linkify($params{page}, + $params{destpage}, $params{data}); @data=split_dsv($params{data}, defined $params{delimiter} ? $params{delimiter} : "|",); } diff --git a/debian/changelog b/debian/changelog index f8eb49030..bf47fda04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ikiwiki (3.02) UNRELEASED; urgency=low + + * table: Fix misparsed links in external files. + + -- Joey Hess Tue, 06 Jan 2009 15:02:52 -0500 + ikiwiki (3.01) unstable; urgency=low * ikiwiki-makerepo: Fix injecting of empty mercurial and bzr repositories. diff --git a/doc/bugs/links_misparsed_in_CSV_files.mdwn b/doc/bugs/links_misparsed_in_CSV_files.mdwn index 4dae4aeab..27d2b7b1e 100644 --- a/doc/bugs/links_misparsed_in_CSV_files.mdwn +++ b/doc/bugs/links_misparsed_in_CSV_files.mdwn @@ -17,7 +17,7 @@ Oh, wait, I see the problem. IkiWiki::linkify is only called if the external fil > > Why is linkify not called for external files? Well, I checked the > history, and it's probably best to say "for historical reasons that no -> longer apply". +> longer apply". So, changed as you suggest. [[done]] --[[Joey]] I am rather confused what this check does, and the fact the comments are very different for CSV and DSV when the code is the same doesn't seem to help. -- cgit v1.2.3 From 4ce73f2d88e9a177ad84e19b48a17b2d604a808b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Jan 2009 15:35:53 -0500 Subject: table: Find links in external files in scan pass. --- IkiWiki/Plugin/table.pm | 22 ++++++++++++++++++++-- debian/changelog | 1 + doc/bugs/table_external_file_links.mdwn | 2 ++ docwiki.setup | 2 ++ po/ikiwiki.pot | 2 +- 5 files changed, 26 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/IkiWiki/Plugin/table.pm b/IkiWiki/Plugin/table.pm index dd124929d..96d63f455 100644 --- a/IkiWiki/Plugin/table.pm +++ b/IkiWiki/Plugin/table.pm @@ -8,7 +8,7 @@ use IkiWiki 3.00; sub import { hook(type => "getsetup", id => "table", call => \&getsetup); - hook(type => "preprocess", id => "table", call => \&preprocess); + hook(type => "preprocess", id => "table", call => \&preprocess, scan => 1); } sub getsetup () { @@ -27,13 +27,31 @@ sub preprocess (@) { ); if (exists $params{file}) { - if (! $pagesources{$params{file}}) { + if (! exists $pagesources{$params{file}}) { error gettext("cannot find file"); } $params{data} = readfile(srcfile($params{file})); add_depends($params{page}, $params{file}); } + if (! defined wantarray) { + # scan mode -- if the table uses an external file, need to + # scan that file too. + return unless exists $params{file}; + + IkiWiki::run_hooks(scan => sub { + shift->( + page => $params{page}, + content => $params{data}, + ); + }); + + # Preprocess in scan-only mode. + IkiWiki::preprocess($params{page}, $params{page}, $params{data}, 1); + + return; + } + if (lc $params{format} eq 'auto') { # first try the more simple format if (is_dsv_data($params{data})) { diff --git a/debian/changelog b/debian/changelog index bf47fda04..e79ad04cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ ikiwiki (3.02) UNRELEASED; urgency=low * table: Fix misparsed links in external files. + * table: Find links in external files in scan pass. -- Joey Hess Tue, 06 Jan 2009 15:02:52 -0500 diff --git a/doc/bugs/table_external_file_links.mdwn b/doc/bugs/table_external_file_links.mdwn index f86808c77..7b35383c5 100644 --- a/doc/bugs/table_external_file_links.mdwn +++ b/doc/bugs/table_external_file_links.mdwn @@ -5,3 +5,5 @@ table when the pages the links point to change (are added, removed, etc). There seem only two solutions to that bug -- either really make wikilinks in an external table file not work (probably by escaping them), or run the preprocess code also in scan (expensive!). --[[Joey]] + +[[done]] diff --git a/docwiki.setup b/docwiki.setup index 6d732fd6b..ffb4a7c16 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -15,5 +15,7 @@ use IkiWiki::Setup::Standard { userdir => "users", usedirs => 0, prefix_directives => 1, + cgiurl => "http://me", + url => "http://me", add_plugins => [qw{goodstuff version haiku polygen fortune}], } diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 560a5b2a1..957c9eea3 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-05 18:53-0500\n" +"POT-Creation-Date: 2009-01-06 14:31-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- cgit v1.2.3 From 72ca231fd0d7f98e85848855be852d1ae6eaa8cf Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Jan 2009 17:29:12 -0500 Subject: rename: Show full names of affected pages. --- IkiWiki/Plugin/rename.pm | 1 + debian/changelog | 1 + ...f_successful_rename_should_list_the_full_path_to_affected_pages.mdwn | 2 ++ 3 files changed, 4 insertions(+) (limited to 'debian') diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index fa0358843..41af3ca4d 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -417,6 +417,7 @@ sub linklist { { page => htmllink($dest, $dest, $_, noimageinline => 1, + linktext => pagetitle($_), ) } } @{$list}] diff --git a/debian/changelog b/debian/changelog index e79ad04cc..55eb4be0b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ ikiwiki (3.02) UNRELEASED; urgency=low * table: Fix misparsed links in external files. * table: Find links in external files in scan pass. + * rename: Show full names of affected pages. -- Joey Hess Tue, 06 Jan 2009 15:02:52 -0500 diff --git a/doc/bugs/output_of_successful_rename_should_list_the_full_path_to_affected_pages.mdwn b/doc/bugs/output_of_successful_rename_should_list_the_full_path_to_affected_pages.mdwn index 2d9677e7f..132d23463 100644 --- a/doc/bugs/output_of_successful_rename_should_list_the_full_path_to_affected_pages.mdwn +++ b/doc/bugs/output_of_successful_rename_should_list_the_full_path_to_affected_pages.mdwn @@ -10,3 +10,5 @@ The following pages have been automatically modified to update their links to us
  • discussion
  • discussion
  • ... In this situation I think the link to pages should be expanded to show the entire path, since there is quite likely to be a lot of things like "discussion". -- [[users/Jon]] + +[[done]] -- cgit v1.2.3 From 551544663db939c8eb32dd78ad74e1514589be25 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Jan 2009 11:12:32 -0500 Subject: comments: Fix cache avoidance hack. The ?updated needs to come before the #anchor or browsers will not follow the anchor. --- IkiWiki/Plugin/comments.pm | 2 +- debian/changelog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 1c10417c3..3a0465dbb 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -508,7 +508,7 @@ sub sessioncgi ($$) { # Jump to the new comment on the page. # The trailing question mark tries to avoid broken # caches and get the most recent version of the page. - IkiWiki::redirect($cgi, urlto($page, undef, 1)."#$location?updated"); + IkiWiki::redirect($cgi, urlto($page, undef, 1)."?updated#$location"); } else { diff --git a/debian/changelog b/debian/changelog index 55eb4be0b..f4f9df041 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ ikiwiki (3.02) UNRELEASED; urgency=low * table: Fix misparsed links in external files. * table: Find links in external files in scan pass. * rename: Show full names of affected pages. + * comments: Fix cache avoidance hack. -- Joey Hess Tue, 06 Jan 2009 15:02:52 -0500 -- cgit v1.2.3 From 81b088866be5f55433c12e09c90e2ae404a8ed89 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Jan 2009 15:48:07 -0500 Subject: repolist: New plugin to support the rel=vcs-* microformat. * repolist: New plugin to support the rel=vcs-* microformat. * goodstuff: Include repolist by default. (But it does nothing until configured with the repository locations.) --- IkiWiki/Plugin/goodstuff.pm | 1 + IkiWiki/Plugin/repolist.pm | 51 +++++++++++++++++++++++++++++++++++++++++++++ debian/changelog | 3 +++ doc/pagehistory.mdwn | 3 +++ doc/plugins/goodstuff.mdwn | 1 + doc/plugins/repolist.mdwn | 17 +++++++++++++++ templates/page.tmpl | 1 + 7 files changed, 77 insertions(+) create mode 100644 IkiWiki/Plugin/repolist.pm create mode 100644 doc/plugins/repolist.mdwn (limited to 'debian') diff --git a/IkiWiki/Plugin/goodstuff.pm b/IkiWiki/Plugin/goodstuff.pm index 46f2380cf..451cd6f84 100644 --- a/IkiWiki/Plugin/goodstuff.pm +++ b/IkiWiki/Plugin/goodstuff.pm @@ -22,6 +22,7 @@ my @bundle=qw{ template toc toggle + repolist }; sub import { diff --git a/IkiWiki/Plugin/repolist.pm b/IkiWiki/Plugin/repolist.pm new file mode 100644 index 000000000..f69ec3988 --- /dev/null +++ b/IkiWiki/Plugin/repolist.pm @@ -0,0 +1,51 @@ +#!/usr/bin/perl +package IkiWiki::Plugin::repolist; + +use warnings; +use strict; +use IkiWiki 3.00; + +sub import { + hook(type => "getsetup", id => "repolist", call => \&getsetup); + hook(type => "checkconfig", id => "repolist", call => \&checkconfig); +} + +sub getsetup () { + return + plugin => { + safe => 1, + rebuild => undef, + }, + repositories => { + type => "string", + example => ["svn://svn.example.org/wiki/trunk"], + description => "URIs of repositories containing the wiki's source", + safe => 1, + rebuild => undef, + }, +} + +my $relvcs; + +sub checkconfig () { + if (defined $config{rcs} && $config{repositories}) { + $relvcs=join("\n", map { + s/"//g; # avoid quotes just in case + qq{} + } @{$config{repositories}}); + + hook(type => "pagetemplate", id => "repolist", call => \&pagetemplate); + } +} + +sub pagetemplate (@) { + my %params=@_; + my $page=$params{page}; + my $template=$params{template}; + + if (defined $relvcs && $template->query(name => "relvcs")) { + $template->param(relvcs => $relvcs); + } +} + +1 diff --git a/debian/changelog b/debian/changelog index f4f9df041..74556906e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ ikiwiki (3.02) UNRELEASED; urgency=low * table: Find links in external files in scan pass. * rename: Show full names of affected pages. * comments: Fix cache avoidance hack. + * repolist: New plugin to support the rel=vcs-* microformat. + * goodstuff: Include repolist by default. (But it does nothing until + configured with the repository locations.) -- Joey Hess Tue, 06 Jan 2009 15:02:52 -0500 diff --git a/doc/pagehistory.mdwn b/doc/pagehistory.mdwn index fc2a3f543..465062736 100644 --- a/doc/pagehistory.mdwn +++ b/doc/pagehistory.mdwn @@ -3,3 +3,6 @@ revison history of a page. This is enabled by the `historyurl` setting, which is used to specify the URL to a web interface such as [[ViewVC]] (for Subversion) or [[Gitweb]]. In that url, "\[[file]]" is replaced with the name of the file to view. + +The [[plugins/repolist]] plugin can suppliment this information with +urls to the underlying repository of the wiki. diff --git a/doc/plugins/goodstuff.mdwn b/doc/plugins/goodstuff.mdwn index ed57c0f01..ee1bffcfa 100644 --- a/doc/plugins/goodstuff.mdwn +++ b/doc/plugins/goodstuff.mdwn @@ -24,5 +24,6 @@ Currently included: * [[template]] * [[toc]] * [[toggle]] +* [[repolist]] New plugins will be added to this bundle from time to time. diff --git a/doc/plugins/repolist.mdwn b/doc/plugins/repolist.mdwn new file mode 100644 index 000000000..9b3a7575e --- /dev/null +++ b/doc/plugins/repolist.mdwn @@ -0,0 +1,17 @@ +[[!template id=plugin name=repolist author="[[Joey]]"]] +[[!tag type/useful]] + +This plugin allows you to configure ikiwiki with the location of +[[rcs]] repositories for your wiki's source. This is done via the +"repositories" setting in the setup file. Once you tell it where the source +to your wiki can be downloaded from, this information can be published on +your wiki in various ways. + +This plugin supports the [rel-vcs-*](http://kitenet.net/~joey/rfc/rel-vcs/) +microformat, and uses it to embed the repository location information in +every wiki page. + +By using this plugin, you will make [[Joey]] very happy, as he will be able +to easily check out the source of your wiki, for purposes of debugging and +general curiosity. More generally, making it easy for others to find the +repository for your wiki is just a Plain Good Idea(TM). diff --git a/templates/page.tmpl b/templates/page.tmpl index f75491127..29ba688c7 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -13,6 +13,7 @@ + -- cgit v1.2.3 From af9566a6952905beff7f1ca9db64f01c3faf4ff2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 10 Jan 2009 14:17:27 -0500 Subject: comments: Add support for removing comments via web interface. (smcv) --- debian/changelog | 1 + doc/todo/comments.mdwn | 36 +++++++++++++++++++----------------- 2 files changed, 20 insertions(+), 17 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 74556906e..61aee299d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ ikiwiki (3.02) UNRELEASED; urgency=low * repolist: New plugin to support the rel=vcs-* microformat. * goodstuff: Include repolist by default. (But it does nothing until configured with the repository locations.) + * comments: Add support for removing comments via web interface. (smcv) -- Joey Hess Tue, 06 Jan 2009 15:02:52 -0500 diff --git a/doc/todo/comments.mdwn b/doc/todo/comments.mdwn index e8698f721..c74ded8f6 100644 --- a/doc/todo/comments.mdwn +++ b/doc/todo/comments.mdwn @@ -12,23 +12,6 @@ ## Patches pending merge -* If a spammer posts a comment, it is either impossible or hard to clean - up via the web. Would be nice to have some kind of link on the comment - that allows trusted users to remove it (using the remove plugin of - course). - - > Won't the remove plugin refuse to remove internal pages? This would be - > a good feature to have, though. --[[smcv]] - - > Here, FWIW, is the first ikiwiki comment spam I've seen: - > - > So that took about 10 days... - > --[[Joey]] - - >> Implemented in my 'comments' branch, please review. It turns out - >> [[plugins/remove]] is happy to remove internal pages, so it was quite - >> easy to do. --[[smcv]] - * There is some common code cargo-culted from other plugins (notably inline and editpage) which should probably be shared @@ -151,3 +134,22 @@ first. --[[smcv]] > done --[[Joey]] + +* If a spammer posts a comment, it is either impossible or hard to clean + up via the web. Would be nice to have some kind of link on the comment + that allows trusted users to remove it (using the remove plugin of + course). + + > Won't the remove plugin refuse to remove internal pages? This would be + > a good feature to have, though. --[[smcv]] + + > Here, FWIW, is the first ikiwiki comment spam I've seen: + > + > So that took about 10 days... + > --[[Joey]] + + >> Implemented in my 'comments' branch, please review. It turns out + >> [[plugins/remove]] is happy to remove internal pages, so it was quite + >> easy to do. --[[smcv]] + + >>> done --[[Joey]] -- cgit v1.2.3 From 7a8ea68fc0bba9f75ba81a9547d359f42e31caa4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 10 Jan 2009 14:36:03 -0500 Subject: Consistently allow use of relative paths in all PageSpecs that take a page name parameter. Previously, match_created_before(), match_created_after(), match_sourcepage(), and match_destpage() did not support that, and the docs were not clear. --- IkiWiki.pm | 6 ++++++ IkiWiki/Plugin/conditional.pm | 4 ++++ debian/changelog | 4 ++++ doc/todo/relative_pagespec_deficiency.mdwn | 2 ++ 4 files changed, 16 insertions(+) (limited to 'debian') diff --git a/IkiWiki.pm b/IkiWiki.pm index 892b5b5a8..4601d8590 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1880,6 +1880,9 @@ sub match_backlink ($$;@) { sub match_created_before ($$;@) { my $page=shift; my $testpage=shift; + my %params=@_; + + $testpage=derel($testpage, $params{location}); if (exists $IkiWiki::pagectime{$testpage}) { if ($IkiWiki::pagectime{$page} < $IkiWiki::pagectime{$testpage}) { @@ -1897,6 +1900,9 @@ sub match_created_before ($$;@) { sub match_created_after ($$;@) { my $page=shift; my $testpage=shift; + my %params=@_; + + $testpage=derel($testpage, $params{location}); if (exists $IkiWiki::pagectime{$testpage}) { if ($IkiWiki::pagectime{$page} > $IkiWiki::pagectime{$testpage}) { diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm index 4f3577b34..7445dbdad 100644 --- a/IkiWiki/Plugin/conditional.pm +++ b/IkiWiki/Plugin/conditional.pm @@ -87,6 +87,8 @@ sub match_sourcepage ($$;@) { shift; my $glob=shift; my %params=@_; + + $glob=derel($glob, $params{location}); return IkiWiki::FailReason->new("cannot match sourcepage") unless exists $params{sourcepage}; if (match_glob($params{sourcepage}, $glob, @_)) { @@ -102,6 +104,8 @@ sub match_destpage ($$;@) { my $glob=shift; my %params=@_; + $glob=derel($glob, $params{location}); + return IkiWiki::FailReason->new("cannot match destpage") unless exists $params{destpage}; if (match_glob($params{destpage}, $glob, @_)) { return IkiWiki::SuccessReason->new("destpage matches $glob"); diff --git a/debian/changelog b/debian/changelog index 61aee299d..13ef9afed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,10 @@ ikiwiki (3.02) UNRELEASED; urgency=low * goodstuff: Include repolist by default. (But it does nothing until configured with the repository locations.) * comments: Add support for removing comments via web interface. (smcv) + * Consistently allow use of relative paths in all PageSpecs + that take a page name parameter. Previously, match_created_before(), + match_created_after(), match_sourcepage(), and match_destpage() + did not support that, and the docs were not clear. -- Joey Hess Tue, 06 Jan 2009 15:02:52 -0500 diff --git a/doc/todo/relative_pagespec_deficiency.mdwn b/doc/todo/relative_pagespec_deficiency.mdwn index 9fdfe74b1..4500581c7 100644 --- a/doc/todo/relative_pagespec_deficiency.mdwn +++ b/doc/todo/relative_pagespec_deficiency.mdwn @@ -4,3 +4,5 @@ such as `bdale/blog`, you cannot do references. The other pagespec functions should too, where appropriate. + +[[done]] -- cgit v1.2.3 From 85dcc2958a6f092a2841b4bb232a327dbf5c30b5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Jan 2009 14:27:27 -0500 Subject: pinger: Get whole url, don't just head. Asking for only the head worked in my tests, but I've found a site where it didn't -- apparently ikiwiki didn't get a chance to do or finish the refresh when HEADed. Getting the whole url, waiting for ikiwiki to finish, avoided the update problem. --- IkiWiki/Plugin/pinger.pm | 2 +- debian/changelog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/IkiWiki/Plugin/pinger.pm b/IkiWiki/Plugin/pinger.pm index 4a8088661..c20ecb5d4 100644 --- a/IkiWiki/Plugin/pinger.pm +++ b/IkiWiki/Plugin/pinger.pm @@ -106,7 +106,7 @@ sub ping { # will still be avoided. next if $url=~/^\Q$config{cgiurl}\E/; - $ua->head($url); + $ua->get($url); } exit 0; diff --git a/debian/changelog b/debian/changelog index 13ef9afed..6772aded9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,7 @@ ikiwiki (3.02) UNRELEASED; urgency=low that take a page name parameter. Previously, match_created_before(), match_created_after(), match_sourcepage(), and match_destpage() did not support that, and the docs were not clear. + * pinger: Get whole url, don't just head. -- Joey Hess Tue, 06 Jan 2009 15:02:52 -0500 -- cgit v1.2.3