Show More
@@ -12,7 +12,7 b' It is made of a flat sequence of unorder' | |||
|
12 | 12 | so accessing any information in it requires parsing all of it. |
|
13 | 13 | Similarly, saving changes requires rewriting the entire file. |
|
14 | 14 | |
|
15 | The newer `dirsate-v2` file format is designed to fix these limitations | |
|
15 | The newer `dirstate-v2` file format is designed to fix these limitations | |
|
16 | 16 | and make `hg status` faster. |
|
17 | 17 | |
|
18 | 18 | User guide |
@@ -33,7 +33,7 b' Since the dirstate is entirely local and' | |||
|
33 | 33 | When `share-safe` is enabled, different repositories sharing the same store |
|
34 | 34 | can use different dirstate formats. |
|
35 | 35 | |
|
36 | Enabling `dirsate-v2` for new local repositories | |
|
36 | Enabling `dirstate-v2` for new local repositories | |
|
37 | 37 | ------------------------------------------------ |
|
38 | 38 | |
|
39 | 39 | When creating a new local repository such as with `hg init` or `hg clone`, |
@@ -44,7 +44,7 b' To enable it for a single repository, ru' | |||
|
44 | 44 | |
|
45 | 45 | $ hg init my-project --config format.exp-rc-dirstate-v2=1 |
|
46 | 46 | |
|
47 | Checking the format of an existing local repsitory | |
|
47 | Checking the format of an existing local repository | |
|
48 | 48 | -------------------------------------------------- |
|
49 | 49 | |
|
50 | 50 | The `debugformat` commands prints information about |
@@ -96,7 +96,7 b' Requirements file' | |||
|
96 | 96 | The `.hg/requires` file indicates which of various optional file formats |
|
97 | 97 | are used by a given repository. |
|
98 | 98 | Mercurial aborts when seeing a requirement it does not know about, |
|
99 |
which avoids older version accidentally messing up a re |
|
|
99 | which avoids older version accidentally messing up a repository | |
|
100 | 100 | that uses a format that was introduced later. |
|
101 | 101 | For versions that do support a format, the presence or absence of |
|
102 | 102 | the corresponding requirement indicates whether to use that format. |
@@ -108,7 +108,7 b' With no such line `dirstate-v1` is used.' | |||
|
108 | 108 | High level description |
|
109 | 109 | ---------------------- |
|
110 | 110 | |
|
111 |
Whereas `dirstate-v1` uses a single `.hg/di |
|
|
111 | Whereas `dirstate-v1` uses a single `.hg/dirstate` file, | |
|
112 | 112 | in `dirstate-v2` that file is a "docket" file |
|
113 | 113 | that only contains some metadata |
|
114 | 114 | and points to separate data file named `.hg/dirstate.{ID}`, |
@@ -173,7 +173,7 b' counted in bytes from the start of the f' | |||
|
173 | 173 | * Offset 120: |
|
174 | 174 | The used size of the data file, as a 32-bit big-endian integer. |
|
175 | 175 | The actual size of the data file may be larger |
|
176 |
(if another Mercurial process |
|
|
176 | (if another Mercurial process is appending to it | |
|
177 | 177 | but has not updated the docket yet). |
|
178 | 178 | That extra data must be ignored. |
|
179 | 179 | |
@@ -303,15 +303,15 b' nodes must be next to each other and sor' | |||
|
303 | 303 | Contiguity lets the parent refer to them all |
|
304 | 304 | by their count and a single pseudo-pointer, |
|
305 | 305 | instead of storing one pseudo-pointer per child node. |
|
306 | Sorting allows using binary seach to find a child node with a given name | |
|
306 | Sorting allows using binary search to find a child node with a given name | |
|
307 | 307 | in `O(log(n))` byte sequence comparisons. |
|
308 | 308 | |
|
309 | The current implemention writes paths and child node before a given node | |
|
309 | The current implementation writes paths and child node before a given node | |
|
310 | 310 | for ease of figuring out the value of pseudo-pointers by the time the are to be |
|
311 | 311 | written, but this is not an obligation and readers must not rely on it. |
|
312 | 312 | |
|
313 | 313 | A path is stored as a byte string anywhere in the file, without delimiter. |
|
314 | It is refered to by one or more node by a pseudo-pointer to its start, and its | |
|
314 | It is referred to by one or more node by a pseudo-pointer to its start, and its | |
|
315 | 315 | length in bytes. Since there is no delimiter, |
|
316 | 316 | when a path is a substring of another the same bytes could be reused, |
|
317 | 317 | although the implementation does not exploit this as of this writing. |
@@ -418,7 +418,7 b' Node components are:' | |||
|
418 | 418 | as a 32-bit integer. |
|
419 | 419 | When `mtime` is used, |
|
420 | 420 | this is the number of nanoseconds since `mtime.seconds`, |
|
421 |
always stri |
|
|
421 | always strictly less than one billion. | |
|
422 | 422 | |
|
423 | 423 | This may be zero if more precision is not available. |
|
424 | 424 | (This can happen because of limitations in any of Mercurial, Python, |
@@ -503,8 +503,8 b' by enabling it to skip `readdir` in more' | |||
|
503 | 503 | file system. |
|
504 | 504 | |
|
505 | 505 | * When `HAS_MTIME` is set a directory has been seen on the file system and |
|
506 |
`mtime` matches its last modific |
|
|
507 | does not indicate the lack of directory on the file system. | |
|
506 | `mtime` matches its last modification time. However, `HAS_MTIME` not | |
|
507 | being set does not indicate the lack of directory on the file system. | |
|
508 | 508 | |
|
509 | 509 | * When not tracked anywhere, this node does not represent an ignored or |
|
510 | 510 | unknown file on disk. |
@@ -562,8 +562,8 b' by enabling it to skip `readdir` in more' | |||
|
562 | 562 | where present. |
|
563 | 563 | |
|
564 | 564 | Also note that having this flag unset does not imply that no "unknown" |
|
565 |
children have been recorded. Some might be present, but there is |
|
|
566 | that is will be all of them. | |
|
565 | children have been recorded. Some might be present, but there is | |
|
566 | no guarantee that is will be all of them. | |
|
567 | 567 | |
|
568 | 568 | `ALL_IGNORED_RECORDED` |
|
569 | 569 | If set, all "ignored" children existing on disk (at the time of the last |
@@ -575,8 +575,8 b' by enabling it to skip `readdir` in more' | |||
|
575 | 575 | where present. |
|
576 | 576 | |
|
577 | 577 | Also note that having this flag unset does not imply that no "ignored" |
|
578 |
children have been recorded. Some might be present, but there is |
|
|
579 | that is will be all of them. | |
|
578 | children have been recorded. Some might be present, but there is | |
|
579 | no guarantee that is will be all of them. | |
|
580 | 580 | |
|
581 | 581 | `HAS_FALLBACK_EXEC` |
|
582 | 582 | If this flag is set, the entry carries "fallback" information for the |
@@ -612,5 +612,5 b' by enabling it to skip `readdir` in more' | |||
|
612 | 612 | This flag is relevant only when `HAS_FILE_MTIME` is set. When set, the |
|
613 | 613 | `mtime` stored in the entry is only valid for comparison with timestamps |
|
614 | 614 | that have nanosecond information. If available timestamp does not carries |
|
615 |
nanosecond information, the `mtime` should be ignored and no optimi |
|
|
615 | nanosecond information, the `mtime` should be ignored and no optimization | |
|
616 | 616 | can be applied. |
General Comments 0
You need to be logged in to leave comments.
Login now