diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py index 6b6e7da9bccddf266bddbd5ed2315c855592426c_aGdleHQvY29udmVydC9fX2luaXRfXy5weQ==..58f0c60b7f40a0c8cd7f162221f00bd727325bb6_aGdleHQvY29udmVydC9fX2luaXRfXy5weQ== 100644 --- a/hgext/convert/__init__.py +++ b/hgext/convert/__init__.py @@ -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,5 +165,5 @@ 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``: @@ -165,29 +169,26 @@ - --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,14 +211,16 @@ 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. @@ -219,10 +222,10 @@ 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,5 +238,5 @@ 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: @@ -239,7 +242,7 @@ - --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 ''''''''''''''''''''' @@ -242,13 +245,14 @@ 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) diff --git a/tests/test-convert.t b/tests/test-convert.t index 6b6e7da9bccddf266bddbd5ed2315c855592426c_dGVzdHMvdGVzdC1jb252ZXJ0LnQ=..58f0c60b7f40a0c8cd7f162221f00bd727325bb6_dGVzdHMvdGVzdC1jb252ZXJ0LnQ= 100644 --- a/tests/test-convert.t +++ b/tests/test-convert.t @@ -123,8 +123,6 @@ 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": @@ -130,9 +128,14 @@ - --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,15 +149,5 @@ 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": @@ -160,26 +153,35 @@ - --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,6 +201,5 @@ 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": @@ -204,11 +205,13 @@ - --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. @@ -210,10 +213,10 @@ 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,5 +228,5 @@ 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: @@ -229,7 +232,8 @@ - --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 ''''''''''''''''''''' @@ -232,7 +236,6 @@ Mercurial Destination ''''''''''''''''''''' - --config convert.hg.clonebranches=False (boolean) - dispatch source branches in separate clones. + The following options are supported: @@ -238,9 +241,11 @@ - --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: