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