-----BEGIN PGP SIGNED MESSAGE-----
Martin Pool wrote:
> I'm still wondering whether this is meant to return the sha1 of the
> canonical or convenient content.
We only deal in canonical sha1s.
The sha1 we store in the dirstate is the canonical form.
> The steps seem to be:
> The code that does filtering, eg internal_size_sha_file_byname seems to
> return both the size and the hash so it seems like any problem that
> affects one should affect the other.
> I think before changing get_path_content_summary we need to be clear
> about what the code that's currently using it expects the behaviour to
> be, whether that's to return the filtered or unfiltered content.
So path_content_summary is doing:
st = os.lstat(path)
size = st.st_size
sha1_and_other_info = self._check_the_hashcache(path, st)
In other words, it is ignoring the data stored in the dirstate when
returning the size of the file. I believe we store the size into the
dirstate in such a way that we could return it, rather than looking at
st.st_size. Though I'm not positive. (We do for old revisions, but I
would have thought we wouldn't for the *current* column.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----