Show More
@@ -162,28 +162,24 def splitparagraphs(blocks): | |||
|
162 | 162 | i += 1 |
|
163 | 163 | return blocks |
|
164 | 164 | |
|
165 |
_fieldwidth = 1 |
|
|
165 | _fieldwidth = 14 | |
|
166 | 166 | |
|
167 | 167 | def updatefieldlists(blocks): |
|
168 |
"""Find key |
|
|
168 | """Find key for field lists.""" | |
|
169 | 169 | i = 0 |
|
170 | 170 | while i < len(blocks): |
|
171 | 171 | if blocks[i]['type'] != 'field': |
|
172 | 172 | i += 1 |
|
173 | 173 | continue |
|
174 | 174 | |
|
175 | keywidth = 0 | |
|
176 | 175 | j = i |
|
177 | 176 | while j < len(blocks) and blocks[j]['type'] == 'field': |
|
178 | 177 | m = _fieldre.match(blocks[j]['lines'][0]) |
|
179 | 178 | key, rest = m.groups() |
|
180 | 179 | blocks[j]['lines'][0] = rest |
|
181 | 180 | blocks[j]['key'] = key |
|
182 | keywidth = max(keywidth, len(key)) | |
|
183 | 181 | j += 1 |
|
184 | 182 | |
|
185 | for block in blocks[i:j]: | |
|
186 | block['keywidth'] = keywidth | |
|
187 | 183 | i = j + 1 |
|
188 | 184 | |
|
189 | 185 | return blocks |
@@ -492,19 +488,13 def formatblock(block, width): | |||
|
492 | 488 | m = _bulletre.match(block['lines'][0]) |
|
493 | 489 | subindent = indent + m.end() * ' ' |
|
494 | 490 | elif block['type'] == 'field': |
|
495 | keywidth = block['keywidth'] | |
|
496 | 491 | key = block['key'] |
|
497 | ||
|
498 | 492 | subindent = indent + _fieldwidth * ' ' |
|
499 | 493 | if len(key) + 2 > _fieldwidth: |
|
500 | 494 | # key too large, use full line width |
|
501 | 495 | key = key.ljust(width) |
|
502 | elif keywidth + 2 < _fieldwidth: | |
|
503 | # all keys are small, add only two spaces | |
|
504 | key = key.ljust(keywidth + 2) | |
|
505 | subindent = indent + (keywidth + 2) * ' ' | |
|
506 | 496 | else: |
|
507 | # mixed sizes, use fieldwidth for this one | |
|
497 | # key fits within field width | |
|
508 | 498 | key = key.ljust(_fieldwidth) |
|
509 | 499 | block['lines'][0] = key + block['lines'][0] |
|
510 | 500 | elif block['type'] == 'option': |
@@ -128,15 +128,16 | |||
|
128 | 128 | you can set on the command line with "--config": |
|
129 | 129 | |
|
130 | 130 | convert.hg.ignoreerrors |
|
131 |
ignore integrity errors when reading. Use it to fix |
|
|
132 |
repositories with missing revlogs, by converting |
|
|
133 | Mercurial. Default is False. | |
|
131 | ignore integrity errors when reading. Use it to fix | |
|
132 | Mercurial repositories with missing revlogs, by converting | |
|
133 | from and to Mercurial. Default is False. | |
|
134 | 134 | convert.hg.saverev |
|
135 |
store original revision ID in changeset (forces target IDs |
|
|
136 |
change). It takes a boolean argument and defaults to |
|
|
135 | store original revision ID in changeset (forces target IDs | |
|
136 | to change). It takes a boolean argument and defaults to | |
|
137 | False. | |
|
137 | 138 | convert.hg.startrev |
|
138 | convert start revision and its descendants. It takes a hg | |
|
139 | revision identifier and defaults to 0. | |
|
139 | convert start revision and its descendants. It takes a hg | |
|
140 | revision identifier and defaults to 0. | |
|
140 | 141 | |
|
141 | 142 | CVS Source |
|
142 | 143 | '''''''''' |
@@ -153,36 +154,35 | |||
|
153 | 154 | The following options can be used with "--config": |
|
154 | 155 | |
|
155 | 156 | convert.cvsps.cache |
|
156 | Set to False to disable remote log caching, for testing and | |
|
157 | debugging purposes. Default is True. | |
|
157 | Set to False to disable remote log caching, for testing and | |
|
158 | debugging purposes. Default is True. | |
|
158 | 159 | convert.cvsps.fuzz |
|
159 |
Specify the maximum time (in seconds) that is allowed |
|
|
160 |
commits with identical user and log message in a |
|
|
161 |
changeset. When very large files were checked in as |
|
|
162 |
changeset then the default may not be long enough. |
|
|
163 | is 60. | |
|
160 | Specify the maximum time (in seconds) that is allowed | |
|
161 | between commits with identical user and log message in a | |
|
162 | single changeset. When very large files were checked in as | |
|
163 | part of a changeset then the default may not be long enough. | |
|
164 | The default is 60. | |
|
164 | 165 | convert.cvsps.mergeto |
|
165 |
Specify a regular expression to which commit log messages |
|
|
166 |
matched. If a match occurs, then the conversion process |
|
|
167 |
insert a dummy revision merging the branch on which |
|
|
168 |
message occurs to the branch indicated in the |
|
|
169 | is "{{mergetobranch ([-\w]+)}}" | |
|
166 | Specify a regular expression to which commit log messages | |
|
167 | are matched. If a match occurs, then the conversion process | |
|
168 | will insert a dummy revision merging the branch on which | |
|
169 | this log message occurs to the branch indicated in the | |
|
170 | regex. Default is "{{mergetobranch ([-\w]+)}}" | |
|
170 | 171 | convert.cvsps.mergefrom |
|
171 |
Specify a regular expression to which commit log messages |
|
|
172 |
matched. If a match occurs, then the conversion process |
|
|
173 |
add the most recent revision on the branch indicated in |
|
|
174 | regex as the second parent of the changeset. Default is | |
|
175 | "{{mergefrombranch ([-\w]+)}}" | |
|
176 | hook.cvslog | |
|
177 | Specify a Python function to be called at the end of gathering | |
|
178 | the CVS log. The function is passed a list with the log | |
|
179 | entries, and can modify the entries in-place, or add or delete | |
|
180 | them. | |
|
172 | Specify a regular expression to which commit log messages | |
|
173 | are matched. If a match occurs, then the conversion process | |
|
174 | will add the most recent revision on the branch indicated in | |
|
175 | the regex as the second parent of the changeset. Default is | |
|
176 | "{{mergefrombranch ([-\w]+)}}" | |
|
177 | hook.cvslog Specify a Python function to be called at the end of | |
|
178 | gathering the CVS log. The function is passed a list with | |
|
179 | the log entries, and can modify the entries in-place, or add | |
|
180 | or delete them. | |
|
181 | 181 | hook.cvschangesets |
|
182 | Specify a Python function to be called after the changesets | |
|
183 |
are calculated from the the CVS log. The function is passed |
|
|
184 |
list with the changeset entries, and can modify the |
|
|
185 | in-place, or add or delete them. | |
|
182 | Specify a Python function to be called after the changesets | |
|
183 | are calculated from the the CVS log. The function is passed | |
|
184 | a list with the changeset entries, and can modify the | |
|
185 | changesets in-place, or add or delete them. | |
|
186 | 186 | |
|
187 | 187 | An additional "debugcvsps" Mercurial command allows the builtin changeset |
|
188 | 188 | merging code to be run without doing a conversion. Its parameters and |
@@ -205,19 +205,21 | |||
|
205 | 205 | The following options can be set with "--config": |
|
206 | 206 | |
|
207 | 207 | convert.svn.branches |
|
208 | specify the directory containing branches. The default is | |
|
209 | "branches". | |
|
208 | specify the directory containing branches. The default is | |
|
209 | "branches". | |
|
210 | 210 | convert.svn.tags |
|
211 |
specify the directory containing tags. The default is |
|
|
211 | specify the directory containing tags. The default is | |
|
212 | "tags". | |
|
212 | 213 | convert.svn.trunk |
|
213 |
specify the name of the trunk branch. The default is |
|
|
214 | specify the name of the trunk branch. The default is | |
|
215 | "trunk". | |
|
214 | 216 | |
|
215 | 217 | Source history can be retrieved starting at a specific revision, instead |
|
216 | 218 | of being integrally converted. Only single branch conversions are |
|
217 | 219 | supported. |
|
218 | 220 | |
|
219 | 221 | convert.svn.startrev |
|
220 | specify start Subversion revision number. The default is 0. | |
|
222 | specify start Subversion revision number. The default is 0. | |
|
221 | 223 | |
|
222 | 224 | Perforce Source |
|
223 | 225 | ''''''''''''''' |
@@ -232,8 +234,8 | |||
|
232 | 234 | specifying an initial Perforce revision: |
|
233 | 235 | |
|
234 | 236 | convert.p4.startrev |
|
235 | specify initial Perforce revision (a Perforce changelist | |
|
236 | number). | |
|
237 | specify initial Perforce revision (a Perforce changelist | |
|
238 | number). | |
|
237 | 239 | |
|
238 | 240 | Mercurial Destination |
|
239 | 241 | ''''''''''''''''''''' |
@@ -241,12 +243,12 | |||
|
241 | 243 | The following options are supported: |
|
242 | 244 | |
|
243 | 245 | convert.hg.clonebranches |
|
244 | dispatch source branches in separate clones. The default is | |
|
245 | False. | |
|
246 | dispatch source branches in separate clones. The default is | |
|
247 | False. | |
|
246 | 248 | convert.hg.tagsbranch |
|
247 | branch name for tag revisions, defaults to "default". | |
|
249 | branch name for tag revisions, defaults to "default". | |
|
248 | 250 | convert.hg.usebranchnames |
|
249 | preserve branch names. The default is True. | |
|
251 | preserve branch names. The default is True. | |
|
250 | 252 | |
|
251 | 253 | options: |
|
252 | 254 |
@@ -419,14 +419,14 Disabled extension commands: | |||
|
419 | 419 | $ hg help email |
|
420 | 420 | 'email' is provided by the following extension: |
|
421 | 421 | |
|
422 | patchbomb command to send changesets as (a series of) patch emails | |
|
422 | patchbomb command to send changesets as (a series of) patch emails | |
|
423 | 423 | |
|
424 | 424 | use "hg help extensions" for information on enabling extensions |
|
425 | 425 | $ hg qdel |
|
426 | 426 | hg: unknown command 'qdel' |
|
427 | 427 | 'qdelete' is provided by the following extension: |
|
428 | 428 | |
|
429 | mq manage a stack of patches | |
|
429 | mq manage a stack of patches | |
|
430 | 430 | |
|
431 | 431 | use "hg help extensions" for information on enabling extensions |
|
432 | 432 | [255] |
@@ -434,7 +434,7 Disabled extension commands: | |||
|
434 | 434 | hg: unknown command 'churn' |
|
435 | 435 | 'churn' is provided by the following extension: |
|
436 | 436 | |
|
437 | churn command to display statistics about repository history | |
|
437 | churn command to display statistics about repository history | |
|
438 | 438 | |
|
439 | 439 | use "hg help extensions" for information on enabling extensions |
|
440 | 440 | [255] |
@@ -675,7 +675,7 Test that default list of commands omits | |||
|
675 | 675 | |
|
676 | 676 | enabled extensions: |
|
677 | 677 | |
|
678 | helpext (no help text available) | |
|
678 | helpext (no help text available) | |
|
679 | 679 | |
|
680 | 680 | additional help topics: |
|
681 | 681 | |
@@ -748,10 +748,10 Test a help topic | |||
|
748 | 748 | Test templating help |
|
749 | 749 | |
|
750 | 750 | $ hg help templating | egrep '(desc|diffstat|firstline|nonempty) ' |
|
751 | desc String. The text of the changeset description. | |
|
752 | diffstat String. Statistics of changes with the following format: | |
|
753 | firstline Any text. Returns the first line of text. | |
|
754 | nonempty Any text. Returns '(none)' if the string is empty. | |
|
751 | desc String. The text of the changeset description. | |
|
752 | diffstat String. Statistics of changes with the following format: | |
|
753 | firstline Any text. Returns the first line of text. | |
|
754 | nonempty Any text. Returns '(none)' if the string is empty. | |
|
755 | 755 | |
|
756 | 756 | Test help hooks |
|
757 | 757 |
@@ -414,35 +414,37 marker after the option. It is treated a | |||
|
414 | 414 | == fields == |
|
415 | 415 | 60 column format: |
|
416 | 416 | ---------------------------------------------------------------------- |
|
417 | a First item. | |
|
418 |
ab Second item. Indentation and wrapping is |
|
|
419 | automatically. | |
|
417 | a First item. | |
|
418 | ab Second item. Indentation and wrapping is | |
|
419 | handled automatically. | |
|
420 | 420 | |
|
421 | 421 | Next list: |
|
422 | 422 | |
|
423 | small The larger key below triggers full indentation | |
|
424 | here. | |
|
423 | small The larger key below triggers full indentation | |
|
424 | here. | |
|
425 | 425 | much too large |
|
426 | This key is big enough to get its own line. | |
|
426 | This key is big enough to get its own line. | |
|
427 | 427 | ---------------------------------------------------------------------- |
|
428 | 428 | |
|
429 | 429 | 30 column format: |
|
430 | 430 | ---------------------------------------------------------------------- |
|
431 | a First item. | |
|
432 | ab Second item. Indentation | |
|
433 | and wrapping is handled | |
|
434 | automatically. | |
|
431 | a First item. | |
|
432 | ab Second item. | |
|
433 | Indentation and | |
|
434 | wrapping is | |
|
435 | handled | |
|
436 | automatically. | |
|
435 | 437 | |
|
436 | 438 | Next list: |
|
437 | 439 | |
|
438 | small The larger key | |
|
439 | below triggers | |
|
440 | full indentation | |
|
441 | here. | |
|
440 | small The larger key | |
|
441 | below triggers | |
|
442 | full indentation | |
|
443 | here. | |
|
442 | 444 | much too large |
|
443 | This key is big | |
|
444 |
enough to get |
|
|
445 | own line. | |
|
445 | This key is big | |
|
446 | enough to get | |
|
447 | its own line. | |
|
446 | 448 | ---------------------------------------------------------------------- |
|
447 | 449 | |
|
448 | 450 | html format: |
@@ -15,7 +15,7 help qrecord (no record) | |||
|
15 | 15 | $ hg help qrecord |
|
16 | 16 | 'qrecord' is provided by the following extension: |
|
17 | 17 | |
|
18 | record commands to interactively select changes for commit/qrefresh | |
|
18 | record commands to interactively select changes for commit/qrefresh | |
|
19 | 19 | |
|
20 | 20 | use "hg help extensions" for information on enabling extensions |
|
21 | 21 |
General Comments 0
You need to be logged in to leave comments.
Login now