Skip to content

Fix numerous dirstate problems on Windows with a util.cachstat implementation

Matt Harbison requested to merge topic/stable/windows-cachestat-impl into branch/stable

@marmoute - I'm not sure what you meant yesterday on IRC with the following, so I didn't look any deeper than to run the full test suite on Windows:

[10/16 16:28] (mharbison) Nice, it even "fixes" the dirstate wrap issue with largefiles. (Fix in quotes because I have no idea if the problem was the complete lack of cacheability, or if any cache miss would trigger it. It would be worth understanding better, but at least there's now a known way to trigger it on any platform)

[10/16 16:29] (RelayBot) (marmoute:matrix.org) You can check what the status logic does on windows, it should be fairly similar to what cache checking does.

[10/16 16:29] (RelayBot) (marmoute:matrix.org) I am totally unsurprised this fix the largefile on windows, as this was clearly as "too agressive cache reload" issue.

So I'll leave it to you to poke at on linux when you get a chance, but now windows is no worse off than the other platforms. (On top of not seeing the big picture of how this is used, some of my confusion is the cachestat.cacheable() definition- it hinges on st_ino being non-zero, but that's basically true for any os.stat that succeeds, since we aren't stat-ing non files, right? So should the os.stat in the constructor been wrapped in try/catch, to include the obvious non-cacheable case where the call fails?)

Merge request reports

Loading