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