Commit Graph

11209 Commits (e0b0b57211e8fe609c09a37605a21f42a6d734d3)

Author SHA1 Message Date
Joey Hess e0b0b57211 fix link 2009-10-09 13:33:49 -04:00
Joey Hess 3807aa298c fix pagespec_match_list handling of list parameter 2009-10-09 13:28:41 -04:00
Joey Hess 6f2cc5ac8c pagespec_match_list: change limit to filter 2009-10-09 13:20:41 -04:00
Joey Hess f9f7a6e9f3 conditional: use pagespec_match_list 2009-10-09 13:07:50 -04:00
Joey Hess 769b78df07 pagespec_match_list allow additional pagespec limit parameters again 2009-10-09 13:02:10 -04:00
Joey Hess c7da991158 indentation 2009-10-09 13:02:03 -04:00
Joey Hess b7351daacd conditional: use yesno 2009-10-09 12:54:35 -04:00
Joey Hess 96682e3084 progress: switch to new pagespec_match_list 2009-10-09 12:48:16 -04:00
Joey Hess c791f84fb5 linkmap: Use new pagespec_match_list 2009-10-09 12:35:41 -04:00
Joey Hess 34b2132355 fix test to use new calling convention
This test still fails several cases, since add_depends influence testing is
currently commented out.
2009-10-09 00:06:58 -04:00
Joey Hess fa82be5524 add pagespec/sorting to underlay 2009-10-09 00:06:40 -04:00
Joey Hess fb3fd6b60f don't link to inline, not available when directives underlay is not enabled 2009-10-09 00:06:08 -04:00
Joey Hess c11b3af189 typo 2009-10-08 23:55:50 -04:00
Joey Hess 5e7b2dea84 rename use_pagespec to pagespec_match_list
To avoid breaking plugins, also support the old pagespec_match_list
calling convention, with a deprecation warning.
2009-10-08 23:51:06 -04:00
Joey Hess 955bcea2a7 fix test broken by change to failing link() influence 2009-10-08 23:48:08 -04:00
Joey Hess 332821144b calendar: rework so it can use use_pagespec
This was tricky because of the caching, and because use_pagespec always
adds a dependency. That would have made year calendars depend on the whole
pagespec, which is overly broad. So I removed the caching, format_month,
and in format_year just look at %pagesources to see if month pages are
available.

In format_month, I make it always call use_pagespec, so each month calendar
gets the right dependency and any influcences added. This means a bit more
work, but the added work is fairly minimal, and presence dependencies
remove a *lot* of work it used to do.

(100% untested!)
2009-10-08 23:30:34 -04:00
Joey Hess 80ab1dbc12 postsparkline: switch to use_pagespec
Also, fixed up the dependency type for time=mtime. That has
to remain a content dependency, sadly.
2009-10-08 22:56:36 -04:00
Joey Hess 3be7a02e7d orphans: switch to use_pagespec 2009-10-08 22:56:12 -04:00
Joey Hess 57d04ed892 fix feedpages dependency
This dependency was missing before switching to use_pagespec.
It is correct to add it, but it needs to be combined with the regular
"pages" dependency to ensure that it does not match extra pages.

(Also fixed its dependency type.)
2009-10-08 20:55:12 -04:00
Joey Hess 37ec6a8243 Merge branch 'master' into dependency-types
Conflicts:
	IkiWiki.pm
	IkiWiki/Render.pm
	debian/changelog
