Comment 9 for bug 488724

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 488724] Re: commands updating working tree should provide the same modification time for all modified files

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Arbash Meinel wrote:
> Aaron Bentley wrote:
>> You're calling self._set_mtime from DiskTreeTransform methods, but it's
>> only defined in TreeTransform. That will be bad with PreviewTree. I
>> think it makes sense to move it into DiskTreeTransform (and move the
>> ctypes code into osutils). It might be useful to allow specifying a
>> specific mtime in create_file et al, but I can't think of a good use
>> case at the moment.
>
>
> People wanting the working tree files to be at the 'commit' timestamp
> would be one possibility.
>
> I certainly still have *lots* of room for improvement, this was just a
> quick stab to see if I could get the Windows side of it working.
>
> However, the code in question is calling the builtin open(), I don't see
> why it would be bad with PreviewTree. Unless you are doing something
> terribly like monkey-patching open() to do something other than
> returning a real disk file.
>
> John
> =:->
>

NM this last bit. I didn't realize you define DiskTreeTransform *before*
you defined the base TreeTransform. I'll move the function. The layering
here certainly seems a bit unexpected.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktDoC8ACgkQJdeBCYSNAAO4KgCdFSF1bSvZ7+/7RHTnjePN/Uh0
XeQAmQF6ChvQfsktuWIIekEW2iKxok3j
=4L8a
-----END PGP SIGNATURE-----