Commit Graph

11200 Commits (34b213235529300c8be19290cefb1e5a01e2da3a)

Author SHA1 Message Date
Joey Hess dc6fab3824 syntax 2009-10-05 15:17:36 -04:00
Joey Hess fc864515b8 omit forum and javascript from list 2009-10-05 15:16:14 -04:00
Joey Hess 7123178732 oprhans: Use a combination of precense and link dependencies.
This makes it more efficient.

It also fixes a longstanding bug, where if only a small set of pages were
considered by orphans, changes to links on other pages failed to cause an
update.
2009-10-05 15:14:18 -04:00
Joey Hess f41caf57ea use links dependency 2009-10-05 15:09:09 -04:00
Joey Hess 846026b20b update 2009-10-05 15:08:57 -04:00
Joey Hess c6bf4228d5 make links dependencies fire if broken links change 2009-10-05 15:01:05 -04:00
Joey Hess e96992bbc8 fix add_depends to new api 2009-10-05 14:33:42 -04:00
Joey Hess 666a9613a1 implement links dependencies
Involved some code refactoring so that same code that detects
link changes for backlinks updating can be used for link dependency
checking. The nice thing is that link dep checking is thus
comopletly free!
2009-10-05 14:33:23 -04:00
Joey Hess 89b65695e7 typos 2009-10-05 13:40:35 -04:00
Jon Dowland b8fae0ec39 another UI issue I'm interested in 2009-10-05 15:27:41 +01:00
Jon Dowland bccea01c07 would you accept patches for this? 2009-10-05 15:27:03 +01:00
Jon Dowland 204e733d79 good work, thank you! 2009-10-05 15:17:11 +01:00
Joey Hess 36c605cada add test suite for add_depends
and found a bug in my bitmath..
2009-10-04 23:27:00 -04:00
Joey Hess d3e0a54344 Merge branch 'master' into dependency-types 2009-10-04 20:37:09 -04:00
Joey Hess bcad00b046 update, add spec for link dependencies 2009-10-04 20:35:26 -04:00
Joey Hess d797b9ab0e remove /i from regexp
Nothing case-oriented going on in here.
2009-10-04 20:35:02 -04:00
Joey Hess d0f116478c update 2009-10-04 20:34:43 -04:00
Joey Hess be032a7b87 rework dependency types code
Simplify, change default content depends number to 1,
change interface to make more sense.
2009-10-04 20:30:21 -04:00
Joey Hess b4c8cc9072 update 2009-10-04 17:38:10 -04:00
Joey Hess b0314296a8 update 2009-10-04 16:40:36 -04:00
Joey Hess 4a20402ba0 update 2009-10-04 16:36:39 -04:00
Joey Hess 9403045b7e Merge branch 'dependency-types' into transitive-dependencies
Conflicts:
	IkiWiki/Render.pm
2009-10-04 16:33:58 -04:00
Joey Hess 66a7b49acb Merge branch 'master' into transitive-dependencies 2009-10-04 16:28:57 -04:00
Joey Hess d5357374c9 Merge branch 'master' into dependency-types 2009-10-04 16:28:51 -04:00
Joey Hess a8af271e5a document effect of contentless dependencies on sidebar efficiency 2009-10-04 16:28:14 -04:00
Joey Hess cda8592a5f Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info 2009-10-04 16:19:54 -04:00
Joey Hess 7982c3c177 postsparkline and progress: also contentless dependencies 2009-10-04 16:16:50 -04:00
Joey Hess 66852de775 meta redir dependency is contentless 2009-10-04 16:12:05 -04:00
Joey Hess 2af988b86f listdirectives: contentless dependency
Another one that probably doesn't matter, but for completness.
2009-10-04 16:11:10 -04:00
Joey Hess de6eba6ddd not a contentless dependency
needs link info
2009-10-04 16:10:34 -04:00
Joey Hess ce78b69927 edittemplate: contentless dependency
This one is unlikely to matter much, but yeah, it's contentless.
2009-10-04 16:07:02 -04:00
Joey Hess a6689f9c7a calendar: all dependencies are contentless 2009-10-04 16:05:41 -04:00
Joey Hess e529c561f5 inline: Use a contentless dependency in quick mode. 2009-10-04 16:03:01 -04:00
Joey Hess da5c12e9eb expand the set of things that can be matched contentless 2009-10-04 16:01:56 -04:00
Joey Hess 6f1ebdd692 update 2009-10-04 15:53:54 -04:00
Joey Hess 2fbfcd16e6 map: Use a contentless dependency unless show= is specified.
This makes simple maps efficient enough that they can be used on sidebars!
2009-10-04 15:46:23 -04:00
Joey Hess daafdf1acb optimise add_depends for simple pagespecs
We don't need to check if the pagespec is contentless; all simple ones are.
2009-10-04 15:43:38 -04:00
Joey Hess 5fd230f968 detect pagespecs that require content dependencies
When adding a contentless dependency, the pagespec also needs to be one
that does not look at any page content information.

