From 256b3aeba8a1a9e41c2e89d9030a1a55be060540 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 6 Nov 2008 12:34:47 +0100 Subject: po: response Signed-off-by: intrigeri --- doc/plugins/contrib/po.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index af215a493..d8edbc704 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -80,3 +80,7 @@ Any thoughts on this? >> branch. One thing I'd like to try in there is setting up a translated >> basewiki, which seems like it should be pretty easy to do, and would be >> a great demo! --[[Joey]] +>> +>>> I've merged your changes into my own branch. Please note my +>>> repository location has changed a few days ago, see my user page +>>> for the new one. --[[intrigeri]] -- cgit v1.2.3 From 81846ef42e61315082d23db281fef65ad6788001 Mon Sep 17 00:00:00 2001 From: "http://mjr.towers.org.uk/" Date: Thu, 6 Nov 2008 09:27:47 -0500 Subject: New bug report --- doc/bugs/login_page_should_note_cookie_requirement.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/bugs/login_page_should_note_cookie_requirement.mdwn (limited to 'doc') diff --git a/doc/bugs/login_page_should_note_cookie_requirement.mdwn b/doc/bugs/login_page_should_note_cookie_requirement.mdwn new file mode 100644 index 000000000..b87928da1 --- /dev/null +++ b/doc/bugs/login_page_should_note_cookie_requirement.mdwn @@ -0,0 +1,5 @@ +At the moment, you go through the login shuffle and then are told that cookies are needed, so you lose all your data and login again. It would be much slicker to note by the edit link, or at least on the login page, that cookies are required. + +Even better would be to only display the cookie note as a warning if the login page doesn't receive a session cookie. + +Best of all would be to use URL-based or hidden-field-based session tokens if cookies are not permitted. -- cgit v1.2.3 From 98ffa6e15552852d15191db39a65fea345509d50 Mon Sep 17 00:00:00 2001 From: "http://alcopop.org/me/openid/" Date: Thu, 6 Nov 2008 10:17:18 -0500 Subject: --- ...sewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn (limited to 'doc') diff --git a/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn new file mode 100644 index 000000000..a90227b7a --- /dev/null +++ b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn @@ -0,0 +1,3 @@ +[[plugins/meta]] is not enabled by default, yet some pages in the default basewiki include [[the_meta_directive|ikiwiki/directive/meta]], notably the [[ikiwiki]] heirarchy. + +This means that the default output of "ikiwiki src dest", for two empty directories src and dest, result in the meta directive being displayed inline with the page text. -- cgit v1.2.3 From 725dae735334c5762f7f500a20d0ca65788cf137 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 6 Nov 2008 16:10:33 +0100 Subject: po: misc responses to Joey Signed-off-by: intrigeri --- doc/plugins/contrib/po.mdwn | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index d8edbc704..c2e2b60f7 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -3,9 +3,11 @@ translated with gettext, using [po4a](http://po4a.alioth.debian.org/). More information: -* It can be found in [my "po" branch](http://repo.or.cz/w/ikiwiki/intrigeri.git?a=shortlog;h=refs/heads/po): `git clone git://repo.or.cz/ikiwiki/intrigeri.git` -* It involves adding three hooks to ikiwiki core. -* It is documented (including TODO and plans for next work steps) in `doc/plugins/po.mdwn`, which can be found in the same branch. +* It can be found in my "po" branch: + `git clone git://gaffer.ptitcanardnoir.org/ikiwiki.git` +* It is self-contained, *i.e.* it does not modify ikiwiki core at all. +* It is documented (including TODO and plans for next work steps) in + `doc/plugins/po.mdwn`, which can be found in the same branch. * No public demo site is available so far, I'm working on this. My plan is to get this plugin clean enough to be included in ikiwiki. @@ -73,14 +75,42 @@ Any thoughts on this? >> and could only then translate it, right? I wonder if this will be clear >> though to the user. >> +>>> Right: a broken link points to the URL that allows to create +>>> a page that can either be a new master page or a non-translatable +>>> page, depending on `po_translatable_pages` value. The best +>>> solution I can thing of is to use [[plugins/edittemplate]] to +>>> insert something like "Warning: this is a master page, that must +>>> be written in $MASTER_LANGUAGE" into newly created master pages, +>>> and maybe another warning message on newly created +>>> non-translatable pages. It seems quite doable to me, but in order +>>> to avoid breaking existing functionality, it implies to hack a bit +>>> [[plugins/edittemplate]] so that multiple templates can be +>>> inserted at page creation time. [[--intrigeri]] +>> >> And also, is there any way to start a translation of a page into a new >> lanauge using the web interface? ->> +>> +>>> When a new language is added to `po_slave_languages`, a rebuild is +>>> triggered, and all missing PO files are created and checked into +>>> VCS. An unpriviledged wiki user can not add a new language to +>>> `po_slave_languages`, though. One could thing of adding the needed +>>> interface to translate a page into a yet-unsupported slave +>>> language, and this would automagically add this new language to +>>> `po_slave_languages`. It would probably be useful in some +>>> usecases, but I'm not comfortable with letting unpriviledged wiki +>>> users change the wiki configuration as a side effect of their +>>> actions; if this were to be implemented, special care would be +>>> needed. [[--intrigeri]] + >> FWIW, I'm tracking your po branch in ikiwiki master git in the po >> branch. One thing I'd like to try in there is setting up a translated >> basewiki, which seems like it should be pretty easy to do, and would be >> a great demo! --[[Joey]] >> ->>> I've merged your changes into my own branch. Please note my ->>> repository location has changed a few days ago, see my user page ->>> for the new one. --[[intrigeri]] +>>> I've merged your changes into my own branch, and made great +>>> progress on the various todo items. Please note my repository +>>> location has changed a few days ago, my user page was updated +>>> accordingly, but I forgot to update this page at the same time. +>>> Hoping it's not too complicated to relocated an existing remote... +>>> (never done that, I'm a Git beginner as well as a Perl +>>> newbie) --[[intrigeri]] -- cgit v1.2.3 From 56fd048210d3606c98f69b72f978fbd06f5520ab Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 13:51:01 -0500 Subject: response --- doc/plugins/contrib/po.mdwn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index c2e2b60f7..cc19c53b3 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -101,6 +101,11 @@ Any thoughts on this? >>> users change the wiki configuration as a side effect of their >>> actions; if this were to be implemented, special care would be >>> needed. [[--intrigeri]] +>>> +>>>> Actually I meant into any of the currently supported languages. +>>>> I guess that if the template modification is made, it will list those +>>>> languages on the page, and if a translation to a language is missing, +>>>> the link will allow creating it? >> FWIW, I'm tracking your po branch in ikiwiki master git in the po >> branch. One thing I'd like to try in there is setting up a translated @@ -113,4 +118,6 @@ Any thoughts on this? >>> accordingly, but I forgot to update this page at the same time. >>> Hoping it's not too complicated to relocated an existing remote... >>> (never done that, I'm a Git beginner as well as a Perl ->>> newbie) --[[intrigeri]] +>>> newbie) --[[intrigeri]]a +>>>> +>>>> Just a matter of editing .git/config, thanks for the heads up. -- cgit v1.2.3 From 3689d28f3aedf011b957025c280f9c9a9a2a296c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 13:56:41 -0500 Subject: response --- doc/bugs/login_page_should_note_cookie_requirement.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'doc') diff --git a/doc/bugs/login_page_should_note_cookie_requirement.mdwn b/doc/bugs/login_page_should_note_cookie_requirement.mdwn index b87928da1..e2d5a352b 100644 --- a/doc/bugs/login_page_should_note_cookie_requirement.mdwn +++ b/doc/bugs/login_page_should_note_cookie_requirement.mdwn @@ -1,5 +1,17 @@ At the moment, you go through the login shuffle and then are told that cookies are needed, so you lose all your data and login again. It would be much slicker to note by the edit link, or at least on the login page, that cookies are required. +> Hmm, it seems to me to be fairly obvious, since the vast majority of +> websites that have a login require cookies. Such warnings used to be +> common, but few sites bother with them anymore. --[[Joey]] + Even better would be to only display the cookie note as a warning if the login page doesn't receive a session cookie. +> I considered doing this before, but it would require running the cgi once +> to attempt to set the cookie and then redirecting to the cgi a second +> time to check if it took, which is both complicated and probably would +> look bad. + Best of all would be to use URL-based or hidden-field-based session tokens if cookies are not permitted. + +> This is not very doable since most of the pages the user browses are +> static pages in a static location. -- cgit v1.2.3 From dc8929e2f0e53216619340b29bd0d9d6d1f83827 Mon Sep 17 00:00:00 2001 From: "http://josephturian.blogspot.com/" Date: Thu, 6 Nov 2008 15:52:27 -0500 Subject: --- doc/bugs/messed_up_repository.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/bugs/messed_up_repository.mdwn (limited to 'doc') diff --git a/doc/bugs/messed_up_repository.mdwn b/doc/bugs/messed_up_repository.mdwn new file mode 100644 index 000000000..10bf5c35d --- /dev/null +++ b/doc/bugs/messed_up_repository.mdwn @@ -0,0 +1,5 @@ +I messed up my local clone of my repository. + +It appears that there is a special clone, which contains .ikiwiki, local.css, recentchanges, and the like. + +How can I create a new version of this clone? -- cgit v1.2.3 From db5ea4d4f01d7706c5397101ec860f8a471c1c55 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 16:08:11 -0500 Subject: meta: Plugin is now enabled by default since the basewiki uses it. --- IkiWiki.pm | 2 +- IkiWiki/Plugin/goodstuff.pm | 1 - debian/changelog | 1 + ...asewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn | 2 ++ doc/plugins/goodstuff.mdwn | 1 - doc/plugins/meta.mdwn | 2 +- 6 files changed, 5 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index bab7b707a..91d2e6082 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -120,7 +120,7 @@ sub getsetup () { #{{{ }, default_plugins => { type => "internal", - default => [qw{mdwn link inline htmlscrubber passwordauth + default => [qw{mdwn link inline meta htmlscrubber passwordauth openid signinedit lockedit conditional recentchanges parentlinks editpage}], description => "plugins to enable by default", diff --git a/IkiWiki/Plugin/goodstuff.pm b/IkiWiki/Plugin/goodstuff.pm index ed1f4ddfc..a18e626d4 100644 --- a/IkiWiki/Plugin/goodstuff.pm +++ b/IkiWiki/Plugin/goodstuff.pm @@ -10,7 +10,6 @@ my @bundle=qw{ brokenlinks img map - meta more orphans pagecount diff --git a/debian/changelog b/debian/changelog index cd8ecba7c..a197369cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ ikiwiki (2.69) UNRELEASED; urgency=low links. Since this needs the just released XML::Feed 0.3, as well as a not yet released XML::RSS, it will fall back to the old method if no xml:base info is available. + * meta: Plugin is now enabled by default since the basewiki uses it. -- Joey Hess Thu, 06 Nov 2008 16:01:00 -0500 diff --git a/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn index a90227b7a..62931d8bc 100644 --- a/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn +++ b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn @@ -1,3 +1,5 @@ [[plugins/meta]] is not enabled by default, yet some pages in the default basewiki include [[the_meta_directive|ikiwiki/directive/meta]], notably the [[ikiwiki]] heirarchy. This means that the default output of "ikiwiki src dest", for two empty directories src and dest, result in the meta directive being displayed inline with the page text. + +> [[done]], meta now enabled by default. diff --git a/doc/plugins/goodstuff.mdwn b/doc/plugins/goodstuff.mdwn index 83b60f4fa..ed57c0f01 100644 --- a/doc/plugins/goodstuff.mdwn +++ b/doc/plugins/goodstuff.mdwn @@ -12,7 +12,6 @@ Currently included: * [[brokenlinks]] * [[img]] * [[map]] -* [[meta]] * [[more]] * [[orphans]] * [[pagecount]] diff --git a/doc/plugins/meta.mdwn b/doc/plugins/meta.mdwn index afd554993..e49bdcc50 100644 --- a/doc/plugins/meta.mdwn +++ b/doc/plugins/meta.mdwn @@ -1,4 +1,4 @@ -[[!template id=plugin name=meta author="[[Joey]]"]] +[[!template id=plugin name=meta core=1 author="[[Joey]]"]] [[!tag type/meta]] This plugin provides the [[ikiwiki/directive/meta]] [[ikiwiki/directive]], -- cgit v1.2.3 From 96d52b82edffae197ae182f7073d4b7a8d88880b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 16:12:16 -0500 Subject: response --- doc/bugs/messed_up_repository.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc') diff --git a/doc/bugs/messed_up_repository.mdwn b/doc/bugs/messed_up_repository.mdwn index 10bf5c35d..cb8aa875a 100644 --- a/doc/bugs/messed_up_repository.mdwn +++ b/doc/bugs/messed_up_repository.mdwn @@ -3,3 +3,17 @@ I messed up my local clone of my repository. It appears that there is a special clone, which contains .ikiwiki, local.css, recentchanges, and the like. How can I create a new version of this clone? + +> No, there's the srcdir, which ikiwiki populates with some of those files +> when run. Notably the .ikiwiki directory and all its contents, and the +> recentchanges directory and its contents. But not local.css. +> +> If you've lost .ikiwiki and it contained user registration info +> (passwords etc), you've lost that info. Everything else can be +> regenerated by running `ikiwiki -setup your.setup` +> +> If you still have .ikiwiki, but the git clone is messed up somehow, you +> can just make a new clone and move .ikiwiki into it before running +> ikiwiki. --[[Joey]] + +[[!tag done]] -- cgit v1.2.3 From 11d377af816b30eba336fae2993a79362443c293 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 20:49:18 -0500 Subject: txt: Do not encode quotes when filtering the txt, as that broke later parsing of any directives on the page. --- IkiWiki/Plugin/txt.pm | 2 +- debian/changelog | 2 ++ doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn | 2 ++ docwiki.setup | 2 +- po/ikiwiki.pot | 4 ++-- 5 files changed, 8 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/txt.pm b/IkiWiki/Plugin/txt.pm index e4c9e5d6a..e157bf07e 100644 --- a/IkiWiki/Plugin/txt.pm +++ b/IkiWiki/Plugin/txt.pm @@ -39,7 +39,7 @@ sub filter (@) { my $content = $params{content}; if (defined $pagesources{$params{page}} && $pagesources{$params{page}} =~ /\.txt$/) { - encode_entities($content); + encode_entities($content, "<>&"); if ($findurl) { my $finder = URI::Find->new(sub { my ($uri, $orig_uri) = @_; diff --git a/debian/changelog b/debian/changelog index a197369cc..424c99ac4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ ikiwiki (2.69) UNRELEASED; urgency=low as a not yet released XML::RSS, it will fall back to the old method if no xml:base info is available. * meta: Plugin is now enabled by default since the basewiki uses it. + * txt: Do not encode quotes when filtering the txt, as that broke + later parsing of any directives on the page. -- Joey Hess Thu, 06 Nov 2008 16:01:00 -0500 diff --git a/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn b/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn index d2d5a46ed..22224483e 100644 --- a/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn +++ b/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn @@ -15,3 +15,5 @@ Here is the header: [[GNU_Free_Documentation_License|/fdl]]."]]"""]] --[[tschwinge]] + +> [[done]], made it less zealous about encoding html entities. --[[Joey]] diff --git a/docwiki.setup b/docwiki.setup index 6d732fd6b..bb9616d04 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -15,5 +15,5 @@ use IkiWiki::Setup::Standard { userdir => "users", usedirs => 0, prefix_directives => 1, - add_plugins => [qw{goodstuff version haiku polygen fortune}], + add_plugins => [qw{goodstuff version haiku polygen fortune txt}], } diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 5db0c51af..6894dd2f6 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-11-03 16:31-0500\n" +"POT-Creation-Date: 2008-11-06 20:47-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -120,7 +120,7 @@ msgstr "" msgid "feed crashed XML::Feed!" msgstr "" -#: ../IkiWiki/Plugin/aggregate.pm:590 +#: ../IkiWiki/Plugin/aggregate.pm:591 #, perl-format msgid "creating new page %s" msgstr "" -- cgit v1.2.3 From 32b86c5f5b8eef0fdeb2229159787cc3d9206a74 Mon Sep 17 00:00:00 2001 From: "http://josephturian.blogspot.com/" Date: Fri, 7 Nov 2008 11:21:04 -0500 Subject: --- doc/bugs/messed_up_repository.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/bugs/messed_up_repository.mdwn b/doc/bugs/messed_up_repository.mdwn index cb8aa875a..e245b84a8 100644 --- a/doc/bugs/messed_up_repository.mdwn +++ b/doc/bugs/messed_up_repository.mdwn @@ -16,4 +16,6 @@ How can I create a new version of this clone? > can just make a new clone and move .ikiwiki into it before running > ikiwiki. --[[Joey]] +> > Great, that worked. Thanks Joey! + [[!tag done]] -- cgit v1.2.3 From 4991cb441e6898a2d350c43c8618ce728331b9a4 Mon Sep 17 00:00:00 2001 From: AlexandreDupas Date: Sat, 8 Nov 2008 11:04:27 -0500 Subject: question about the format directive and relation with htmlize hooks --- doc/plugins/format/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/plugins/format/discussion.mdwn (limited to 'doc') diff --git a/doc/plugins/format/discussion.mdwn b/doc/plugins/format/discussion.mdwn new file mode 100644 index 000000000..b7d6ca71c --- /dev/null +++ b/doc/plugins/format/discussion.mdwn @@ -0,0 +1,5 @@ +Is there any way to tell if an htmlize hook have been called from a format directive? + +I am currently modifying the [[contrib/highlightcode]] plugin by [[sabr]] and I wanted to have a different behavior depending on the fact that the htmlize hook is called from a format directive or not. For instance, this could disable the raw copy of the highlighted code. Since I have enabled the keepextension option, I tried to rely on the page extension to decide whenever I have to create the raw file or not but this does not seems a reliable approach. + +One possible solution is to add an optional parameter to the htmlize hook (and thus to htmlize function in IkiWiki.pm) which could tell if this is the format directive that called the function but I am not sure that is a good way to do this. -- cgit v1.2.3 From e7d04199ec730deecc95b55679515bc5618526f8 Mon Sep 17 00:00:00 2001 From: AlexandreDupas Date: Sat, 8 Nov 2008 11:28:25 -0500 Subject: fix link to Jason Blevins user page --- doc/todo/syntax_highlighting.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/todo/syntax_highlighting.mdwn b/doc/todo/syntax_highlighting.mdwn index 97526bae6..2bdeb62be 100644 --- a/doc/todo/syntax_highlighting.mdwn +++ b/doc/todo/syntax_highlighting.mdwn @@ -23,7 +23,7 @@ pages, as well as doing syntax highlighting as a preprocessor directive * [[sourcecode|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]] also uses src-highlight, and operates on whole source files. Updated to work with the fix for [[bugs/multiple_pages_with_same_name]]. Untested with files with no extension, e.g. `Makefile`. -* [[user/jrblevin]]'s code plugin uses src-highlight, and supports both +* [[users/jasonblevins]]'s code plugin uses src-highlight, and supports both while file and directive use. ## General problems -- cgit v1.2.3 From 02ee6d40d403eac396cead15900b1441e3fe08d7 Mon Sep 17 00:00:00 2001 From: "http://a1fie.livejournal.com/" Date: Mon, 10 Nov 2008 01:44:19 -0500 Subject: vim syntax file linked --- doc/ikiwiki/markdown.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ikiwiki/markdown.mdwn b/doc/ikiwiki/markdown.mdwn index a4190945f..3bebaef65 100644 --- a/doc/ikiwiki/markdown.mdwn +++ b/doc/ikiwiki/markdown.mdwn @@ -6,7 +6,8 @@ email messages. It is the markup language used by this wiki by default. For documentation about the markdown syntax, see [[formatting]] and [Markdown: syntax](http://daringfireball.net/projects/markdown/syntax). A [markdown mode](http://jblevins.org/projects/markdown-mode/) for -emacs can help in editing. +emacs can help in editing, as can this +[syntax file](http://plasticboy.com/markdown-vim-mode/) for vim. Note that [[WikiLinks|WikiLink]] and [[directives|directive]] are not part of the markdown syntax, and are the only bit of markup that this wiki -- cgit v1.2.3 From 4287a0206953b96711138d29d4c783922a56deff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Nov 2008 13:19:22 -0500 Subject: reorganize vim syntax highlighting info There was already a tip about it; move the plasticboy version to there. --- doc/ikiwiki/markdown.mdwn | 3 +-- doc/tips/vim_syntax_highlighting/discussion.mdwn | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ikiwiki/markdown.mdwn b/doc/ikiwiki/markdown.mdwn index 3bebaef65..94864c489 100644 --- a/doc/ikiwiki/markdown.mdwn +++ b/doc/ikiwiki/markdown.mdwn @@ -6,8 +6,7 @@ email messages. It is the markup language used by this wiki by default. For documentation about the markdown syntax, see [[formatting]] and [Markdown: syntax](http://daringfireball.net/projects/markdown/syntax). A [markdown mode](http://jblevins.org/projects/markdown-mode/) for -emacs can help in editing, as can this -[syntax file](http://plasticboy.com/markdown-vim-mode/) for vim. +emacs can help in editing, as can the [[vim_syntax_highlighting]] file. Note that [[WikiLinks|WikiLink]] and [[directives|directive]] are not part of the markdown syntax, and are the only bit of markup that this wiki diff --git a/doc/tips/vim_syntax_highlighting/discussion.mdwn b/doc/tips/vim_syntax_highlighting/discussion.mdwn index b1637e758..038854b9f 100644 --- a/doc/tips/vim_syntax_highlighting/discussion.mdwn +++ b/doc/tips/vim_syntax_highlighting/discussion.mdwn @@ -1 +1,8 @@ I'm going to look at merging this with potwiki.vim (a vim-based personal wiki) so that you can follow wiki-links and auto-create pages etc., direct from vim. (I'm writing this incase I don't get around to it) -- [[JonDowland]] + +---- + +Another attempt at the same thing is here: + + +In my tests, [[ikiwiki.vim]] works better than that one, YMMV. --[[Joey]] -- cgit v1.2.3 From 5c0d43999f1e9eb0814eed3ccc0a91b030bb6a3e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Nov 2008 13:30:20 -0500 Subject: response --- doc/plugins/format/discussion.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/plugins/format/discussion.mdwn b/doc/plugins/format/discussion.mdwn index b7d6ca71c..df8448ed6 100644 --- a/doc/plugins/format/discussion.mdwn +++ b/doc/plugins/format/discussion.mdwn @@ -3,3 +3,13 @@ Is there any way to tell if an htmlize hook have been called from a format direc I am currently modifying the [[contrib/highlightcode]] plugin by [[sabr]] and I wanted to have a different behavior depending on the fact that the htmlize hook is called from a format directive or not. For instance, this could disable the raw copy of the highlighted code. Since I have enabled the keepextension option, I tried to rely on the page extension to decide whenever I have to create the raw file or not but this does not seems a reliable approach. One possible solution is to add an optional parameter to the htmlize hook (and thus to htmlize function in IkiWiki.pm) which could tell if this is the format directive that called the function but I am not sure that is a good way to do this. + +> It's (probably) not just the format directive that has a potential problem here. +> Imagine a syntax highlighted source code file that contains some other +> directive, such as table or meta. Such a directive calls `htmlize` on the +> parameters passed to it. +> +> There is one way to detect this ATM. If `%IkiWiki::preprocessing` has +> anything in it, then ikiwiki is in the middle of handling a preprocessing +> directive. So you could check that. It's getting into internals, so not +> ideal.. --[[Joey]] -- cgit v1.2.3 From d5853f3e33f70ac82c8a77519a4e1c4781da83eb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Nov 2008 17:40:03 -0500 Subject: reorg to avoid broken link in basewiki ikiwiki/markdown is a basewiki page and shouldn't link to pages in tips. Instead, make the tips link to it, so backlinks will point back to them. While I'm at it, move the info about the emacs mode to a tip. --- doc/ikiwiki/markdown.mdwn | 4 +--- doc/tips/emacs_syntax_highlighting.mdwn | 3 +++ doc/tips/vim_syntax_highlighting.mdwn | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 doc/tips/emacs_syntax_highlighting.mdwn (limited to 'doc') diff --git a/doc/ikiwiki/markdown.mdwn b/doc/ikiwiki/markdown.mdwn index 94864c489..684191929 100644 --- a/doc/ikiwiki/markdown.mdwn +++ b/doc/ikiwiki/markdown.mdwn @@ -4,9 +4,7 @@ is a minimal markup language that resembles plain text as used in email messages. It is the markup language used by this wiki by default. For documentation about the markdown syntax, see [[formatting]] and -[Markdown: syntax](http://daringfireball.net/projects/markdown/syntax). A -[markdown mode](http://jblevins.org/projects/markdown-mode/) for -emacs can help in editing, as can the [[vim_syntax_highlighting]] file. +[Markdown: syntax](http://daringfireball.net/projects/markdown/syntax). Note that [[WikiLinks|WikiLink]] and [[directives|directive]] are not part of the markdown syntax, and are the only bit of markup that this wiki diff --git a/doc/tips/emacs_syntax_highlighting.mdwn b/doc/tips/emacs_syntax_highlighting.mdwn new file mode 100644 index 000000000..941cf5415 --- /dev/null +++ b/doc/tips/emacs_syntax_highlighting.mdwn @@ -0,0 +1,3 @@ +A [markdown mode](http://jblevins.org/projects/markdown-mode/) for +emacs can help in editing of ikiwiki +[[ikiwiki/markdown]] files. diff --git a/doc/tips/vim_syntax_highlighting.mdwn b/doc/tips/vim_syntax_highlighting.mdwn index 453efa8d1..172b763c3 100644 --- a/doc/tips/vim_syntax_highlighting.mdwn +++ b/doc/tips/vim_syntax_highlighting.mdwn @@ -1,2 +1,4 @@ -[[ikiwiki.vim]] is a vim syntax highlighting file for ikiwiki. Installation -instructions are at the top of the file. +[[ikiwiki.vim]] is a vim syntax highlighting file for ikiwiki +[[ikiwiki/markdown]] files. + +Installation instructions are at the top of the file. -- cgit v1.2.3 From 1ea66c3d3f0a33bc3f04d073457b525a70380c37 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Nov 2008 18:08:09 -0500 Subject: add a robots.txt Yahoo! has been pounding on ikiwiki.cgi again. While I'd prefer ikiwiki to generate sites that avoided robots hitting it in other ways, I'm adding a robots.txt, at least temporarily. --- doc/robots.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/robots.txt (limited to 'doc') diff --git a/doc/robots.txt b/doc/robots.txt new file mode 100644 index 000000000..7be87f9bd --- /dev/null +++ b/doc/robots.txt @@ -0,0 +1,2 @@ +User-Agent: * +Disallow: /ikiwiki.cgi -- cgit v1.2.3 From c1fa07ad4f165b42c962ba2a310681107f38c4f7 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Mon, 10 Nov 2008 23:24:22 +0000 Subject: update my userpage (and try out git pushes) --- doc/users/jondowland.mdwn | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/users/jondowland.mdwn b/doc/users/jondowland.mdwn index c6302616f..8bfa3dd76 100644 --- a/doc/users/jondowland.mdwn +++ b/doc/users/jondowland.mdwn @@ -1,5 +1,13 @@ -A new ikiwiki user, looking at ikiwiki both for his personal site but also as a team-documentation management system for a small-sized group of UNIX sysadmins. +I'm looking at ikiwiki both for my personal site but also as a +team-documentation management system for a small-sized group of UNIX +sysadmins. * My [homepage](http://jmtd.net/) is powered by ikiwiki (replacing my [older homepage](http://alcopop.org/), which was a mess of scripts) -I am giving a talk at the [UK UNIX User's Group](http://www.ukuug.org/) annual [Linux conference](http://www.ukuug.org/events/linux2008/) about organising system administrator documentation which will feature IkiWiki. +I gave a talk at the [UK UNIX User's Group](http://www.ukuug.org/) annual +[Linux conference](http://www.ukuug.org/events/linux2008/) about organising +system administrator documentation. Roughly a third of this talk was +discussing IkiWiki in some technical detail and suggesting it as a good piece +of software for this task. + + * slides at . -- cgit v1.2.3 From 91315207cf288b581ff0654225f5ebd111240ea2 Mon Sep 17 00:00:00 2001 From: "http://alcopop.org/me/openid/" Date: Mon, 10 Nov 2008 18:30:08 -0500 Subject: specifying the user in recentchanges for anon git pushes --- doc/tips/untrusted_git_push/discussion.mdwn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/tips/untrusted_git_push/discussion.mdwn (limited to 'doc') diff --git a/doc/tips/untrusted_git_push/discussion.mdwn b/doc/tips/untrusted_git_push/discussion.mdwn new file mode 100644 index 000000000..0c9bd679f --- /dev/null +++ b/doc/tips/untrusted_git_push/discussion.mdwn @@ -0,0 +1,23 @@ +I've just tried this (commit c1fa07a). Recent changes shows: + + + +Note that the user for the commit is 'jon', and the link points at cgi to create users/jon. I was wondering if that is configurable for users pushing via git. It would be nice perhaps to specify it in some way, perhaps via a git-config setting (user.name?). I'm not too familiar with exactly what the changeset contains. -- [[JonDowland]] -- cgit v1.2.3 From f28069a05c063c8583b207333a14ed353874d89c Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Mon, 10 Nov 2008 23:34:09 +0000 Subject: add discussion on this tip --- doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn (limited to 'doc') diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn new file mode 100644 index 000000000..6e5f1668a --- /dev/null +++ b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn @@ -0,0 +1,14 @@ +The u32 page is excellent, but I wonder if documenting the procedure here +would be worthwhile. Who knows, the remote site might disappear. But also +there are some variations on the approach that might be useful: + + * using a python script and the dom library to extract the page names from + Special:Allpages (such as + ) + * Or, querying the mysql back-end to get the names + * using WWW::MediaWiki for importing/exporting pages from the wiki, instead + of Special::Export + +Also, some detail on converting mediawiki transclusion to ikiwiki inlines... + +-- [[JonDowland]] -- cgit v1.2.3 From 183270a8453c0f504578f0c6b9ad72c6eb5bcc6a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Nov 2008 18:34:35 -0500 Subject: response --- doc/tips/untrusted_git_push/discussion.mdwn | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/tips/untrusted_git_push/discussion.mdwn b/doc/tips/untrusted_git_push/discussion.mdwn index 0c9bd679f..d433d61d4 100644 --- a/doc/tips/untrusted_git_push/discussion.mdwn +++ b/doc/tips/untrusted_git_push/discussion.mdwn @@ -20,4 +20,12 @@ I've just tried this (commit c1fa07a). Recent changes shows: 18:24:22 11/10/08 -Note that the user for the commit is 'jon', and the link points at cgi to create users/jon. I was wondering if that is configurable for users pushing via git. It would be nice perhaps to specify it in some way, perhaps via a git-config setting (user.name?). I'm not too familiar with exactly what the changeset contains. -- [[JonDowland]] +Note that the user for the commit is 'jon', and the link points at cgi to +create users/jon. I was wondering if that is configurable for users pushing +via git. It would be nice perhaps to specify it in some way, perhaps via a +git-config setting (user.name?). I'm not too familiar with exactly what the +changeset contains. -- [[JonDowland]] + +> All ikiwiki can do it look at who git has recorded as the author of +> the change (and it looks at the username part of the email address). +> You can set `user.email` in `.git/config`. --[[Joey]] -- cgit v1.2.3 From 17731892ec458ee6b1b68ce62bf30ad129c87e79 Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Mon, 10 Nov 2008 23:38:45 +0000 Subject: reply --- doc/tips/untrusted_git_push/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/tips/untrusted_git_push/discussion.mdwn b/doc/tips/untrusted_git_push/discussion.mdwn index d433d61d4..e85625a1b 100644 --- a/doc/tips/untrusted_git_push/discussion.mdwn +++ b/doc/tips/untrusted_git_push/discussion.mdwn @@ -29,3 +29,5 @@ changeset contains. -- [[JonDowland]] > All ikiwiki can do it look at who git has recorded as the author of > the change (and it looks at the username part of the email address). > You can set `user.email` in `.git/config`. --[[Joey]] + +> > Ah, excellent. In which case this *should* DTRT... -- [[JonDowland]] -- cgit v1.2.3 From 8c47f16dccd8a4dd91f365233690bd8139431249 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 11 Nov 2008 04:39:26 +0100 Subject: po: help request Signed-off-by: intrigeri --- doc/plugins/contrib/po.mdwn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index cc19c53b3..4ad0fa063 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -118,6 +118,10 @@ Any thoughts on this? >>> accordingly, but I forgot to update this page at the same time. >>> Hoping it's not too complicated to relocated an existing remote... >>> (never done that, I'm a Git beginner as well as a Perl ->>> newbie) --[[intrigeri]]a +>>> newbie) --[[intrigeri]] >>>> >>>> Just a matter of editing .git/config, thanks for the heads up. +>>>>> +>>>>> Joey, please have a look at my branch, your help would be really +>>>>> welcome for the security research, as I'm almost done with what +>>>>> I am able to do myself in this area. --[[intrigeri]] -- cgit v1.2.3 From ebd9f4ce8ac37f5860a8c3eecaae39bd7ddb03e7 Mon Sep 17 00:00:00 2001 From: bcdugga Date: Tue, 11 Nov 2008 00:23:20 -0500 Subject: --- doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn (limited to 'doc') diff --git a/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn b/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn new file mode 100644 index 000000000..5c3d1bbd2 --- /dev/null +++ b/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn @@ -0,0 +1,12 @@ +Using bzr, the dates for changes on the RecentChanges page all start +slightly before the Unix epoch. + +Changing line 249 of bzr.pm from + +` when => time - str2time($info->{"timestamp"}),` + +to + +` when => str2time($info->{"timestamp"}),` + +fixed this for me. -- cgit v1.2.3 From 71ea77a7806eadefd2f7aae839dc7d7346aad433 Mon Sep 17 00:00:00 2001 From: "http://edward.myopenid.com/" Date: Tue, 11 Nov 2008 07:59:06 -0500 Subject: add item to watch list --- doc/users/Edward_Betts.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/users/Edward_Betts.mdwn b/doc/users/Edward_Betts.mdwn index 0d4483fa8..b32927a1c 100644 --- a/doc/users/Edward_Betts.mdwn +++ b/doc/users/Edward_Betts.mdwn @@ -3,5 +3,7 @@ My watchlist: [[!inline archive="yes" sort="mtime" atom="yes" pages=" todo/allow_wiki_syntax_in_commit_messages* todo/shortcut_with_different_link_text* -todo/structured_page_data* "]] +todo/structured_page_data* +tips/convert_mediawiki_to_ikiwiki* +"]] -- cgit v1.2.3 From fb9130c18c073d263d3eaa1dd5ef1e78b60f868a Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 11 Nov 2008 17:17:56 +0100 Subject: po: answered Joey's "create a new translation" question ... that I previously completely missed. Signed-off-by: intrigeri --- doc/plugins/contrib/po.mdwn | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index 4ad0fa063..3077b4858 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -93,7 +93,7 @@ Any thoughts on this? >>> When a new language is added to `po_slave_languages`, a rebuild is >>> triggered, and all missing PO files are created and checked into >>> VCS. An unpriviledged wiki user can not add a new language to ->>> `po_slave_languages`, though. One could thing of adding the needed +>>> `po_slave_languages`, though. One could think of adding the needed >>> interface to translate a page into a yet-unsupported slave >>> language, and this would automagically add this new language to >>> `po_slave_languages`. It would probably be useful in some @@ -106,6 +106,39 @@ Any thoughts on this? >>>> I guess that if the template modification is made, it will list those >>>> languages on the page, and if a translation to a language is missing, >>>> the link will allow creating it? +>>>> +>>>>> Any translation page always exist for every supported slave +>>>>> language, even if no string at all have been translated yet. +>>>>> This implies the po plugin is especially friendly to people who +>>>>> prefer reading in their native language if available, but don't +>>>>> mind reading in English else. +>>>>> +>>>>> While I'm at it, there is a remaining issue that needs to be +>>>>> sorted out: how painful it could be for non-English speakers +>>>>> (assuming the master language is English) to be perfectly able +>>>>> to navigate between translation pages supposed to be written in +>>>>> their own language, when their translation level is most +>>>>> often low. +>>>>> +>>>>> (It is currently easy to display this status on the translation +>>>>> page itself, but then it's too late, and how frustrating to load +>>>>> a page just to realize it's actually not translated enough for +>>>>> you. The "other languages" loop also allows displaying this +>>>>> information, but it is generally not the primary +>>>>> navigation tool.) +>>>>> +>>>>> IMHO, this is actually a social problem (i.e. it's no use adding +>>>>> a language to the supported slave ones if you don't have the +>>>>> manpower to actually do the translations), that can't be fully +>>>>> solved by technical solutions, but I can think of some hacks +>>>>> that would limit the negative impact: a given translation's +>>>>> status (currently = percent translated) could be displayed next +>>>>> to the link that leads to it; a color code could as well be used +>>>>> ("just" a matter of adding a CSS id or class to the links, +>>>>> depending on this variable). As there is already work to be done +>>>>> to have the links text generation more customizable through +>>>>> plugins, I could do both at the same time if we consider this +>>>>> matter to be important enough. --[[intrigeri]] >> FWIW, I'm tracking your po branch in ikiwiki master git in the po >> branch. One thing I'd like to try in there is setting up a translated -- cgit v1.2.3 From 700c4bef294a792d507f6cfc34dd4dd5427f2a7f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 11 Nov 2008 13:40:02 -0500 Subject: let's stop sucking :-) --- doc/todo/avoid_thrashing.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 doc/todo/avoid_thrashing.mdwn (limited to 'doc') diff --git a/doc/todo/avoid_thrashing.mdwn b/doc/todo/avoid_thrashing.mdwn new file mode 100644 index 000000000..6c895e7c9 --- /dev/null +++ b/doc/todo/avoid_thrashing.mdwn @@ -0,0 +1,20 @@ +Problem: Suppose a server has 256 mb ram. Each ikiwiki process needs about +15 mb, before it's loaded the index. (And maybe 25 after, but only one such +process runs at any time). That allows for about 16 ikiwiki processes to +run concurrently on a server, before it starts to swap. Of course, anything +else that runs on the server and eats memory will affect this. + +One could just set `MaxClients 16` in the apache config, but then it's also +limited to 16 clients serving static pages, which is silly. Also, 16 is +optimistic -- 8 might be a saner choice. And then, what if something on the +server decides to eat a lot of memory? Ikiwiki can again overflow memory +and thrash. + +It occurred to me that the ikiwiki cgi wrapper could instead do locking of +its own (say of `.ikiwiki/cgilock`). The wrapper only needs a few kb to +run, and it starts *fast*. So hundreds could be running waiting for a lock +with no ill effects. Crank `MaxClients` up to 256? No problem.. + +And there's no real reason to allow more than one ikiwiki cgi to run at a +time. Since almost all uses of the CGI lock the index, only one can really +be doing anything at a time. --[[Joey]] -- cgit v1.2.3 From 6611f3a2d9eda262a07bb506b204e8bbf0728c38 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 11 Nov 2008 13:44:39 -0500 Subject: bzr: Fix dates for recentchanges. --- IkiWiki/Plugin/bzr.pm | 2 +- debian/changelog | 1 + doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 101e91b93..1054f5b3e 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -246,7 +246,7 @@ sub rcs_recentchanges ($) { #{{{ rev => $info->{"revno"}, user => $user, committype => "bzr", - when => time - str2time($info->{"timestamp"}), + when => str2time($info->{"timestamp"}), message => [@message], pages => [@pages], }; diff --git a/debian/changelog b/debian/changelog index cc277beb3..dfc5de2d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,7 @@ ikiwiki (2.69) UNRELEASED; urgency=low was earlier added to edit links. * tag: Normalize tagbase so leading/trailing slashes in it don't break things. + * bzr: Fix dates for recentchanges. -- Joey Hess Thu, 06 Nov 2008 16:01:00 -0500 diff --git a/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn b/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn index 5c3d1bbd2..fa6e45b47 100644 --- a/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn +++ b/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn @@ -10,3 +10,7 @@ to ` when => str2time($info->{"timestamp"}),` fixed this for me. + +> Weird, I wonder why it was written to return an absolute time like that +> in the first place? Can't have ever been right. Fixed, thanks. --[[Joey]] +> [[done]] -- cgit v1.2.3 From d1b22b252481134815b1d02d564b6b9622fe7b4b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 11 Nov 2008 15:54:52 -0500 Subject: lockwiki changes * Stop busy-waiting in lockwiki, as this could delay ikiwiki from waking up for up to one second. The bailout code is no longer needed. * Remove support for unused optional wait parameter from lockwiki. --- IkiWiki.pm | 19 +++---------------- debian/changelog | 8 ++++++++ doc/todo/avoid_thrashing.mdwn | 2 ++ po/ikiwiki.pot | 10 +++++----- 4 files changed, 18 insertions(+), 21 deletions(-) (limited to 'doc') diff --git a/IkiWiki.pm b/IkiWiki.pm index dc9b66344..d949566d8 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1280,8 +1280,7 @@ sub indexlink () { #{{{ my $wikilock; -sub lockwiki (;$) { #{{{ - my $wait=@_ ? shift : 1; +sub lockwiki () { #{{{ # Take an exclusive lock on the wiki to prevent multiple concurrent # run issues. The lock will be dropped on program exit. if (! -d $config{wikistatedir}) { @@ -1289,20 +1288,8 @@ sub lockwiki (;$) { #{{{ } open($wikilock, '>', "$config{wikistatedir}/lockfile") || error ("cannot write to $config{wikistatedir}/lockfile: $!"); - if (! flock($wikilock, 2 | 4)) { # LOCK_EX | LOCK_NB - if ($wait) { - debug("wiki seems to be locked, waiting for lock"); - my $wait=600; # arbitrary, but don't hang forever to - # prevent process pileup - for (1..$wait) { - return if flock($wikilock, 2 | 4); - sleep 1; - } - error("wiki is locked; waited $wait seconds without lock being freed (possible stuck process or stale lock?)"); - } - else { - return 0; - } + if (! flock($wikilock, 2)) { # LOCK_EX + error("failed to get lock"); } return 1; } #}}} diff --git a/debian/changelog b/debian/changelog index dfc5de2d4..2088b07ec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,14 @@ ikiwiki (2.69) UNRELEASED; urgency=low * tag: Normalize tagbase so leading/trailing slashes in it don't break things. * bzr: Fix dates for recentchanges. + * Avoid multiple ikiwiki cgi processes piling up, eating all memory, + and thrashing, by making the cgi wrapper wait on a cgilock. + If you had to set apache's MaxClients low to avoid ikiwiki thrashing your + server, you can now turn it up to a high value. + * Stop busy-waiting in lockwiki, as this could delay ikiwiki from waking up + for up to one second. The bailout code is no longer needed after above + change. + * Remove support for unused optional wait parameter from lockwiki. -- Joey Hess Thu, 06 Nov 2008 16:01:00 -0500 diff --git a/doc/todo/avoid_thrashing.mdwn b/doc/todo/avoid_thrashing.mdwn index 6c895e7c9..45b11d872 100644 --- a/doc/todo/avoid_thrashing.mdwn +++ b/doc/todo/avoid_thrashing.mdwn @@ -18,3 +18,5 @@ with no ill effects. Crank `MaxClients` up to 256? No problem.. And there's no real reason to allow more than one ikiwiki cgi to run at a time. Since almost all uses of the CGI lock the index, only one can really be doing anything at a time. --[[Joey]] + +[[done]] diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 34fa5e65b..8cf3853e0 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-11-07 12:23-0500\n" +"POT-Creation-Date: 2008-11-11 15:36-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -910,19 +910,19 @@ msgstr "" #. translators: The first parameter is a filename, and the second is #. translators: a (probably not translated) error message. -#: ../IkiWiki/Wrapper.pm:79 +#: ../IkiWiki/Wrapper.pm:93 #, perl-format msgid "failed to write %s: %s" msgstr "" #. translators: The parameter is a C filename. -#: ../IkiWiki/Wrapper.pm:135 +#: ../IkiWiki/Wrapper.pm:150 #, perl-format msgid "failed to compile %s" msgstr "" #. translators: The parameter is a filename. -#: ../IkiWiki/Wrapper.pm:155 +#: ../IkiWiki/Wrapper.pm:170 #, perl-format msgid "successfully generated %s" msgstr "" @@ -969,7 +969,7 @@ msgstr "" msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1685 +#: ../IkiWiki.pm:1672 msgid "yes" msgstr "" -- cgit v1.2.3