From 2513f0ea6b65e1b866c01647454062ceb6bbfb7d Mon Sep 17 00:00:00 2001 From: tschwinge Date: Tue, 8 Jun 2010 09:23:05 +0000 Subject: File issue. --- doc/bugs/pagemtime_in_refresh_mode.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/bugs/pagemtime_in_refresh_mode.mdwn (limited to 'doc/bugs/pagemtime_in_refresh_mode.mdwn') diff --git a/doc/bugs/pagemtime_in_refresh_mode.mdwn b/doc/bugs/pagemtime_in_refresh_mode.mdwn new file mode 100644 index 000000000..97146f805 --- /dev/null +++ b/doc/bugs/pagemtime_in_refresh_mode.mdwn @@ -0,0 +1,14 @@ +I'd like a way to always ask the RCS (Git) to update a file's mtime in +refresh mode. This is currently only done on the first build, and later +for `--gettime --rebuild`. But always rebuilding is too heavy-weight for +this use-case. My options are to either manually set the mtime before +refreshing, or to have ikiwiki do it at command. I used to do the +former, but would now like the latter, as ikiwiki now generally does this +timestamp handling. + +From a quick look, the code in `IkiWiki/Render.pm:find_new_files` is +relevant: `if (! $pagemtime{$page}) { [...]`. + +How would you like to tackle this? + +--[[tschwinge]] -- cgit v1.2.3 From 2be6660a8f3f523905e7c0ba4c36f579ed0d2493 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Jun 2010 14:43:21 -0400 Subject: response --- doc/bugs/pagemtime_in_refresh_mode.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc/bugs/pagemtime_in_refresh_mode.mdwn') diff --git a/doc/bugs/pagemtime_in_refresh_mode.mdwn b/doc/bugs/pagemtime_in_refresh_mode.mdwn index 97146f805..f926ec86c 100644 --- a/doc/bugs/pagemtime_in_refresh_mode.mdwn +++ b/doc/bugs/pagemtime_in_refresh_mode.mdwn @@ -12,3 +12,17 @@ relevant: `if (! $pagemtime{$page}) { [...]`. How would you like to tackle this? --[[tschwinge]] + +> This could be done via a `needsbuild` hook. The hook is passed +> the list of changed files, and it should be safe to call `rcs_getmtime` +> and update the `pagemtime` for each. +> +> That lets the feature be done by a plugin, which seems good, since +> `rcs_getmtime` varies between very slow and not very fast, depending on +> VCS. +> +> AFAICS, the only use case for doing this is if you commit changes and +> then delay pushing them to a DVCS repo. Since then the file mtime will +> be when the change was pushed, not when it was committed. But I've +> generally felt that recording when a change was published to the repo +> of a wiki as its mtime is good enough. --[[Joey]] -- cgit v1.2.3