tests/test-convert.out
changeset 9058 b10cee4bd2c1
parent 8844 d2ef4f2b904a
child 9086 f459f09b4214
equal deleted inserted replaced
9057:07788bbb35e4 9058:b10cee4bd2c1
    15 
    15 
    16     Accepted destination formats [identifiers]:
    16     Accepted destination formats [identifiers]:
    17     - Mercurial [hg]
    17     - Mercurial [hg]
    18     - Subversion [svn] (history on branches is not preserved)
    18     - Subversion [svn] (history on branches is not preserved)
    19 
    19 
    20     If no revision is given, all revisions will be converted.
    20     If no revision is given, all revisions will be converted. Otherwise,
    21     Otherwise, convert will only import up to the named revision
    21     convert will only import up to the named revision (given in a format
    22     (given in a format understood by the source).
    22     understood by the source).
    23 
    23 
    24     If no destination directory name is specified, it defaults to the
    24     If no destination directory name is specified, it defaults to the basename
    25     basename of the source with '-hg' appended. If the destination
    25     of the source with '-hg' appended. If the destination repository doesn't
    26     repository doesn't exist, it will be created.
    26     exist, it will be created.
    27 
    27 
    28     By default, all sources except Mercurial will use
    28     By default, all sources except Mercurial will use --branchsort. Mercurial
    29     --branchsort. Mercurial uses --sourcesort to preserve original
    29     uses --sourcesort to preserve original revision numbers order. Sort modes
    30     revision numbers order. Sort modes have the following effects:
    30     have the following effects:
    31       --branchsort: convert from parent to child revision when
    31       --branchsort: convert from parent to child revision when possible, which
    32         possible, which means branches are usually converted one after
    32         means branches are usually converted one after the other. It generates
    33         the other. It generates more compact repositories.
    33         more compact repositories.
    34       --datesort: sort revisions by date. Converted repositories have
    34       --datesort: sort revisions by date. Converted repositories have
    35         good-looking changelogs but are often an order of magnitude
    35         good-looking changelogs but are often an order of magnitude larger
    36         larger than the same ones generated by --branchsort.
    36         than the same ones generated by --branchsort.
    37       --sourcesort: try to preserve source revisions order, only
    37       --sourcesort: try to preserve source revisions order, only supported by
    38         supported by Mercurial sources.
    38         Mercurial sources.
    39 
    39 
    40     If <REVMAP> isn't given, it will be put in a default location
    40     If <REVMAP> isn't given, it will be put in a default location
    41     (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file
    41     (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file that
    42     that maps each source commit ID to the destination ID for that
    42     maps each source commit ID to the destination ID for that revision, like
    43     revision, like so:
    43     so:
       
    44 
    44     <source ID> <destination ID>
    45     <source ID> <destination ID>
    45 
    46 
    46     If the file doesn't exist, it's automatically created. It's
    47     If the file doesn't exist, it's automatically created. It's updated on
    47     updated on each commit copied, so convert-repo can be interrupted
    48     each commit copied, so convert-repo can be interrupted and can be run
    48     and can be run repeatedly to copy new commits.
    49     repeatedly to copy new commits.
    49 
    50 
    50     The [username mapping] file is a simple text file that maps each
    51     The [username mapping] file is a simple text file that maps each source
    51     source commit author to a destination commit author. It is handy
    52     commit author to a destination commit author. It is handy for source SCMs
    52     for source SCMs that use unix logins to identify authors (eg:
    53     that use unix logins to identify authors (eg: CVS). One line per author
    53     CVS). One line per author mapping and the line format is:
    54     mapping and the line format is: srcauthor=whatever string you want
    54     srcauthor=whatever string you want
    55 
    55 
    56     The filemap is a file that allows filtering and remapping of files and
    56     The filemap is a file that allows filtering and remapping of files
    57     directories. Comment lines start with '#'. Each line can contain one of
    57     and directories. Comment lines start with '#'. Each line can
    58     the following directives:
    58     contain one of the following directives:
       
    59 
    59 
    60       include path/to/file
    60       include path/to/file
    61 
    61 
    62       exclude path/to/file
    62       exclude path/to/file
    63 
    63 
    64       rename from/file to/file
    64       rename from/file to/file
    65 
    65 
    66     The 'include' directive causes a file, or all files under a
    66     The 'include' directive causes a file, or all files under a directory, to
    67     directory, to be included in the destination repository, and the
    67     be included in the destination repository, and the exclusion of all other
    68     exclusion of all other files and directories not explicitly included.
    68     files and directories not explicitly included. The 'exclude' directive
    69     The 'exclude' directive causes files or directories to be omitted.
    69     causes files or directories to be omitted. The 'rename' directive renames
    70     The 'rename' directive renames a file or directory. To rename from
    70     a file or directory. To rename from a subdirectory into the root of the
    71     a subdirectory into the root of the repository, use '.' as the
    71     repository, use '.' as the path to rename to.
    72     path to rename to.
    72 
    73 
    73     The splicemap is a file that allows insertion of synthetic history,
    74     The splicemap is a file that allows insertion of synthetic
    74     letting you specify the parents of a revision. This is useful if you want
    75     history, letting you specify the parents of a revision. This is
    75     to e.g. give a Subversion merge two parents, or graft two disconnected
    76     useful if you want to e.g. give a Subversion merge two parents, or
    76     series of history together. Each entry contains a key, followed by a
    77     graft two disconnected series of history together. Each entry
    77     space, followed by one or two comma-separated values. The key is the
    78     contains a key, followed by a space, followed by one or two
    78     revision ID in the source revision control system whose parents should be
    79     comma-separated values. The key is the revision ID in the source
    79     modified (same format as a key in .hg/shamap). The values are the revision
    80     revision control system whose parents should be modified (same
    80     IDs (in either the source or destination revision control system) that
    81     format as a key in .hg/shamap). The values are the revision IDs
       
    82     (in either the source or destination revision control system) that
       
    83     should be used as the new parents for that node.
    81     should be used as the new parents for that node.
    84 
    82 
    85     The branchmap is a file that allows you to rename a branch when it is
    83     The branchmap is a file that allows you to rename a branch when it is
    86     being brought in from whatever external repository. When used in
    84     being brought in from whatever external repository. When used in
    87     conjunction with a splicemap, it allows for a powerful combination
    85     conjunction with a splicemap, it allows for a powerful combination to help
    88     to help fix even the most badly mismanaged repositories and turn them
    86     fix even the most badly mismanaged repositories and turn them into nicely
    89     into nicely structured Mercurial repositories. The branchmap contains
    87     structured Mercurial repositories. The branchmap contains lines of the
    90     lines of the form "original_branch_name new_branch_name".
    88     form "original_branch_name new_branch_name". "original_branch_name" is the
    91     "original_branch_name" is the name of the branch in the source
    89     name of the branch in the source repository, and "new_branch_name" is the
    92     repository, and "new_branch_name" is the name of the branch is the
    90     name of the branch is the destination repository. This can be used to (for
    93     destination repository. This can be used to (for instance) move code
    91     instance) move code in one repository from "default" to a named branch.
    94     in one repository from "default" to a named branch.
       
    95 
    92 
    96     Mercurial Source
    93     Mercurial Source
    97     -----------------
    94     -----------------
    98 
    95 
    99     --config convert.hg.ignoreerrors=False    (boolean)
    96     --config convert.hg.ignoreerrors=False    (boolean)
   100         ignore integrity errors when reading. Use it to fix Mercurial
    97         ignore integrity errors when reading. Use it to fix Mercurial
   101         repositories with missing revlogs, by converting from and to
    98         repositories with missing revlogs, by converting from and to
   102         Mercurial.
    99         Mercurial.
   103     --config convert.hg.saverev=False         (boolean)
   100     --config convert.hg.saverev=False         (boolean)
   104         store original revision ID in changeset (forces target IDs to
   101         store original revision ID in changeset (forces target IDs to change)
   105         change)
       
   106     --config convert.hg.startrev=0            (hg revision identifier)
   102     --config convert.hg.startrev=0            (hg revision identifier)
   107         convert start revision and its descendants
   103         convert start revision and its descendants
   108 
   104 
   109     CVS Source
   105     CVS Source
   110     ----------
   106     ----------
   111 
   107 
   112     CVS source will use a sandbox (i.e. a checked-out copy) from CVS
   108     CVS source will use a sandbox (i.e. a checked-out copy) from CVS to
   113     to indicate the starting point of what will be converted. Direct
   109     indicate the starting point of what will be converted. Direct access to
   114     access to the repository files is not needed, unless of course the
   110     the repository files is not needed, unless of course the repository is
   115     repository is :local:. The conversion uses the top level directory
   111     :local:. The conversion uses the top level directory in the sandbox to
   116     in the sandbox to find the CVS repository, and then uses CVS rlog
   112     find the CVS repository, and then uses CVS rlog commands to find files to
   117     commands to find files to convert. This means that unless a
   113     convert. This means that unless a filemap is given, all files under the
   118     filemap is given, all files under the starting directory will be
   114     starting directory will be converted, and that any directory
   119     converted, and that any directory reorganization in the CVS
   115     reorganization in the CVS sandbox is ignored.
   120     sandbox is ignored.
       
   121 
   116 
   122     Because CVS does not have changesets, it is necessary to collect
   117     Because CVS does not have changesets, it is necessary to collect
   123     individual commits to CVS and merge them into changesets. CVS
   118     individual commits to CVS and merge them into changesets. CVS source uses
   124     source uses its internal changeset merging code by default but can
   119     its internal changeset merging code by default but can be configured to
   125     be configured to call the external 'cvsps' program by setting:
   120     call the external 'cvsps' program by setting:
       
   121 
   126         --config convert.cvsps='cvsps -A -u --cvs-direct -q'
   122         --config convert.cvsps='cvsps -A -u --cvs-direct -q'
       
   123 
   127     This option is deprecated and will be removed in Mercurial 1.4.
   124     This option is deprecated and will be removed in Mercurial 1.4.
   128 
   125 
   129     The options shown are the defaults.
   126     The options shown are the defaults.
   130 
   127 
   131     Internal cvsps is selected by setting
   128     Internal cvsps is selected by setting
       
   129 
   132         --config convert.cvsps=builtin
   130         --config convert.cvsps=builtin
       
   131 
   133     and has a few more configurable options:
   132     and has a few more configurable options:
   134         --config convert.cvsps.cache=True     (boolean)
   133         --config convert.cvsps.cache=True     (boolean)
   135             Set to False to disable remote log caching, for testing and
   134             Set to False to disable remote log caching, for testing and
   136             debugging purposes.
   135             debugging purposes.
   137         --config convert.cvsps.fuzz=60        (integer)
   136         --config convert.cvsps.fuzz=60        (integer)
   138             Specify the maximum time (in seconds) that is allowed
   137             Specify the maximum time (in seconds) that is allowed between
   139             between commits with identical user and log message in a
   138             commits with identical user and log message in a single changeset.
   140             single changeset. When very large files were checked in as
   139             When very large files were checked in as part of a changeset then
   141             part of a changeset then the default may not be long
   140             the default may not be long enough.
   142             enough.
       
   143         --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}'
   141         --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}'
   144             Specify a regular expression to which commit log messages
   142             Specify a regular expression to which commit log messages are
   145             are matched. If a match occurs, then the conversion
   143             matched. If a match occurs, then the conversion process will
   146             process will insert a dummy revision merging the branch on
   144             insert a dummy revision merging the branch on which this log
   147             which this log message occurs to the branch indicated in
   145             message occurs to the branch indicated in the regex.
   148             the regex.
       
   149         --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}'
   146         --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}'
   150             Specify a regular expression to which commit log messages
   147             Specify a regular expression to which commit log messages are
   151             are matched. If a match occurs, then the conversion
   148             matched. If a match occurs, then the conversion process will add
   152             process will add the most recent revision on the branch
   149             the most recent revision on the branch indicated in the regex as
   153             indicated in the regex as the second parent of the
   150             the second parent of the changeset.
   154             changeset.
   151 
   155 
   152     The hgext/convert/cvsps wrapper script allows the builtin changeset
   156     The hgext/convert/cvsps wrapper script allows the builtin
   153     merging code to be run without doing a conversion. Its parameters and
   157     changeset merging code to be run without doing a conversion. Its
   154     output are similar to that of cvsps 2.1.
   158     parameters and output are similar to that of cvsps 2.1.
       
   159 
   155 
   160     Subversion Source
   156     Subversion Source
   161     -----------------
   157     -----------------
   162 
   158 
   163     Subversion source detects classical trunk/branches/tags layouts.
   159     Subversion source detects classical trunk/branches/tags layouts. By
   164     By default, the supplied "svn://repo/path/" source URL is
   160     default, the supplied "svn://repo/path/" source URL is converted as a
   165     converted as a single branch. If "svn://repo/path/trunk" exists it
   161     single branch. If "svn://repo/path/trunk" exists it replaces the default
   166     replaces the default branch. If "svn://repo/path/branches" exists,
   162     branch. If "svn://repo/path/branches" exists, its subdirectories are
   167     its subdirectories are listed as possible branches. If
   163     listed as possible branches. If "svn://repo/path/tags" exists, it is
   168     "svn://repo/path/tags" exists, it is looked for tags referencing
   164     looked for tags referencing converted branches. Default "trunk",
   169     converted branches. Default "trunk", "branches" and "tags" values
   165     "branches" and "tags" values can be overridden with following options. Set
   170     can be overridden with following options. Set them to paths
   166     them to paths relative to the source URL, or leave them blank to disable
   171     relative to the source URL, or leave them blank to disable auto
   167     auto detection.
   172     detection.
       
   173 
   168 
   174     --config convert.svn.branches=branches    (directory name)
   169     --config convert.svn.branches=branches    (directory name)
   175         specify the directory containing branches
   170         specify the directory containing branches
   176     --config convert.svn.tags=tags            (directory name)
   171     --config convert.svn.tags=tags            (directory name)
   177         specify the directory containing tags
   172         specify the directory containing tags
   178     --config convert.svn.trunk=trunk          (directory name)
   173     --config convert.svn.trunk=trunk          (directory name)
   179         specify the name of the trunk branch
   174         specify the name of the trunk branch
   180 
   175 
   181     Source history can be retrieved starting at a specific revision,
   176     Source history can be retrieved starting at a specific revision, instead
   182     instead of being integrally converted. Only single branch
   177     of being integrally converted. Only single branch conversions are
   183     conversions are supported.
   178     supported.
   184 
   179 
   185     --config convert.svn.startrev=0           (svn revision number)
   180     --config convert.svn.startrev=0           (svn revision number)
   186         specify start Subversion revision.
   181         specify start Subversion revision.
   187 
   182 
   188     Perforce Source
   183     Perforce Source
   189     ---------------
   184     ---------------
   190 
   185 
   191     The Perforce (P4) importer can be given a p4 depot path or a
   186     The Perforce (P4) importer can be given a p4 depot path or a client
   192     client specification as source. It will convert all files in the
   187     specification as source. It will convert all files in the source to a flat
   193     source to a flat Mercurial repository, ignoring labels, branches
   188     Mercurial repository, ignoring labels, branches and integrations. Note
   194     and integrations. Note that when a depot path is given you then
   189     that when a depot path is given you then usually should specify a target
   195     usually should specify a target directory, because otherwise the
   190     directory, because otherwise the target may be named ...-hg.
   196     target may be named ...-hg.
   191 
   197 
   192     It is possible to limit the amount of source history to be converted by
   198     It is possible to limit the amount of source history to be
   193     specifying an initial Perforce revision.
   199     converted by specifying an initial Perforce revision.
       
   200 
   194 
   201     --config convert.p4.startrev=0            (perforce changelist number)
   195     --config convert.p4.startrev=0            (perforce changelist number)
   202         specify initial Perforce revision.
   196         specify initial Perforce revision.
   203 
   197 
   204 
   198