It can be viewed by running hg help internals.dirstate-v2
Since that command rewraps paragraphs, the source text is written with
semantic line breaks: https://sembr.org/
( )
hg-reviewers |
It can be viewed by running hg help internals.dirstate-v2
Since that command rewraps paragraphs, the source text is written with
semantic line breaks: https://sembr.org/
No Linters Available |
No Unit Test Coverage |
mercurial/helptext/internals/dirstate-v2.txt | ||
---|---|---|
143 | missing "in" | |
192 | s/madata/metadata/ | |
245 | Should we just have 32 bytes because why not? I get that the cryptographic aspect of it is not important for that particular case, but we may want to use another hash function that is a bit longer and truncating would not be ideal. | |
295 | missing "in" | |
304 | nit: I'd maybe avoid using "string" since it's really bytes and not a more abstract construct with encoding and such in mind |
mercurial/helptext/internals/dirstate-v2.txt | ||
---|---|---|
245 | Since this changesets only document the existing format, I don't feel like it is the right location to discuss the actual format. Not sure where that would be through. On the actual topic, I feel like that if we decide for a wider format, we should probably pick 40 bytes to have all the rooms we might need. | |
304 | I replaced "byte strings" with "byte ranges" does it works for you ? |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/help.py (5 lines) | |||
A | M | mercurial/helptext/internals/dirstate-v2.txt (374 lines) | ||
M | rust/hg-core/src/dirstate_tree/on_disk.rs (18 lines) | |||
M | tests/test-help.t (8 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
3a8e11950519 | 7c7dab1bf1f4 | Simon Sapin | Oct 1 2021, 6:17 AM |
Status | Author | Revision | |
---|---|---|---|
Abandoned | pulkit | ||
Closed | SimonSapin | ||
Closed | SimonSapin | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute | ||
Closed | marmoute |
loaddoc(b'changegroups', subdir=b'internals'), | loaddoc(b'changegroups', subdir=b'internals'), | ||||
), | ), | ||||
( | ( | ||||
[b'config'], | [b'config'], | ||||
_(b'Config Registrar'), | _(b'Config Registrar'), | ||||
loaddoc(b'config', subdir=b'internals'), | loaddoc(b'config', subdir=b'internals'), | ||||
), | ), | ||||
( | ( | ||||
[b'dirstate-v2'], | |||||
_(b'dirstate-v2 file format'), | |||||
loaddoc(b'dirstate-v2', subdir=b'internals'), | |||||
), | |||||
( | |||||
[b'extensions', b'extension'], | [b'extensions', b'extension'], | ||||
_(b'Extension API'), | _(b'Extension API'), | ||||
loaddoc(b'extensions', subdir=b'internals'), | loaddoc(b'extensions', subdir=b'internals'), | ||||
), | ), | ||||
( | ( | ||||
[b'mergestate'], | [b'mergestate'], | ||||
_(b'Mergestate'), | _(b'Mergestate'), | ||||
loaddoc(b'mergestate', subdir=b'internals'), | loaddoc(b'mergestate', subdir=b'internals'), |
//! The "version 2" disk representation of the dirstate | //! The "version 2" disk representation of the dirstate | ||||
//! | //! | ||||
//! # File format | //! See `mercurial/helptext/internals/dirstate-v2.txt` | ||||
//! | |||||
//! In dirstate-v2 format, the `.hg/dirstate` file is a "docket that starts | |||||
//! with a fixed-sized header whose layout is defined by the `DocketHeader` | |||||
//! struct, followed by the data file identifier. | |||||
//! | |||||
//! A separate `.hg/dirstate.{uuid}.d` file contains most of the data. That | |||||
//! file may be longer than the size given in the docket, but not shorter. Only | |||||
//! the start of the data file up to the given size is considered. The | |||||
//! fixed-size "root" of the dirstate tree whose layout is defined by the | |||||
//! `Root` struct is found at the end of that slice of data. | |||||
//! | |||||
//! Its `root_nodes` field contains the slice (offset and length) to | |||||
//! the nodes representing the files and directories at the root of the | |||||
//! repository. Each node is also fixed-size, defined by the `Node` struct. | |||||
//! Nodes in turn contain slices to variable-size paths, and to their own child | |||||
//! nodes (if any) for nested files and directories. | |||||
use crate::dirstate_tree::dirstate_map::{self, DirstateMap, NodeRef}; | use crate::dirstate_tree::dirstate_map::{self, DirstateMap, NodeRef}; | ||||
use crate::dirstate_tree::path_with_basename::WithBasename; | use crate::dirstate_tree::path_with_basename::WithBasename; | ||||
use crate::errors::HgError; | use crate::errors::HgError; | ||||
use crate::utils::hg_path::HgPath; | use crate::utils::hg_path::HgPath; | ||||
use crate::DirstateEntry; | use crate::DirstateEntry; | ||||
use crate::DirstateError; | use crate::DirstateError; | ||||
use crate::DirstateParents; | use crate::DirstateParents; |
bid-merge Bid Merge Algorithm | bid-merge Bid Merge Algorithm | ||||
bundle2 Bundle2 | bundle2 Bundle2 | ||||
bundles Bundles | bundles Bundles | ||||
cbor CBOR | cbor CBOR | ||||
censor Censor | censor Censor | ||||
changegroups Changegroups | changegroups Changegroups | ||||
config Config Registrar | config Config Registrar | ||||
dirstate-v2 dirstate-v2 file format | |||||
extensions Extension API | extensions Extension API | ||||
mergestate Mergestate | mergestate Mergestate | ||||
requirements Repository Requirements | requirements Repository Requirements | ||||
revlogs Revision Logs | revlogs Revision Logs | ||||
wireprotocol Wire Protocol | wireprotocol Wire Protocol | ||||
wireprotocolrpc | wireprotocolrpc | ||||
Wire Protocol RPC | Wire Protocol RPC | ||||
wireprotocolv2 | wireprotocolv2 | ||||
<tr><td> | <tr><td> | ||||
<a href="/help/internals.config"> | <a href="/help/internals.config"> | ||||
config | config | ||||
</a> | </a> | ||||
</td><td> | </td><td> | ||||
Config Registrar | Config Registrar | ||||
</td></tr> | </td></tr> | ||||
<tr><td> | <tr><td> | ||||
<a href="/help/internals.dirstate-v2"> | |||||
dirstate-v2 | |||||
</a> | |||||
</td><td> | |||||
dirstate-v2 file format | |||||
</td></tr> | |||||
<tr><td> | |||||
<a href="/help/internals.extensions"> | <a href="/help/internals.extensions"> | ||||
extensions | extensions | ||||
</a> | </a> | ||||
</td><td> | </td><td> | ||||
Extension API | Extension API | ||||
</td></tr> | </td></tr> | ||||
<tr><td> | <tr><td> | ||||
<a href="/help/internals.mergestate"> | <a href="/help/internals.mergestate"> |
missing "in"