"Nick Tonkin" <[EMAIL PROTECTED]> wrote:

> I'm working on a tool that should compare two versions of a file (usually,
> a web page) and report the _number_ of changes from one to the other...

well, the "number of changes" is a human concept; the "number of
differences" is only thing a program can calculate, and may or may not be
the same thing in a given circumstance.

cvs addresses this elegantly.  when your change the file in the human sense,
(or a set of differences with a single logical purpose) your "number of
differences" are committed as a single revision, with an attached log
message which you must supply, i.e. "changed the <title>, heading <h1> and
copyright notice at the bottom to reflect new site name" -- several
"differences" bound together by the single purpose for the change.

> With Algorithm::Diff the output appears to be too granular: if I add five
> words onto a sentence it counts five changes, when it surely "is" only one
> ...
> And diff combines all changes on one line into "one," afaics ...

Araxis Merge is like that - unlike cvs/rcs it highlights differences at the
character level, not the line level.  sometimes it's hand but also often
anooying...

it also has a great interface that clearly reports the number of
"differences" and lets you navigate to the first, previous, next and last
difference easily.

> Has anyone tackled this issue before?

i'll second the recommendation that you get more familiar with cvs.  used
properly, it will help you keep on top of what was changed, as well as when
and why :-)

-dave

Reply via email to