hgext/convert/__init__.py
changeset 12922 58f0c60b7f40
parent 12778 dce09f82f619
child 12923 7d384a372ce8
equal deleted inserted replaced
12921:6b6e7da9bccd 12922:58f0c60b7f40
   136     repository from "default" to a named branch.
   136     repository from "default" to a named branch.
   137 
   137 
   138     Mercurial Source
   138     Mercurial Source
   139     ''''''''''''''''
   139     ''''''''''''''''
   140 
   140 
   141     --config convert.hg.ignoreerrors=False    (boolean)
   141     The Mercurial source recognizes the following configuration
   142         ignore integrity errors when reading. Use it to fix Mercurial
   142     options, which you can set on the command line with ``--config``:
   143         repositories with missing revlogs, by converting from and to
   143 
   144         Mercurial.
   144     :convert.hg.ignoreerrors: ignore integrity
   145     --config convert.hg.saverev=False         (boolean)
   145         errors when reading. Use it to fix Mercurial repositories with
   146         store original revision ID in changeset (forces target IDs to
   146         missing revlogs, by converting from and to Mercurial. Default
   147         change)
   147         is False.
   148     --config convert.hg.startrev=0            (hg revision identifier)
   148     :convert.hg.saverev: store original.
   149         convert start revision and its descendants
   149         revision ID in changeset (forces target IDs to change). It takes and
       
   150         boolean argument and defaults to False.
       
   151     :convert.hg.startrev: convert
       
   152         start revision and its descendants. It takes a hg revision identifier
       
   153         and defaults to 0.
   150 
   154 
   151     CVS Source
   155     CVS Source
   152     ''''''''''
   156     ''''''''''
   153 
   157 
   154     CVS source will use a sandbox (i.e. a checked-out copy) from CVS
   158     CVS source will use a sandbox (i.e. a checked-out copy) from CVS
   159     commands to find files to convert. This means that unless a
   163     commands to find files to convert. This means that unless a
   160     filemap is given, all files under the starting directory will be
   164     filemap is given, all files under the starting directory will be
   161     converted, and that any directory reorganization in the CVS
   165     converted, and that any directory reorganization in the CVS
   162     sandbox is ignored.
   166     sandbox is ignored.
   163 
   167 
   164     The options shown are the defaults.
   168     The following options can be used with ``--config``:
   165 
   169 
   166     --config convert.cvsps.cache=True         (boolean)
   170     :convert.cvsps.cache: Set to False to disable
   167         Set to False to disable remote log caching, for testing and
   171         remote log caching, for testing and debugging purposes. Default is True.
   168         debugging purposes.
   172     :convert.cvsps.fuzz: Specify the maximum
   169     --config convert.cvsps.fuzz=60            (integer)
   173         time (in seconds) that is allowed between commits with identical user
   170         Specify the maximum time (in seconds) that is allowed between
   174         and log message in a single changeset. When very large files were
   171         commits with identical user and log message in a single
   175         checked in as part of a changeset then the default may not be long
   172         changeset. When very large files were checked in as part of a
   176         enough. The default is 60.
   173         changeset then the default may not be long enough.
   177     :convert.cvsps.mergeto: Specify a
   174     --config convert.cvsps.mergeto='{{mergetobranch ([-\\w]+)}}'
   178         regular expression to which commit log messages are matched. If a
   175         Specify a regular expression to which commit log messages are
   179         match occurs, then the conversion process will insert a dummy
   176         matched. If a match occurs, then the conversion process will
   180         revision merging the branch on which this log message occurs to the
   177         insert a dummy revision merging the branch on which this log
   181         branch indicated in the regex. Default is ``{{mergetobranch ([-\\w]+)}}``
   178         message occurs to the branch indicated in the regex.
   182     :convert.cvsps.mergefrom: Specify a
   179     --config convert.cvsps.mergefrom='{{mergefrombranch ([-\\w]+)}}'
   183         regular expression to which commit log messages are matched. If a
   180         Specify a regular expression to which commit log messages are
   184         match occurs, then the conversion process will add the most recent
   181         matched. If a match occurs, then the conversion process will
   185         revision on the branch indicated in the regex as the second parent of
   182         add the most recent revision on the branch indicated in the
   186         the changeset. Default is ``{{mergefrombranch ([-\\w]+)}}``
   183         regex as the second parent of the changeset.
   187     :hook.cvslog: Specify a Python function to be called at the end of
   184     --config hook.cvslog
   188         gathering the CVS log. The function is passed a list with the log
   185         Specify a Python function to be called at the end of gathering
   189         entries, and can modify the entries in-place, or add or delete them.
   186         the CVS log. The function is passed a list with the log entries,
   190     :hook.cvschangesets: Specify a Python function to be called after the
   187         and can modify the entries in-place, or add or delete them.
   191         changesets are calculated from the the CVS log. The function is passed
   188     --config hook.cvschangesets
       
   189         Specify a Python function to be called after the changesets
       
   190         are calculated from the the CVS log. The function is passed
       
   191         a list with the changeset entries, and can modify the changesets
   192         a list with the changeset entries, and can modify the changesets
   192         in-place, or add or delete them.
   193         in-place, or add or delete them.
   193 
   194 
   194     An additional "debugcvsps" Mercurial command allows the builtin
   195     An additional "debugcvsps" Mercurial command allows the builtin
   195     changeset merging code to be run without doing a conversion. Its
   196     changeset merging code to be run without doing a conversion. Its
   208     converted branches. Default "trunk", "branches" and "tags" values
   209     converted branches. Default "trunk", "branches" and "tags" values
   209     can be overridden with following options. Set them to paths
   210     can be overridden with following options. Set them to paths
   210     relative to the source URL, or leave them blank to disable auto
   211     relative to the source URL, or leave them blank to disable auto
   211     detection.
   212     detection.
   212 
   213 
   213     --config convert.svn.branches=branches    (directory name)
   214     The following options can be set with ``--config``:
   214         specify the directory containing branches
   215 
   215     --config convert.svn.tags=tags            (directory name)
   216     :convert.svn.branches: specify the directory
   216         specify the directory containing tags
   217         containing branches. The defaults is branches.
   217     --config convert.svn.trunk=trunk          (directory name)
   218     :convert.svn.tags: specify the directory
   218         specify the name of the trunk branch
   219         containing tags. The default is tags.
       
   220     :convert.svn.trunk: specify the name of
       
   221         the trunk branch The defauls is trunk.
   219 
   222 
   220     Source history can be retrieved starting at a specific revision,
   223     Source history can be retrieved starting at a specific revision,
   221     instead of being integrally converted. Only single branch
   224     instead of being integrally converted. Only single branch
   222     conversions are supported.
   225     conversions are supported.
   223 
   226 
   224     --config convert.svn.startrev=0           (svn revision number)
   227     :convert.svn.startrev: specify start
   225         specify start Subversion revision.
   228         Subversion revision number. The default is 0.
   226 
   229 
   227     Perforce Source
   230     Perforce Source
   228     '''''''''''''''
   231     '''''''''''''''
   229 
   232 
   230     The Perforce (P4) importer can be given a p4 depot path or a
   233     The Perforce (P4) importer can be given a p4 depot path or a
   233     and integrations. Note that when a depot path is given you then
   236     and integrations. Note that when a depot path is given you then
   234     usually should specify a target directory, because otherwise the
   237     usually should specify a target directory, because otherwise the
   235     target may be named ...-hg.
   238     target may be named ...-hg.
   236 
   239 
   237     It is possible to limit the amount of source history to be
   240     It is possible to limit the amount of source history to be
   238     converted by specifying an initial Perforce revision.
   241     converted by specifying an initial Perforce revision:
   239 
   242 
   240     --config convert.p4.startrev=0            (perforce changelist number)
   243     :convert.p4.startrev: specify
   241         specify initial Perforce revision.
   244         initial Perforce revision, a Perforce changelist number).
   242 
   245 
   243     Mercurial Destination
   246     Mercurial Destination
   244     '''''''''''''''''''''
   247     '''''''''''''''''''''
   245 
   248 
   246     --config convert.hg.clonebranches=False   (boolean)
   249     The following options are supported:
   247         dispatch source branches in separate clones.
   250 
   248     --config convert.hg.tagsbranch=default    (branch name)
   251     :convert.hg.clonebranches: dispatch source
   249         tag revisions branch name
   252         branches in separate clones. The default is False.
   250     --config convert.hg.usebranchnames=True   (boolean)
   253     :convert.hg.tagsbranch: branch name for tag revisions, defaults to
   251         preserve branch names
   254         ``default``.
       
   255     :convert.hg.usebranchnames: preserve branch names. The default is True
   252 
   256 
   253     """
   257     """
   254     return convcmd.convert(ui, src, dest, revmapfile, **opts)
   258     return convcmd.convert(ui, src, dest, revmapfile, **opts)
   255 
   259 
   256 def debugsvnlog(ui, **opts):
   260 def debugsvnlog(ui, **opts):