##// END OF EJS Templates
help: don't try to render a section on sub-topics...
Gregory Szorc -
r29747:aba2bb2a default
parent child Browse files
Show More
@@ -4593,12 +4593,15 b' def help_(ui, name=None, **opts):'
4593 section = None
4593 section = None
4594 subtopic = None
4594 subtopic = None
4595 if name and '.' in name:
4595 if name and '.' in name:
4596 name, section = name.split('.', 1)
4596 name, remaining = name.split('.', 1)
4597 section = encoding.lower(section)
4597 remaining = encoding.lower(remaining)
4598 if '.' in section:
4598 if '.' in remaining:
4599 subtopic, section = section.split('.', 1)
4599 subtopic, section = remaining.split('.', 1)
4600 else:
4600 else:
4601 subtopic = section
4601 if name in help.subtopics:
4602 subtopic = remaining
4603 else:
4604 section = remaining
4602
4605
4603 text = help.help_(ui, name, subtopic=subtopic, **opts)
4606 text = help.help_(ui, name, subtopic=subtopic, **opts)
4604
4607
@@ -184,13 +184,13 b' def loaddoc(topic, subdir=None):'
184 return loader
184 return loader
185
185
186 internalstable = sorted([
186 internalstable = sorted([
187 (['bundles'], _('container for exchange of repository data'),
187 (['bundles'], _('Bundles'),
188 loaddoc('bundles', subdir='internals')),
188 loaddoc('bundles', subdir='internals')),
189 (['changegroups'], _('representation of revlog data'),
189 (['changegroups'], _('Changegroups'),
190 loaddoc('changegroups', subdir='internals')),
190 loaddoc('changegroups', subdir='internals')),
191 (['requirements'], _('repository requirements'),
191 (['requirements'], _('Repository Requirements'),
192 loaddoc('requirements', subdir='internals')),
192 loaddoc('requirements', subdir='internals')),
193 (['revlogs'], _('revision storage mechanism'),
193 (['revlogs'], _('Revision Logs'),
194 loaddoc('revlogs', subdir='internals')),
194 loaddoc('revlogs', subdir='internals')),
195 ])
195 ])
196
196
@@ -1,6 +1,3 b''
1 Bundles
2 =======
3
4 A bundle is a container for repository data.
1 A bundle is a container for repository data.
5
2
6 Bundles are used as standalone files as well as the interchange format
3 Bundles are used as standalone files as well as the interchange format
@@ -8,7 +5,7 b' over the wire protocol used when two Mer'
8 each other.
5 each other.
9
6
10 Headers
7 Headers
11 -------
8 =======
12
9
13 Bundles produced since Mercurial 0.7 (September 2005) have a 4 byte
10 Bundles produced since Mercurial 0.7 (September 2005) have a 4 byte
14 header identifying the major bundle type. The header always begins with
11 header identifying the major bundle type. The header always begins with
@@ -1,6 +1,3 b''
1 Changegroups
2 ============
3
4 Changegroups are representations of repository revlog data, specifically
1 Changegroups are representations of repository revlog data, specifically
5 the changelog, manifest, and filelogs.
2 the changelog, manifest, and filelogs.
6
3
@@ -35,7 +32,7 b' There is a special case chunk that has 0'
35 call this an *empty chunk*.
32 call this an *empty chunk*.
36
33
37 Delta Groups
34 Delta Groups
38 ------------
35 ============
39
36
40 A *delta group* expresses the content of a revlog as a series of deltas,
37 A *delta group* expresses the content of a revlog as a series of deltas,
41 or patches against previous revisions.
38 or patches against previous revisions.
@@ -111,21 +108,21 b' changegroup. This allows the delta to be'
111 which can result in smaller deltas and more efficient encoding of data.
108 which can result in smaller deltas and more efficient encoding of data.
112
109
113 Changeset Segment
110 Changeset Segment
114 -----------------
111 =================
115
112
116 The *changeset segment* consists of a single *delta group* holding
113 The *changeset segment* consists of a single *delta group* holding
117 changelog data. It is followed by an *empty chunk* to denote the
114 changelog data. It is followed by an *empty chunk* to denote the
118 boundary to the *manifests segment*.
115 boundary to the *manifests segment*.
119
116
120 Manifest Segment
117 Manifest Segment
121 ----------------
118 ================
122
119
123 The *manifest segment* consists of a single *delta group* holding
120 The *manifest segment* consists of a single *delta group* holding
124 manifest data. It is followed by an *empty chunk* to denote the boundary
121 manifest data. It is followed by an *empty chunk* to denote the boundary
125 to the *filelogs segment*.
122 to the *filelogs segment*.
126
123
127 Filelogs Segment
124 Filelogs Segment
128 ----------------
125 ================
129
126
130 The *filelogs* segment consists of multiple sub-segments, each
127 The *filelogs* segment consists of multiple sub-segments, each
131 corresponding to an individual file whose data is being described::
128 corresponding to an individual file whose data is being described::
@@ -154,4 +151,3 b' Each filelog sub-segment consists of the'
154
151
155 That is, a *chunk* consisting of the filename (not terminated or padded)
152 That is, a *chunk* consisting of the filename (not terminated or padded)
156 followed by N chunks constituting the *delta group* for this file.
153 followed by N chunks constituting the *delta group* for this file.
157
@@ -1,5 +1,3 b''
1 Requirements
2 ============
3
1
4 Repositories contain a file (``.hg/requires``) containing a list of
2 Repositories contain a file (``.hg/requires``) containing a list of
5 features/capabilities that are *required* for clients to interface
3 features/capabilities that are *required* for clients to interface
@@ -19,7 +17,7 b' The following sections describe the requ'
19 Mercurial core distribution.
17 Mercurial core distribution.
20
18
21 revlogv1
19 revlogv1
22 --------
20 ========
23
21
24 When present, revlogs are version 1 (RevlogNG). RevlogNG was introduced
22 When present, revlogs are version 1 (RevlogNG). RevlogNG was introduced
25 in 2006. The ``revlogv1`` requirement has been enabled by default
23 in 2006. The ``revlogv1`` requirement has been enabled by default
@@ -28,7 +26,7 b' since the ``requires`` file was introduc'
28 If this requirement is not present, version 0 revlogs are assumed.
26 If this requirement is not present, version 0 revlogs are assumed.
29
27
30 store
28 store
31 -----
29 =====
32
30
33 The *store* repository layout should be used.
31 The *store* repository layout should be used.
34
32
@@ -36,7 +34,7 b' This requirement has been enabled by def'
36 was introduced in Mercurial 0.9.2.
34 was introduced in Mercurial 0.9.2.
37
35
38 fncache
36 fncache
39 -------
37 =======
40
38
41 The *fncache* repository layout should be used.
39 The *fncache* repository layout should be used.
42
40
@@ -48,7 +46,7 b' enabled (which is the default behavior).'
48 1.1 (released December 2008).
46 1.1 (released December 2008).
49
47
50 shared
48 shared
51 ------
49 ======
52
50
53 Denotes that the store for a repository is shared from another location
51 Denotes that the store for a repository is shared from another location
54 (defined by the ``.hg/sharedpath`` file).
52 (defined by the ``.hg/sharedpath`` file).
@@ -58,7 +56,7 b' This requirement is set when a repositor'
58 The requirement was added in Mercurial 1.3 (released July 2009).
56 The requirement was added in Mercurial 1.3 (released July 2009).
59
57
60 dotencode
58 dotencode
61 ---------
59 =========
62
60
63 The *dotencode* repository layout should be used.
61 The *dotencode* repository layout should be used.
64
62
@@ -70,7 +68,7 b' is enabled (which is the default behavio'
70 Mercurial 1.7 (released November 2010).
68 Mercurial 1.7 (released November 2010).
71
69
72 parentdelta
70 parentdelta
73 -----------
71 ===========
74
72
75 Denotes a revlog delta encoding format that was experimental and
73 Denotes a revlog delta encoding format that was experimental and
76 replaced by *generaldelta*. It should not be seen in the wild because
74 replaced by *generaldelta*. It should not be seen in the wild because
@@ -80,7 +78,7 b' This requirement was added in Mercurial '
80 1.9.
78 1.9.
81
79
82 generaldelta
80 generaldelta
83 ------------
81 ============
84
82
85 Revlogs should be created with the *generaldelta* flag enabled. The
83 Revlogs should be created with the *generaldelta* flag enabled. The
86 generaldelta flag will cause deltas to be encoded against a parent
84 generaldelta flag will cause deltas to be encoded against a parent
@@ -91,7 +89,7 b' July 2011). The requirement was disabled'
91 default until Mercurial 3.7 (released February 2016).
89 default until Mercurial 3.7 (released February 2016).
92
90
93 manifestv2
91 manifestv2
94 ----------
92 ==========
95
93
96 Denotes that version 2 of manifests are being used.
94 Denotes that version 2 of manifests are being used.
97
95
@@ -100,7 +98,7 b' May 2015). The requirement is currently '
100 by default.
98 by default.
101
99
102 treemanifest
100 treemanifest
103 ------------
101 ============
104
102
105 Denotes that tree manifests are being used. Tree manifests are
103 Denotes that tree manifests are being used. Tree manifests are
106 one manifest per directory (as opposed to a single flat manifest).
104 one manifest per directory (as opposed to a single flat manifest).
@@ -1,6 +1,3 b''
1 Revlogs
2 =======
3
4 Revision logs - or *revlogs* - are an append only data structure for
1 Revision logs - or *revlogs* - are an append only data structure for
5 storing discrete entries, or *revisions*. They are the primary storage
2 storing discrete entries, or *revisions*. They are the primary storage
6 mechanism of repository data.
3 mechanism of repository data.
@@ -28,7 +25,7 b' revision #0 and the second is revision #'
28 used to mean *does not exist* or *not defined*.
25 used to mean *does not exist* or *not defined*.
29
26
30 File Format
27 File Format
31 -----------
28 ===========
32
29
33 A revlog begins with a 32-bit big endian integer holding version info
30 A revlog begins with a 32-bit big endian integer holding version info
34 and feature flags. This integer is shared with the first revision
31 and feature flags. This integer is shared with the first revision
@@ -77,7 +74,7 b' possibly located between index entries. '
77 below.
74 below.
78
75
79 RevlogNG Format
76 RevlogNG Format
80 ---------------
77 ===============
81
78
82 RevlogNG (version 1) begins with an index describing the revisions in
79 RevlogNG (version 1) begins with an index describing the revisions in
83 the revlog. If the ``inline`` flag is set, revision data is stored inline,
80 the revlog. If the ``inline`` flag is set, revision data is stored inline,
@@ -129,7 +126,7 b' The first 4 bytes of the revlog are shar'
129 and the 6 byte absolute offset field from the first revlog entry.
126 and the 6 byte absolute offset field from the first revlog entry.
130
127
131 Delta Chains
128 Delta Chains
132 ------------
129 ============
133
130
134 Revision data is encoded as a chain of *chunks*. Each chain begins with
131 Revision data is encoded as a chain of *chunks*. Each chain begins with
135 the compressed original full text for that revision. Each subsequent
132 the compressed original full text for that revision. Each subsequent
@@ -153,7 +150,7 b' by default in Mercurial 3.7) activates t'
153 computed against an arbitrary revision (almost certainly a parent revision).
150 computed against an arbitrary revision (almost certainly a parent revision).
154
151
155 File Storage
152 File Storage
156 ------------
153 ============
157
154
158 Revlogs logically consist of an index (metadata of entries) and
155 Revlogs logically consist of an index (metadata of entries) and
159 revision data. This data may be stored together in a single file or in
156 revision data. This data may be stored together in a single file or in
@@ -172,7 +169,7 b' The actual layout of revlog files on dis'
172 (possibly containing inline data) and a ``.d`` file holds the revision data.
169 (possibly containing inline data) and a ``.d`` file holds the revision data.
173
170
174 Revision Entries
171 Revision Entries
175 ----------------
172 ================
176
173
177 Revision entries consist of an optional 1 byte header followed by an
174 Revision entries consist of an optional 1 byte header followed by an
178 encoding of the revision data. The headers are as follows:
175 encoding of the revision data. The headers are as follows:
@@ -187,7 +184,7 b' x (0x78)'
187 The 0x78 value is actually the first byte of the zlib header (CMF byte).
184 The 0x78 value is actually the first byte of the zlib header (CMF byte).
188
185
189 Hash Computation
186 Hash Computation
190 ----------------
187 ================
191
188
192 The hash of the revision is stored in the index and is used both as a primary
189 The hash of the revision is stored in the index and is used both as a primary
193 key and for data integrity verification.
190 key and for data integrity verification.
@@ -929,16 +929,16 b' internals topic renders index of availab'
929 Technical implementation topics
929 Technical implementation topics
930 """""""""""""""""""""""""""""""
930 """""""""""""""""""""""""""""""
931
931
932 bundles container for exchange of repository data
932 bundles Bundles
933 changegroups representation of revlog data
933 changegroups Changegroups
934 requirements repository requirements
934 requirements Repository Requirements
935 revlogs revision storage mechanism
935 revlogs Revision Logs
936
936
937 sub-topics can be accessed
937 sub-topics can be accessed
938
938
939 $ hg help internals.changegroups
939 $ hg help internals.changegroups
940 Changegroups
940 Changegroups
941 ============
941 """"""""""""
942
942
943 Changegroups are representations of repository revlog data, specifically
943 Changegroups are representations of repository revlog data, specifically
944 the changelog, manifest, and filelogs.
944 the changelog, manifest, and filelogs.
@@ -974,7 +974,7 b' sub-topics can be accessed'
974 this an *empty chunk*.
974 this an *empty chunk*.
975
975
976 Delta Groups
976 Delta Groups
977 ------------
977 ============
978
978
979 A *delta group* expresses the content of a revlog as a series of deltas,
979 A *delta group* expresses the content of a revlog as a series of deltas,
980 or patches against previous revisions.
980 or patches against previous revisions.
@@ -1050,21 +1050,21 b' sub-topics can be accessed'
1050 which can result in smaller deltas and more efficient encoding of data.
1050 which can result in smaller deltas and more efficient encoding of data.
1051
1051
1052 Changeset Segment
1052 Changeset Segment
1053 -----------------
1053 =================
1054
1054
1055 The *changeset segment* consists of a single *delta group* holding
1055 The *changeset segment* consists of a single *delta group* holding
1056 changelog data. It is followed by an *empty chunk* to denote the boundary
1056 changelog data. It is followed by an *empty chunk* to denote the boundary
1057 to the *manifests segment*.
1057 to the *manifests segment*.
1058
1058
1059 Manifest Segment
1059 Manifest Segment
1060 ----------------
1060 ================
1061
1061
1062 The *manifest segment* consists of a single *delta group* holding manifest
1062 The *manifest segment* consists of a single *delta group* holding manifest
1063 data. It is followed by an *empty chunk* to denote the boundary to the
1063 data. It is followed by an *empty chunk* to denote the boundary to the
1064 *filelogs segment*.
1064 *filelogs segment*.
1065
1065
1066 Filelogs Segment
1066 Filelogs Segment
1067 ----------------
1067 ================
1068
1068
1069 The *filelogs* segment consists of multiple sub-segments, each
1069 The *filelogs* segment consists of multiple sub-segments, each
1070 corresponding to an individual file whose data is being described:
1070 corresponding to an individual file whose data is being described:
@@ -2872,28 +2872,28 b' Sub-topic indexes rendered properly'
2872 bundles
2872 bundles
2873 </a>
2873 </a>
2874 </td><td>
2874 </td><td>
2875 container for exchange of repository data
2875 Bundles
2876 </td></tr>
2876 </td></tr>
2877 <tr><td>
2877 <tr><td>
2878 <a href="/help/internals.changegroups">
2878 <a href="/help/internals.changegroups">
2879 changegroups
2879 changegroups
2880 </a>
2880 </a>
2881 </td><td>
2881 </td><td>
2882 representation of revlog data
2882 Changegroups
2883 </td></tr>
2883 </td></tr>
2884 <tr><td>
2884 <tr><td>
2885 <a href="/help/internals.requirements">
2885 <a href="/help/internals.requirements">
2886 requirements
2886 requirements
2887 </a>
2887 </a>
2888 </td><td>
2888 </td><td>
2889 repository requirements
2889 Repository Requirements
2890 </td></tr>
2890 </td></tr>
2891 <tr><td>
2891 <tr><td>
2892 <a href="/help/internals.revlogs">
2892 <a href="/help/internals.revlogs">
2893 revlogs
2893 revlogs
2894 </a>
2894 </a>
2895 </td><td>
2895 </td><td>
2896 revision storage mechanism
2896 Revision Logs
2897 </td></tr>
2897 </td></tr>
2898
2898
2899
2899
@@ -2957,8 +2957,7 b' Sub-topic topics rendered properly'
2957 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2957 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2958 </form>
2958 </form>
2959 <div id="doc">
2959 <div id="doc">
2960 <h1>representation of revlog data</h1>
2960 <h1>Changegroups</h1>
2961 <h2>Changegroups</h2>
2962 <p>
2961 <p>
2963 Changegroups are representations of repository revlog data, specifically
2962 Changegroups are representations of repository revlog data, specifically
2964 the changelog, manifest, and filelogs.
2963 the changelog, manifest, and filelogs.
@@ -3000,7 +2999,7 b' Sub-topic topics rendered properly'
3000 There is a special case chunk that has 0 length (&quot;0x00000000&quot;). We
2999 There is a special case chunk that has 0 length (&quot;0x00000000&quot;). We
3001 call this an *empty chunk*.
3000 call this an *empty chunk*.
3002 </p>
3001 </p>
3003 <h3>Delta Groups</h3>
3002 <h2>Delta Groups</h2>
3004 <p>
3003 <p>
3005 A *delta group* expresses the content of a revlog as a series of deltas,
3004 A *delta group* expresses the content of a revlog as a series of deltas,
3006 or patches against previous revisions.
3005 or patches against previous revisions.
@@ -3091,19 +3090,19 b' Sub-topic topics rendered properly'
3091 changegroup. This allows the delta to be expressed against any parent,
3090 changegroup. This allows the delta to be expressed against any parent,
3092 which can result in smaller deltas and more efficient encoding of data.
3091 which can result in smaller deltas and more efficient encoding of data.
3093 </p>
3092 </p>
3094 <h3>Changeset Segment</h3>
3093 <h2>Changeset Segment</h2>
3095 <p>
3094 <p>
3096 The *changeset segment* consists of a single *delta group* holding
3095 The *changeset segment* consists of a single *delta group* holding
3097 changelog data. It is followed by an *empty chunk* to denote the
3096 changelog data. It is followed by an *empty chunk* to denote the
3098 boundary to the *manifests segment*.
3097 boundary to the *manifests segment*.
3099 </p>
3098 </p>
3100 <h3>Manifest Segment</h3>
3099 <h2>Manifest Segment</h2>
3101 <p>
3100 <p>
3102 The *manifest segment* consists of a single *delta group* holding
3101 The *manifest segment* consists of a single *delta group* holding
3103 manifest data. It is followed by an *empty chunk* to denote the boundary
3102 manifest data. It is followed by an *empty chunk* to denote the boundary
3104 to the *filelogs segment*.
3103 to the *filelogs segment*.
3105 </p>
3104 </p>
3106 <h3>Filelogs Segment</h3>
3105 <h2>Filelogs Segment</h2>
3107 <p>
3106 <p>
3108 The *filelogs* segment consists of multiple sub-segments, each
3107 The *filelogs* segment consists of multiple sub-segments, each
3109 corresponding to an individual file whose data is being described:
3108 corresponding to an individual file whose data is being described:
General Comments 0
You need to be logged in to leave comments. Login now