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 | ||
---|---|---|
144 | missing "in" | |
193 | s/madata/metadata/ | |
246 | 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. | |
296 | missing "in" | |
305 | 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 | ||
---|---|---|
246 | 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. | |
305 | 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) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
fa6074b9f750 | 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; |
missing "in"