tests/test-convert.out
changeset 5441 71e7c86adcb7
parent 5015 cb100605a516
child 5488 247af577fe29
equal deleted inserted replaced
5440:b4ae8535f834 5441:71e7c86adcb7
       
     1 hg convert [OPTION]... SOURCE [DEST [MAPFILE]]
       
     2 
       
     3 Convert a foreign SCM repository to a Mercurial one.
       
     4 
       
     5     Accepted source formats:
       
     6     - CVS
       
     7     - Darcs
       
     8     - git
       
     9     - Subversion
       
    10 
       
    11     Accepted destination formats:
       
    12     - Mercurial
       
    13 
       
    14     If no revision is given, all revisions will be converted. Otherwise,
       
    15     convert will only import up to the named revision (given in a format
       
    16     understood by the source).
       
    17 
       
    18     If no destination directory name is specified, it defaults to the
       
    19     basename of the source with '-hg' appended.  If the destination
       
    20     repository doesn't exist, it will be created.
       
    21 
       
    22     If <revmapfile> isn't given, it will be put in a default location
       
    23     (<dest>/.hg/shamap by default).  The <revmapfile> is a simple text
       
    24     file that maps each source commit ID to the destination ID for
       
    25     that revision, like so:
       
    26     <source ID> <destination ID>
       
    27 
       
    28     If the file doesn't exist, it's automatically created.  It's updated
       
    29     on each commit copied, so convert-repo can be interrupted and can
       
    30     be run repeatedly to copy new commits.
       
    31 
       
    32     The [username mapping] file is a simple text file that maps each source
       
    33     commit author to a destination commit author. It is handy for source SCMs
       
    34     that use unix logins to identify authors (eg: CVS). One line per author
       
    35     mapping and the line format is:
       
    36     srcauthor=whatever string you want
       
    37 
       
    38     The filemap is a file that allows filtering and remapping of files
       
    39     and directories.  Comment lines start with '#'.  Each line can
       
    40     contain one of the following directives:
       
    41 
       
    42       include path/to/file
       
    43 
       
    44       exclude path/to/file
       
    45 
       
    46       rename from/file to/file
       
    47     
       
    48     The 'include' directive causes a file, or all files under a
       
    49     directory, to be included in the destination repository.  The
       
    50     'exclude' directive causes files or directories to be omitted.
       
    51     The 'rename' directive renames a file or directory.  To rename
       
    52     from a subdirectory into the root of the repository, use '.' as
       
    53     the path to rename to.
       
    54 
       
    55 options:
       
    56 
       
    57  -A --authors      username mapping filename
       
    58  -d --dest-type    destination repository type
       
    59     --filemap      remap file names using contents of file
       
    60  -r --rev          import up to target revision REV
       
    61  -s --source-type  source repository type
       
    62     --datesort     try to sort changesets by date
       
    63 
       
    64 use "hg -v help convert" to show global options
     1 adding a
    65 adding a
     2 assuming destination a-hg
    66 assuming destination a-hg
     3 initializing destination a-hg repository
    67 initializing destination a-hg repository
     4 scanning source...
    68 scanning source...
     5 sorting...
    69 sorting...
    10 1 d
    74 1 d
    11 0 e
    75 0 e
    12 pulling from ../a
    76 pulling from ../a
    13 searching for changes
    77 searching for changes
    14 no changes found
    78 no changes found
       
    79 % should fail
       
    80 initializing destination bogusfile repository
       
    81 abort: cannot create new bundle repository
       
    82 % should fail
       
    83 abort: Permission denied: bogusdir
       
    84 % should succeed
       
    85 initializing destination bogusdir repository
       
    86 scanning source...
       
    87 sorting...
       
    88 converting...
       
    89 4 a
       
    90 3 b
       
    91 2 c
       
    92 1 d
       
    93 0 e