Commit Graph

187 Commits (87c3370e04fdcecb6f296f3e5e0f6b7414e8fa3e)

Author SHA1 Message Date
Joey Hess e22af796e5 skip if cvsps is not available 2009-09-10 16:49:54 -04:00
Amitai Schlair 98553d1537 CVS operations generally need to be within CVS checkouts, so these chdir()
calls are warranted. They shouldn't modify the caller's working directory,
though. Use File::chdir to keep the scope of the changes subroutine-local.
The tests now pass without resetting the working directory.
2009-09-10 00:51:34 -04:00
Amitai Schlair 12bbc6c919 Add automated tests, modeled after svn's. Note the chdir() calls;
perhaps cvs.pm should be doing pushd/popd in case the caller expects
its working directory to be left alone.
2009-09-09 23:09:26 -04:00
Amitai Schlair c36d2fa896 Merge branch 'master' of git://github.com/joeyh/ikiwiki 2009-08-30 03:02:15 -04:00
Simon McVittie 1ea8580a5f Remove now-unused function pagespec_merge
Now that dependencies are a list of pagespecs with an implicit "or"
operation, there's no need to try to merge pagespecs under normal use.

ikiwiki-transition contains the only use of the function, so move
it there rather than deleting it entirely (it's used to concatenate all
admins' lists of locked pages).
2009-08-25 00:31:40 +01:00
Simon McVittie 7227c2debf Use a hash to de-duplicate dependencies 2009-08-25 00:31:16 +01:00
Simon McVittie fe4f176f72 Optimize the dependencies list
On a large wiki you can spend a lot of time reading through large lists
of dependencies to see whether files need to be rebuilt (album, with its
one-page-per-photo arrangement, suffers particularly badly from this).

The dependency list is currently a single pagespec, but it's not used like
a normal pagespec - in practice, it's a list of pagespecs joined with the
"or" operator.

Accordingly, change it to be stored as a list of pagespecs. On a wiki
with many tagged photo albums, this reduces the time to refresh after
`touch tags/*.mdwn` from about 31 to 25 seconds.

Getting the benefit of this change on an existing wiki requires a rebuild.
2009-08-24 23:18:10 +01:00
Amitai Schlair 2b7a003794 Add my CVS plugin and related patches. 2009-08-13 16:56:26 -04:00
Joey Hess 68fa7b5f8c use underlay_install as optimisaton 2009-07-21 13:16:59 +02:00
Joey Hess ec965fc92c Merge branch 'master' into po
Conflicts:
	debian/changelog
2009-07-19 12:36:01 +02:00
Joey Hess 5418385336 Optimise use of gettext, and avoid ugly warnings if Locale::gettext is not available.
The test suite was emitting a lot of ugly gettext warnings;
setting LC_ALL didn't solve the problem for all locale setups
(since ikiwiki remaps it to LANG, and ikiwiki didn't know about
the C locale).

People also seem generally annoyed by the messages when
Locale::Gettext is not installed, and I suspect will be
generally happier if it just silently doesn't localize.

The optimisation came about when I noticed that the gettext
sub was doing rather a lot of work each call just to see
if localisation is needed. We can avoid that work by caching,
and the best thing to cache is a version of the gettext sub
that does exactly the right thing.

This was slightly complicated by the locale setting,
which might need to override the original locale (or lack
thereof) after gettext has been called. So it needs to invalidate
the cache in that case. It used to do it via a global variable,
which I am happy to have also gotten rid of.
2009-06-08 18:33:54 -04:00
intrigeri 86edd73d16 Merge commit 'upstream/master' into pub/po
Conflicts:

	debian/changelog
	debian/control

Signed-off-by: intrigeri <intrigeri@boum.org>
2009-06-06 14:03:40 +02:00
Joey Hess 763f4b91da add test case for unterminated """ string
A directive that contains an unterminated """ string should not
cause each word of the string to be treated as a bare word. Instead,
the directive should fail to parse.

There are two tests. One just checks that a complete directive
containing such a string fails to parse. The other checks for a case
where a directive ends with a very long unterminated """ string,
and the directive is itself not closed. While this test won't fail,
it does trigger a nasty perl warning.
2009-06-05 16:10:08 -04:00
Joey Hess fd7db49f94 Fix test suite to not rely on an installed copy of ikiwiki after underlaydir change. Closes: #530502 2009-05-25 12:40:40 -04:00
Joey Hess e92c6722dd stop using perl -T here
See bug #411786. Perl's random corruption of the taint flag is even effecting
the untainting of source filenames now (which AFAICS, is a proper untaint
and always worked before..), and that makes using ikiwiki in perl taint
mode not work at all.
2009-05-22 13:27:23 -04:00
Joey Hess bcf3f9091a add test case for multiline pagespec 2009-05-21 12:44:21 -04:00
Joey Hess ef003f48f4 Merge branch 'master' into po
Conflicts:
	debian/changelog
2009-05-19 13:07:47 -04:00
Joey Hess 23a4ee6d15 Allow curly braces to be used in pagespecs
And avoid a whole class of potential security problems (though
none that I know of actually existing..), by avoiding
performing any string interpolation on user-supplied data when translating
pagespecs.
2009-05-18 15:25:10 -04:00
intrigeri 4558457402 Merge commit 'upstream/master' into pub/po
Conflicts:

	debian/changelog
	debian/control
2009-04-20 12:21:18 +02:00
Joey Hess 8a11983946 Fix git test suite to use a bare repo.
This works around an enormous (and, in this context, enormously confusing)
message that git has begun to print when one attempts to push changes into
a non-bare repo.

As a bonus, it now tests whether ikiwiki-makerepo works.
2009-04-04 14:58:34 -04:00
intrigeri ae474d8e14 Merge commit 'upstream/master' into prv/po
Conflicts:

	IkiWiki/Plugin/editpage.pm
	debian/control
	debian/copyright
	doc/todo/need_global_renamepage_hook.mdwn

Signed-off-by: intrigeri <intrigeri@boum.org>
2009-03-08 09:50:27 +01:00
Joey Hess 66dc253437 Add noextension parameter to htmlize hooks to support, eg, Makefile. 2009-02-19 18:38:45 -05:00
Joey Hess 9ecb0036a3 add keepextension tests 2009-02-19 18:31:57 -05:00
Joey Hess c1907ded87 fix pagename, pagetype tests
Put tests in right file.

Set internal variable to hash, the functions expect that.
2009-02-19 18:28:43 -05:00
Joey Hess 8c8b18935b fix pagetype test
File had wrong name, and made wrong assumption about what pagetype does for
bare files.
2009-02-19 18:23:40 -05:00
Joey Hess 3b83e52018 rename apache404 -> 404
This may already work with other web servers that have copied apache's
interface, and it should be easy to add support to it for web servers that
use some other interface. So, make the name more general.
2009-01-31 19:26:36 -05:00
Simon McVittie 46b880f839 Split apache404 into an independent plugin
Also make it ignore the 'do' parameter at Joey's suggestion, to have one
less thing to remember when configuring.
2009-01-31 22:32:10 +00:00
Simon McVittie 8322b8c9c8 CGI: add cgi_page_from_404(), which remaps a path like $REDIRECT_URL to an IkiWiki page name
Also add a regression test
2009-01-31 18:07:42 +00:00
intrigeri 03ab262319 revert renamepage's hook original name
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-27 00:00:00 +01:00
intrigeri e9e75f5f29 Merge commit 'upstream/master' into prv/po
Conflicts:

	t/syntax.t
2009-01-18 00:38:31 +01:00
Joey Hess cd2ddb57a5 load rpc xml lib on the fly
This way, enabling the plugin via websetup is safe, it can't leave
ikiwiki in a broken state.
2009-01-17 14:56:48 -05:00
intrigeri 832d4d31d1 Merge commit 'upstream/master' into prv/po
Conflicts:

	IkiWiki/Plugin/editpage.pm
	IkiWiki/Plugin/skeleton.pm.example
	doc/plugins/write.mdwn
	t/syntax.t
2009-01-17 14:01:53 +01:00
Joey Hess 7ee92cab40 blogspam: New plugin, adding spam filtering for page editing / comment posting using the BlogSpam.net API. 2009-01-16 22:39:11 -05:00
intrigeri 92b2efd393 po.t: fix test suite
(translatable files now have to exist in srcdir)
)
Signed-off-by: intrigeri <intrigeri@boum.org>
2009-01-15 23:32:55 +01:00
intrigeri 82197bd0ea Merge commit 'upstream/master' into prv/po 2009-01-13 12:26:43 +01:00
Joey Hess b0a03fef65 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.)
2009-01-03 12:52:47 -05:00
intrigeri 5c2f6cb893 Merge commit 'upstream/master' into prv/po 2009-01-01 13:34:00 +01:00
intrigeri c01485ae1a renamed the renamepage hook to renamelink, added rename hook
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-12-30 21:36:40 +01:00
intrigeri 4e4fb18dbe po.t: adapted a few tests to match the current ikiwiki behaviour
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-12-30 18:55:32 +01:00
intrigeri 21add7ffa8 Merge commit 'upstream/master' into prv/po
Conflicts:

	debian/control
	debian/copyright
	doc/ikiwiki/pagespec.mdwn

Signed-off-by: intrigeri <intrigeri@boum.org>
2008-12-30 18:24:36 +01:00
Joey Hess c07a95ed8e remove globlist support
No transition code implemented, but I will probably make a 2.x release that
warns about found globlists.
2008-12-23 17:11:04 -05:00
Joey Hess c61c99fc77 fix to use prefix directives 2008-12-23 16:56:56 -05:00
Joey Hess a4ebfe8fe8 fix to use prefix directives 2008-12-23 16:55:33 -05:00
Joey Hess 13d77c369e avoid an uninitialized value warning 2008-12-21 13:46:00 -05:00
Joey Hess 79d2d44db2 Merge commit 'smcv/openid' 2008-12-21 13:13:28 -05:00
Joey Hess 5b67c54b22 add another test 2008-12-21 12:59:11 -05:00
Simon McVittie f0c76aa51c Add a regression test for &openiduser 2008-12-21 16:37:20 +00:00
Simon McVittie c42f174e65 beautify_urlpath: add a regression test 2008-12-21 15:24:53 +00:00
intrigeri c51202c11e po.t: cleanup
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-13 00:54:51 +01:00
intrigeri aed42eb34a po: fix istranslation/istranslatable for pages starting with /
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-12 17:29:12 +01:00