Mercurial > hg
changeset 12922:58f0c60b7f40
convert: use field list instead of option list in help
Use field list instead of option list in convert help, because the
option list format used, with defaults and type of argument is not
supported by docutils.
author | Erik Zielke <ez@aragost.com> |
---|---|
date | Thu, 04 Nov 2010 14:14:47 +0100 |
parents | 6b6e7da9bccd |
children | 7d384a372ce8 |
files | hgext/convert/__init__.py tests/test-convert.t |
diffstat | 2 files changed, 122 insertions(+), 113 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/__init__.py Thu Nov 04 17:52:40 2010 +0100 +++ b/hgext/convert/__init__.py Thu Nov 04 14:14:47 2010 +0100 @@ -138,15 +138,19 @@ Mercurial Source '''''''''''''''' - --config convert.hg.ignoreerrors=False (boolean) - ignore integrity errors when reading. Use it to fix Mercurial - repositories with missing revlogs, by converting from and to - Mercurial. - --config convert.hg.saverev=False (boolean) - store original revision ID in changeset (forces target IDs to - change) - --config convert.hg.startrev=0 (hg revision identifier) - convert start revision and its descendants + The Mercurial source recognizes the following configuration + options, which you can set on the command line with ``--config``: + + :convert.hg.ignoreerrors: ignore integrity + errors when reading. Use it to fix Mercurial repositories with + missing revlogs, by converting from and to Mercurial. Default + is False. + :convert.hg.saverev: store original. + revision ID in changeset (forces target IDs to change). It takes and + boolean argument and defaults to False. + :convert.hg.startrev: convert + start revision and its descendants. It takes a hg revision identifier + and defaults to 0. CVS Source '''''''''' @@ -161,33 +165,30 @@ converted, and that any directory reorganization in the CVS sandbox is ignored. - The options shown are the defaults. + The following options can be used with ``--config``: - --config convert.cvsps.cache=True (boolean) - Set to False to disable remote log caching, for testing and - debugging purposes. - --config convert.cvsps.fuzz=60 (integer) - Specify the maximum time (in seconds) that is allowed between - commits with identical user and log message in a single - changeset. When very large files were checked in as part of a - changeset then the default may not be long enough. - --config convert.cvsps.mergeto='{{mergetobranch ([-\\w]+)}}' - Specify a regular expression to which commit log messages are - matched. If a match occurs, then the conversion process will - insert a dummy revision merging the branch on which this log - message occurs to the branch indicated in the regex. - --config convert.cvsps.mergefrom='{{mergefrombranch ([-\\w]+)}}' - Specify a regular expression to which commit log messages are - matched. If a match occurs, then the conversion process will - add the most recent revision on the branch indicated in the - regex as the second parent of the changeset. - --config hook.cvslog - Specify a Python function to be called at the end of gathering - the CVS log. The function is passed a list with the log entries, - and can modify the entries in-place, or add or delete them. - --config hook.cvschangesets - Specify a Python function to be called after the changesets - are calculated from the the CVS log. The function is passed + :convert.cvsps.cache: Set to False to disable + remote log caching, for testing and debugging purposes. Default is True. + :convert.cvsps.fuzz: Specify the maximum + time (in seconds) that is allowed between commits with identical user + and log message in a single changeset. When very large files were + checked in as part of a changeset then the default may not be long + enough. The default is 60. + :convert.cvsps.mergeto: Specify a + regular expression to which commit log messages are matched. If a + match occurs, then the conversion process will insert a dummy + revision merging the branch on which this log message occurs to the + branch indicated in the regex. Default is ``{{mergetobranch ([-\\w]+)}}`` + :convert.cvsps.mergefrom: Specify a + regular expression to which commit log messages are matched. If a + match occurs, then the conversion process will add the most recent + revision on the branch indicated in the regex as the second parent of + the changeset. Default is ``{{mergefrombranch ([-\\w]+)}}`` + :hook.cvslog: Specify a Python function to be called at the end of + gathering the CVS log. The function is passed a list with the log + entries, and can modify the entries in-place, or add or delete them. + :hook.cvschangesets: Specify a Python function to be called after the + changesets are calculated from the the CVS log. The function is passed a list with the changeset entries, and can modify the changesets in-place, or add or delete them. @@ -210,19 +211,21 @@ relative to the source URL, or leave them blank to disable auto detection. - --config convert.svn.branches=branches (directory name) - specify the directory containing branches - --config convert.svn.tags=tags (directory name) - specify the directory containing tags - --config convert.svn.trunk=trunk (directory name) - specify the name of the trunk branch + The following options can be set with ``--config``: + + :convert.svn.branches: specify the directory + containing branches. The defaults is branches. + :convert.svn.tags: specify the directory + containing tags. The default is tags. + :convert.svn.trunk: specify the name of + the trunk branch The defauls is trunk. Source history can be retrieved starting at a specific revision, instead of being integrally converted. Only single branch conversions are supported. - --config convert.svn.startrev=0 (svn revision number) - specify start Subversion revision. + :convert.svn.startrev: specify start + Subversion revision number. The default is 0. Perforce Source ''''''''''''''' @@ -235,20 +238,21 @@ target may be named ...-hg. It is possible to limit the amount of source history to be - converted by specifying an initial Perforce revision. + converted by specifying an initial Perforce revision: - --config convert.p4.startrev=0 (perforce changelist number) - specify initial Perforce revision. + :convert.p4.startrev: specify + initial Perforce revision, a Perforce changelist number). Mercurial Destination ''''''''''''''''''''' - --config convert.hg.clonebranches=False (boolean) - dispatch source branches in separate clones. - --config convert.hg.tagsbranch=default (branch name) - tag revisions branch name - --config convert.hg.usebranchnames=True (boolean) - preserve branch names + The following options are supported: + + :convert.hg.clonebranches: dispatch source + branches in separate clones. The default is False. + :convert.hg.tagsbranch: branch name for tag revisions, defaults to + ``default``. + :convert.hg.usebranchnames: preserve branch names. The default is True """ return convcmd.convert(ui, src, dest, revmapfile, **opts)
--- a/tests/test-convert.t Thu Nov 04 17:52:40 2010 +0100 +++ b/tests/test-convert.t Thu Nov 04 14:14:47 2010 +0100 @@ -123,16 +123,19 @@ Mercurial Source '''''''''''''''' - --config convert.hg.ignoreerrors=False (boolean) - ignore integrity errors when reading. Use it to fix Mercurial - repositories with missing revlogs, by converting from and to - Mercurial. + The Mercurial source recognizes the following configuration options, which + you can set on the command line with "--config": - --config convert.hg.saverev=False (boolean) - store original revision ID in changeset (forces target IDs to change) - - --config convert.hg.startrev=0 (hg revision identifier) - convert start revision and its descendants + convert.hg.ignoreerrors + ignore integrity errors when reading. Use it to fix Mercurial + repositories with missing revlogs, by converting from and to + Mercurial. Default is False. + convert.hg.saverev + store original. revision ID in changeset (forces target IDs to + change). It takes and boolean argument and defaults to False. + convert.hg.startrev + convert start revision and its descendants. It takes a hg + revision identifier and defaults to 0. CVS Source '''''''''' @@ -146,40 +149,39 @@ starting directory will be converted, and that any directory reorganization in the CVS sandbox is ignored. - The options shown are the defaults. - - --config convert.cvsps.cache=True (boolean) - Set to False to disable remote log caching, for testing and debugging - purposes. - - --config convert.cvsps.fuzz=60 (integer) - Specify the maximum time (in seconds) that is allowed between commits - with identical user and log message in a single changeset. When very - large files were checked in as part of a changeset then the default - may not be long enough. + The following options can be used with "--config": - --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}' - Specify a regular expression to which commit log messages are matched. - If a match occurs, then the conversion process will insert a dummy - revision merging the branch on which this log message occurs to the - branch indicated in the regex. - - --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}' - Specify a regular expression to which commit log messages are matched. - If a match occurs, then the conversion process will add the most - recent revision on the branch indicated in the regex as the second - parent of the changeset. - - --config hook.cvslog - Specify a Python function to be called at the end of gathering the CVS - log. The function is passed a list with the log entries, and can - modify the entries in-place, or add or delete them. - - --config hook.cvschangesets - Specify a Python function to be called after the changesets are - calculated from the the CVS log. The function is passed a list with - the changeset entries, and can modify the changesets in-place, or add - or delete them. + convert.cvsps.cache + Set to False to disable remote log caching, for testing and + debugging purposes. Default is True. + convert.cvsps.fuzz + Specify the maximum time (in seconds) that is allowed between + commits with identical user and log message in a single + changeset. When very large files were checked in as part of a + changeset then the default may not be long enough. The default + is 60. + convert.cvsps.mergeto + Specify a regular expression to which commit log messages are + matched. If a match occurs, then the conversion process will + insert a dummy revision merging the branch on which this log + message occurs to the branch indicated in the regex. Default + is "{{mergetobranch ([-\w]+)}}" + convert.cvsps.mergefrom + Specify a regular expression to which commit log messages are + matched. If a match occurs, then the conversion process will + add the most recent revision on the branch indicated in the + regex as the second parent of the changeset. Default is + "{{mergefrombranch ([-\w]+)}}" + hook.cvslog + Specify a Python function to be called at the end of gathering + the CVS log. The function is passed a list with the log + entries, and can modify the entries in-place, or add or delete + them. + hook.cvschangesets + Specify a Python function to be called after the changesets + are calculated from the the CVS log. The function is passed a + list with the changeset entries, and can modify the changesets + in-place, or add or delete them. An additional "debugcvsps" Mercurial command allows the builtin changeset merging code to be run without doing a conversion. Its parameters and @@ -199,21 +201,22 @@ them to paths relative to the source URL, or leave them blank to disable auto detection. - --config convert.svn.branches=branches (directory name) - specify the directory containing branches + The following options can be set with "--config": - --config convert.svn.tags=tags (directory name) - specify the directory containing tags - - --config convert.svn.trunk=trunk (directory name) - specify the name of the trunk branch + convert.svn.branches + specify the directory containing branches. The defaults is + branches. + convert.svn.tags + specify the directory containing tags. The default is tags. + convert.svn.trunk + specify the name of the trunk branch The defauls is trunk. Source history can be retrieved starting at a specific revision, instead of being integrally converted. Only single branch conversions are supported. - --config convert.svn.startrev=0 (svn revision number) - specify start Subversion revision. + convert.svn.startrev + specify start Subversion revision number. The default is 0. Perforce Source ''''''''''''''' @@ -225,22 +228,24 @@ directory, because otherwise the target may be named ...-hg. It is possible to limit the amount of source history to be converted by - specifying an initial Perforce revision. + specifying an initial Perforce revision: - --config convert.p4.startrev=0 (perforce changelist number) - specify initial Perforce revision. + convert.p4.startrev + specify initial Perforce revision, a Perforce changelist + number). Mercurial Destination ''''''''''''''''''''' - --config convert.hg.clonebranches=False (boolean) - dispatch source branches in separate clones. + The following options are supported: - --config convert.hg.tagsbranch=default (branch name) - tag revisions branch name - - --config convert.hg.usebranchnames=True (boolean) - preserve branch names + convert.hg.clonebranches + dispatch source branches in separate clones. The default is + False. + convert.hg.tagsbranch + branch name for tag revisions, defaults to "default". + convert.hg.usebranchnames + preserve branch names. The default is True options: