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.
>
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.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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 content_ summary we need to be clear
> 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_
> 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.)
John enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq Sr1sACgkQJdeBCY SNAANdnwCgzsRbu ponDlkb3J5LCMn5 qrsl dsbhkfS4FmL43nP sz
n7sAn18N3wcaZYV
=HCRK
-----END PGP SIGNATURE-----