2009-10-08 20:33:58 -04:00
Joey Hess bc4ef28f3e pagestate: switch to use_pagespec 2009-10-08 20:29:51 -04:00
Joey Hess 3bb00d142a Optimize away most expensive file prune calls, when refreshing
Benchmarking refresh of a a wiki with 25 thousand pages showed
file_pruned() using most of the time. But, when refreshing, ikiwiki already
knows about nearly all the files. So we can skip calling file_pruned() for
those it knows about. While tricky to do, this sped up a refresh (that
otherwise does no work) by 10-50%.
2009-10-08 20:27:56 -04:00
Joey Hess d5f0144495 use_pagespec: do not fail with error when unable to match, unless it fails
with an ErrorReason
2009-10-08 18:47:48 -04:00
Joey Hess 1abbc6a404 pagecount: switched to use_pagespec 2009-10-08 18:47:25 -04:00
Joey Hess 32cd5f0b79 inline: switch to use_pagespec
Taking advantage of every single one of its features, of course.
Even had to add one more..
2009-10-08 18:30:50 -04:00
Joey Hess 65d57902ca add sorting page 2009-10-08 18:18:34 -04:00
Joey Hess 4b8ca7cfc1 update 2009-10-08 18:00:10 -04:00
Joey Hess de24c0df87 map: switch to use_pagespec 2009-10-08 17:53:45 -04:00
Joey Hess 5e236f5d25 add use_pagespec and deptype functions 2009-10-08 17:53:20 -04:00
Joey Hess c57908b9d0 change how dependency types are specified to add_depends
Also, this fixes 2 bugs in dependency info.
2009-10-08 16:49:03 -04:00
Joey Hess 3948b42238 found a way to get false positive influences 2009-10-08 15:33:47 -04:00
Joey Hess 586c35de30 Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info 2009-10-08 13:56:54 -04:00
Joey Hess 3baf6980aa update 2009-10-08 13:55:10 -04:00
Joey Hess f2b3d13414 fix handling of influences of pagespecs that fail to match
If a pagespec fails to match, I had been throwing the influences away, but
that is not right. Consider `backlink(foo)`, where foo does not exist.
It still needs to be added as an influence, because if it is created, it
will influence the pagespec to match.

But with that fix, `link(bar)` had as influences all pages, whether they
link to bar or not. Which is not necessary, because modifiying a page to
add a link to bar will directly cause the pagespec to match.

So, in match_link (and all the match_* functions for page metadata),
only return an influence if the match succeeds.

match_backlink had been implemented as the inverse of match_link, but that
is no longer completly true. While match_link does not return an influence
on failure, match_backlink does.

match_created_before/after also return the influence on failure, this way
if created_after(foo) currently fails because foo does not exist, it will
still update the page with the pagespec if foo is created.
2009-10-08 13:38:46 -04:00
http://shoorick.livejournal.com/ e82aeb3e43 2009-10-08 13:07:41 -04:00
http://www.larted.org.uk/~dom/ 79f3e32ea7 add cpanrt 2009-10-08 11:38:34 -04:00
http://www.cse.unsw.edu.au/~willu/ 57d694046f Tweaks 2009-10-08 07:26:01 -04:00
http://smcv.pseudorandom.co.uk/ 808c699961 2009-10-08 06:38:40 -04:00
Joey Hess b91ccb4963 update 2009-10-08 04:06:53 -04:00
http://www.cse.unsw.edu.au/~willu/ 61105cca4f Questions... 2009-10-08 01:33:23 -04:00
Joey Hess 0cb08c9a4b bugfix 2009-10-07 22:08:19 -04:00
Joey Hess 957ded9d64 remove explicit addition of dependencies for displayed pages
that hack is not needed, thanks to pagespec influences calculation
2009-10-07 21:57:31 -04:00
Joey Hess 5f9860e65c add type info to influence information 2009-10-07 21:52:37 -04:00
Joey Hess 83b9bf54ec Merge branch 'master' into dependency-types 2009-10-07 21:26:57 -04:00
Joey Hess f7601954a8 update 2009-10-07 21:26:50 -04:00
Joey Hess bb389a5ae2 convert add_depends to use influences
No more horrible special-case pagespec parsing.

OTOH, matching over all pages to determine influences is a lot of work.
2009-10-07 21:17:57 -04:00
Joey Hess 43a8b40032 influences calculation implemented 2009-10-07 20:36:25 -04:00
Joey Hess 54fb82a5a4 more influences tests 2009-10-07 20:35:26 -04:00
Joey Hess 4002d7c1a4 add influence info to match_*
Also update docs, test suite.
2009-10-07 20:31:13 -04:00
Joey Hess 76746c5fe6 Merge branch 'master' into dependency-types 2009-10-07 20:02:43 -04:00