[Updated] D11620: dirstate-v2: Swap the order of size and mtime on disk
SimonSapin
phabricator at mercurial-scm.org
Tue Oct 12 17:00:39 UTC 2021
SimonSapin updated this revision to Diff 30717.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11620?vs=30683&id=30717
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11620/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11620
AFFECTED FILES
mercurial/helptext/internals/dirstate-v2.txt
rust/hg-core/src/dirstate_tree/on_disk.rs
CHANGE DETAILS
diff --git a/rust/hg-core/src/dirstate_tree/on_disk.rs b/rust/hg-core/src/dirstate_tree/on_disk.rs
--- a/rust/hg-core/src/dirstate_tree/on_disk.rs
+++ b/rust/hg-core/src/dirstate_tree/on_disk.rs
@@ -114,8 +114,8 @@
#[repr(C)]
struct Entry {
mode: I32Be,
+ size: I32Be,
mtime: I32Be,
- size: I32Be,
}
/// Duration since the Unix epoch
diff --git a/mercurial/helptext/internals/dirstate-v2.txt b/mercurial/helptext/internals/dirstate-v2.txt
--- a/mercurial/helptext/internals/dirstate-v2.txt
+++ b/mercurial/helptext/internals/dirstate-v2.txt
@@ -424,15 +424,15 @@
Only the `S_IXUSR` bit (owner has execute permission) is considered.
* Offset 35:
- If `HAS_MTIME` is unset, four zero bytes.
- Otherwise, a 32-bit integer for expected modified time of the file
- (as in `stat_result.st_mtime`),
+ If `HAS_MODE_AND_SIZE` is unset, four zero bytes.
+ Otherwise, a 32-bit integer for expected size of the file
truncated to its 31 least-significant bits.
Unlike in dirstate-v1, negative values are not used.
* Offset 39:
- If `HAS_MODE_AND_SIZE` is unset, four zero bytes.
- Otherwise, a 32-bit integer for expected size of the file
+ If `HAS_MTIME` is unset, four zero bytes.
+ Otherwise, a 32-bit integer for expected modified time of the file
+ (as in `stat_result.st_mtime`),
truncated to its 31 least-significant bits.
Unlike in dirstate-v1, negative values are not used.
To: SimonSapin, #hg-reviewers
Cc: martinvonz, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211012/cf82f104/attachment-0002.html>
More information about the Mercurial-patches
mailing list