Sean Cavanaugh wrote:
>
> I'd like to see both here, if the timestamps are exactly
> the same assume its the same, otherwise take the time to open the
> local file and run it through MD5 and compare it to the checksum
> in the local CVS/Entries to make sure. We might need an option to
> force one of three possible modes (timestamp only, MD5 only, and
> hybrid)
The condensed impression I'm getting from people is that it's not
a bad idea, so I think I will go ahead and do it. I think having
the timestamp is still necessary so that tools like make don't get
confused.
Jonathan M. Gilligan wrote:
> Is a one-way hash such as MD5 really superior to a CRC here? I
> believe that CRC's are substantially cheaper to compute, which
> could be relevant in the case of large projects.
Yes, calculating MD5s is strictly more expensive than CRCs, but is
not prohibitively expensive in the practical sense. md5sum
on a 25 meg file is about 1 second here on an HP-UX box and a low-end
PC. On a 40kb file it would be negligible, and certainly
cumulatively far less than the cost of unnecessarily fetching
a file.
So I think I will still use the MD5 algorithm built into CVS.
I think the behaviour of CVS should be that it sets the
timestamp of a file whenever CVS updates it (either from
scratch or through a "P"- or "C"-type update), but otherwise
doesn't care what happens to the timestamp after that. So it
initially sets it, but then uses MD5 to see if it's changed.
If this approach is taken, the timestamp doesn't need to be
stored in the Entries file.
CVS source, here I come!
Regards,
Mitch.
--
| mailto:[EMAIL PROTECTED] | Not the official view of: |
| mailto:[EMAIL PROTECTED] | Australian Calculator Opn |
| Certified Linux Evangelist! | Hewlett Packard Australia |