Re: [OT] ideas on design of a diff monitor
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
[OT] ideas on design of a diff monitor
Hi all, 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. I've played with Algorithm::Diff as well as standard diff and haven't found a really sane way to count changes. 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 ... Has anyone tackled this issue before? Thanks, ~~~ Nick Tonkin
Re: [OT] ideas on design of a diff monitor
Nick Tonkin [EMAIL PROTECTED] writes: Hi all, 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. I've played with Algorithm::Diff as well as standard diff and haven't found a really sane way to count changes. 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 ... Wow, this really is OT, but what the hey, it's Friday. There is no way that what you've described is going to work. If I add a word to a sentence on Monday and a second word on Tuesday, there have been two changes. From your description, your ultimate solution would report one change when there have been two. The only way to get what you want is with version control software. You can write your own, but I'd recommend CVS (www.cvshome.org). And diff combines all changes on one line into one, afaics ... Has anyone tackled this issue before? Thanks, ~~~ Nick Tonkin