Opened 15 years ago

Closed 12 years ago

Last modified 12 years ago

#289 closed task (fixed)

reading old cache files

Reported by: Peter Johansson Owned by: Jari Häkkinen
Priority: major Milestone: svndigest 0.8
Component: core Version: trunk
Keywords: Cc:

Description (last modified by Peter Johansson)

related to ticket:291

Digested stats are cached for each file. If the file has been modified since last run, the cache is out of date and the file is re-analyzed on next run. For BlameStats it is slightly different as the history is nailed for this stats, i.e., future contributions cannot change the curve for today and earlier. Therefore the cache can be used and one only needs to analyze the new revisions.

Anyway, the question here is how we should deal with the case that cache created with an old svndigest is not valid. It could be because we have changed the format of the cache file; it could be because we have re-defined how we calculate statistics (e.g. how to deal with stop-on-copy #204); it could because we have redefined differentiation of code, comments, and other (ticket:270).

Currently, there is possibility to invalidate old cache files by changing the version number. This should of course be avoided as far as it it is possible because losing the cache make no user happy.

Change History (6)

comment:1 Changed 15 years ago by Peter Johansson

Description: modified (diff)

marked ticket:291 as related

comment:2 Changed 14 years ago by Peter Johansson

If we have to change the format I think we should still be able to read the old format, i.e., first try to read new format - if that fails, try to read old format, and so on...

comment:3 Changed 13 years ago by Peter Johansson

Milestone: svndigest 0.8svndigest 0.9

comment:4 Changed 12 years ago by Peter Johansson

(In [1122]) added line in config file describing config used to create cache (refs #433). If config is different from the current one, the cache is ignored and stats are retrieved from repo. Restructured code a bit to allow loading old cache files; the first line (in cache) is used to decide which function to use for the loading. Cache files VERSION 7 and newer are supported and older are ignored (refs #289).

comment:5 Changed 12 years ago by Peter Johansson

Resolution: fixed
Status: newclosed

(In [1124]) detecting old cache files and re-writing them in new format (version 8). closes #443 and #289

comment:6 Changed 12 years ago by Peter Johansson

Milestone: svndigest 0.9svndigest 0.8
Note: See TracTickets for help on using tickets.