Page MenuHomePhabricator

dirstate-v2: Swap the order of size and mtime on disk
ClosedPublic

Authored by SimonSapin on Fri, Oct 8, 8:06 AM.

Details

Summary

This makes the dirstate-v2 file format match dirstate-v1 for the order of
mode, size, and mtime. This order does not matter as long as these
components are handled through named fields/attributes in code, but in a few
places we still have tuples so having the same order everywhere might help
avoid a bug that might not be obvious since those components have the same type.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

SimonSapin created this revision.Fri, Oct 8, 8:06 AM

I’ve split this from D11547.

Because of how BytesCast is used, the struct definition defines the file format.

This makes the dirstate-v2 file format match dirstate-v2 for the order of

Should the second "v2" be "v1?

(And I assume "Change swap" can be just "Swap".)

SimonSapin retitled this revision from dirstate-v2: Change swap the order of size and mtime on disk to dirstate-v2: Swap the order of size and mtime on disk.Tue, Oct 12, 7:04 AM
SimonSapin edited the summary of this revision. (Show Details)

Ah yes. Thanks!

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.