On Sun, 2005-05-15 at 17:53 -0700, Brian Ingerson wrote: > There is something about this patch that doesn't sit right with me... > > Why can't you just do a pre/page:store hook to grab the old content, > save it in memory, and then diff it with current content in a > post/page:store hook?
Sure, but we'd have to use Text::Diff or Algorithm::Diff to run the diff in-memory. Or create temporary files to pass to regular diff. But creating temporary files is better avoided because it's extra work and ... > What am I missing? Some race condition? My patch puts both the original and new version on disk so that no additional work is needed to run regular diff. An additional benefit is that replacing the original version using rename is atomic so there is no longer any risk of reading a partially new partially old page. -- If you are an American then support http://fairtax.org (Permanently replace 50,000+ pages of tax law with about 200 pages.)
signature.asc
Description: This is a digitally signed message part