As a first approximation of that, only allow glob-based pagespecs in
contentless dependencies. While there are probably a few other types of
pagespecs that can match contentless, this will work for most of them.
2009-10-04 15:42:24 -04:00
http://kaizer.se/ 7b692b5d6e Updated pproc-indent by catching only indent at beginning of line 2009-10-04 14:43:38 -04:00
Joey Hess ba11568f1e response 2009-10-03 17:43:23 -04:00
Joey Hess bd958f91a2 did a scratch implementation of dependancy types, but found it more complex 2009-10-03 17:38:47 -04:00
Joey Hess c7bdd17087 clarify 2009-10-03 17:17:48 -04:00
Joey Hess 6eaf9e4015 orphans and brokenlinks cannot use contentless dependency
Tried a contentless dep and it does not work; changes to links in pages
are not noticed. Drat.
2009-10-03 15:59:30 -04:00
Joey Hess 26dbc09bd8 implement support for DEPEND_EXISTS
Preliminary support, anyway.

If a dependency only includes DEPEND_EXISTS, then only changes that
involved adding or deleting a page can trigger it.

This is complicated by internal pages, since the code did not previously
differentiate between add, delete, and change of internal pages.
Now it tracks change separately from add+delete, so DEPEND_EXISTS pagespecs
that actually match internal pages (which will probably be quite rare in
practice) should work.
2009-10-03 15:50:22 -04:00
Joey Hess 49b71d0615 update 2009-10-03 15:38:18 -04:00
Joey Hess fd9d968024 document add_depends dependency type interface 2009-10-03 15:37:57 -04:00
Joey Hess 5c9f65a672 set dependency hash value properly for new dependency types
Just "1" won't cut it anymore; we need to list all the dependency types.
2009-10-03 15:37:15 -04:00
Joey Hess dc4e44adf1 pagecount: Use contentless dependency
This will avoid lots of unnecessary updates of pages using the pagecount
directive. Yay!
2009-10-03 15:36:23 -04:00
Joey Hess 743f69c675 add dependency type parameters to add_depends
Dependency types are represented by bits in the values of the %depends
and %depends_simple hashes.

Change the dependslist array saved to the index to a depends hash.
depends_simple is also converted from an array to a hash.

Note that the depends field used to be a string, and we still
have compat code to handle upgrades from that, as well as from the arrays.
I didn't use ikiwiki-transition because I don't want ikiwiki to break if
users forget to run it; also we're going to recommend a full rebuild on
upgrade to this version to get the improved dependency handling. So
this compat code can be removed or moved to ikiwiki-transition later.
2009-10-03 15:31:51 -04:00
Joey Hess ffa73790b5 Fix a bug that could lead to duplicate links being recorded for tags.
Here I was bitten by perl's aliasing of foreach variables
to the loop array contents, and match_link accidentially changed
the contents of %links.

In Jon's testcase, a tag added an absolute link, which was
made relative by the above bug, and then the link was added
again in preprocess, and turned into a duplicate.
2009-10-03 14:16:28 -04:00