tests/test-convert.t
author Martin Geisler <mg@lazybytes.net>
Wed, 27 Oct 2010 12:05:37 +0200
branchstable
changeset 12857 a9f91c844a3b
parent 12787 e8a8993b625e
child 12922 58f0c60b7f40
permissions -rw-r--r--
README: add small introduction
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5441
71e7c86adcb7 convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents: 5028
diff changeset
     1
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
     2
  $ cat >> $HGRCPATH <<EOF
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
     3
  > [extensions]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
     4
  > convert=
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
     5
  > [convert]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
     6
  > hg.saverev=False
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
     7
  > EOF
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
     8
  $ hg help convert
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
     9
  hg convert [OPTION]... SOURCE [DEST [REVMAP]]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    10
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    11
  convert a foreign SCM repository to a Mercurial one.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    12
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    13
      Accepted source formats [identifiers]:
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    14
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    15
      - Mercurial [hg]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    16
      - CVS [cvs]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    17
      - Darcs [darcs]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    18
      - git [git]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    19
      - Subversion [svn]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    20
      - Monotone [mtn]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    21
      - GNU Arch [gnuarch]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    22
      - Bazaar [bzr]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    23
      - Perforce [p4]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    24
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    25
      Accepted destination formats [identifiers]:
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    26
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    27
      - Mercurial [hg]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    28
      - Subversion [svn] (history on branches is not preserved)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    29
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    30
      If no revision is given, all revisions will be converted. Otherwise,
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    31
      convert will only import up to the named revision (given in a format
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    32
      understood by the source).
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    33
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    34
      If no destination directory name is specified, it defaults to the basename
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    35
      of the source with "-hg" appended. If the destination repository doesn't
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    36
      exist, it will be created.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    37
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    38
      By default, all sources except Mercurial will use --branchsort. Mercurial
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    39
      uses --sourcesort to preserve original revision numbers order. Sort modes
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    40
      have the following effects:
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    41
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    42
      --branchsort  convert from parent to child revision when possible, which
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    43
                    means branches are usually converted one after the other. It
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    44
                    generates more compact repositories.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    45
      --datesort    sort revisions by date. Converted repositories have good-
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    46
                    looking changelogs but are often an order of magnitude
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    47
                    larger than the same ones generated by --branchsort.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    48
      --sourcesort  try to preserve source revisions order, only supported by
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    49
                    Mercurial sources.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    50
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    51
      If <REVMAP> isn't given, it will be put in a default location
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    52
      (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file that
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    53
      maps each source commit ID to the destination ID for that revision, like
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    54
      so:
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    55
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    56
        <source ID> <destination ID>
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    57
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    58
      If the file doesn't exist, it's automatically created. It's updated on
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    59
      each commit copied, so "hg convert" can be interrupted and can be run
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    60
      repeatedly to copy new commits.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    61
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    62
      The authormap is a simple text file that maps each source commit author to
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    63
      a destination commit author. It is handy for source SCMs that use unix
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    64
      logins to identify authors (eg: CVS). One line per author mapping and the
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    65
      line format is:
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    66
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    67
        source author = destination author
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    68
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    69
      Empty lines and lines starting with a "#" are ignored.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    70
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    71
      The filemap is a file that allows filtering and remapping of files and
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    72
      directories. Each line can contain one of the following directives:
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    73
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    74
        include path/to/file-or-dir
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    75
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    76
        exclude path/to/file-or-dir
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    77
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    78
        rename path/to/source path/to/destination
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    79
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    80
      Comment lines start with "#". A specified path matches if it equals the
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    81
      full relative name of a file or one of its parent directories. The
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    82
      "include" or "exclude" directive with the longest matching path applies,
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    83
      so line order does not matter.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    84
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    85
      The "include" directive causes a file, or all files under a directory, to
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    86
      be included in the destination repository, and the exclusion of all other
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    87
      files and directories not explicitly included. The "exclude" directive
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    88
      causes files or directories to be omitted. The "rename" directive renames
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    89
      a file or directory if it is converted. To rename from a subdirectory into
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    90
      the root of the repository, use "." as the path to rename to.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    91
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    92
      The splicemap is a file that allows insertion of synthetic history,
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    93
      letting you specify the parents of a revision. This is useful if you want
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    94
      to e.g. give a Subversion merge two parents, or graft two disconnected
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    95
      series of history together. Each entry contains a key, followed by a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    96
      space, followed by one or two comma-separated values:
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    97
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    98
        key parent1, parent2
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
    99
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   100
      The key is the revision ID in the source revision control system whose
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   101
      parents should be modified (same format as a key in .hg/shamap). The
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   102
      values are the revision IDs (in either the source or destination revision
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   103
      control system) that should be used as the new parents for that node. For
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   104
      example, if you have merged "release-1.0" into "trunk", then you should
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   105
      specify the revision on "trunk" as the first parent and the one on the
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   106
      "release-1.0" branch as the second.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   107
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   108
      The branchmap is a file that allows you to rename a branch when it is
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   109
      being brought in from whatever external repository. When used in
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   110
      conjunction with a splicemap, it allows for a powerful combination to help
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   111
      fix even the most badly mismanaged repositories and turn them into nicely
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   112
      structured Mercurial repositories. The branchmap contains lines of the
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   113
      form:
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   114
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   115
        original_branch_name new_branch_name
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   116
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   117
      where "original_branch_name" is the name of the branch in the source
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   118
      repository, and "new_branch_name" is the name of the branch is the
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   119
      destination repository. No whitespace is allowed in the branch names. This
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   120
      can be used to (for instance) move code in one repository from "default"
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   121
      to a named branch.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   122
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   123
      Mercurial Source
12787
e8a8993b625e tests: fix up changed output
Matt Mackall <mpm@selenic.com>
parents: 12510
diff changeset
   124
      ''''''''''''''''
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   125
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   126
      --config convert.hg.ignoreerrors=False    (boolean)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   127
          ignore integrity errors when reading. Use it to fix Mercurial
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   128
          repositories with missing revlogs, by converting from and to
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   129
          Mercurial.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   130
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   131
      --config convert.hg.saverev=False         (boolean)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   132
          store original revision ID in changeset (forces target IDs to change)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   133
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   134
      --config convert.hg.startrev=0            (hg revision identifier)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   135
          convert start revision and its descendants
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   136
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   137
      CVS Source
12787
e8a8993b625e tests: fix up changed output
Matt Mackall <mpm@selenic.com>
parents: 12510
diff changeset
   138
      ''''''''''
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   139
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   140
      CVS source will use a sandbox (i.e. a checked-out copy) from CVS to
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   141
      indicate the starting point of what will be converted. Direct access to
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   142
      the repository files is not needed, unless of course the repository is
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   143
      :local:. The conversion uses the top level directory in the sandbox to
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   144
      find the CVS repository, and then uses CVS rlog commands to find files to
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   145
      convert. This means that unless a filemap is given, all files under the
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   146
      starting directory will be converted, and that any directory
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   147
      reorganization in the CVS sandbox is ignored.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   148
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   149
      The options shown are the defaults.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   150
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   151
      --config convert.cvsps.cache=True         (boolean)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   152
          Set to False to disable remote log caching, for testing and debugging
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   153
          purposes.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   154
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   155
      --config convert.cvsps.fuzz=60            (integer)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   156
          Specify the maximum time (in seconds) that is allowed between commits
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   157
          with identical user and log message in a single changeset. When very
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   158
          large files were checked in as part of a changeset then the default
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   159
          may not be long enough.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   160
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   161
      --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}'
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   162
          Specify a regular expression to which commit log messages are matched.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   163
          If a match occurs, then the conversion process will insert a dummy
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   164
          revision merging the branch on which this log message occurs to the
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   165
          branch indicated in the regex.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   166
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   167
      --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}'
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   168
          Specify a regular expression to which commit log messages are matched.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   169
          If a match occurs, then the conversion process will add the most
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   170
          recent revision on the branch indicated in the regex as the second
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   171
          parent of the changeset.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   172
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   173
      --config hook.cvslog
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   174
          Specify a Python function to be called at the end of gathering the CVS
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   175
          log. The function is passed a list with the log entries, and can
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   176
          modify the entries in-place, or add or delete them.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   177
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   178
      --config hook.cvschangesets
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   179
          Specify a Python function to be called after the changesets are
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   180
          calculated from the the CVS log. The function is passed a list with
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   181
          the changeset entries, and can modify the changesets in-place, or add
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   182
          or delete them.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   183
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   184
      An additional "debugcvsps" Mercurial command allows the builtin changeset
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   185
      merging code to be run without doing a conversion. Its parameters and
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   186
      output are similar to that of cvsps 2.1. Please see the command help for
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   187
      more details.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   188
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   189
      Subversion Source
12787
e8a8993b625e tests: fix up changed output
Matt Mackall <mpm@selenic.com>
parents: 12510
diff changeset
   190
      '''''''''''''''''
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   191
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   192
      Subversion source detects classical trunk/branches/tags layouts. By
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   193
      default, the supplied "svn://repo/path/" source URL is converted as a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   194
      single branch. If "svn://repo/path/trunk" exists it replaces the default
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   195
      branch. If "svn://repo/path/branches" exists, its subdirectories are
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   196
      listed as possible branches. If "svn://repo/path/tags" exists, it is
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   197
      looked for tags referencing converted branches. Default "trunk",
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   198
      "branches" and "tags" values can be overridden with following options. Set
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   199
      them to paths relative to the source URL, or leave them blank to disable
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   200
      auto detection.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   201
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   202
      --config convert.svn.branches=branches    (directory name)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   203
          specify the directory containing branches
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   204
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   205
      --config convert.svn.tags=tags            (directory name)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   206
          specify the directory containing tags
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   207
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   208
      --config convert.svn.trunk=trunk          (directory name)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   209
          specify the name of the trunk branch
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   210
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   211
      Source history can be retrieved starting at a specific revision, instead
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   212
      of being integrally converted. Only single branch conversions are
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   213
      supported.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   214
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   215
      --config convert.svn.startrev=0           (svn revision number)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   216
          specify start Subversion revision.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   217
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   218
      Perforce Source
12787
e8a8993b625e tests: fix up changed output
Matt Mackall <mpm@selenic.com>
parents: 12510
diff changeset
   219
      '''''''''''''''
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   220
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   221
      The Perforce (P4) importer can be given a p4 depot path or a client
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   222
      specification as source. It will convert all files in the source to a flat
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   223
      Mercurial repository, ignoring labels, branches and integrations. Note
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   224
      that when a depot path is given you then usually should specify a target
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   225
      directory, because otherwise the target may be named ...-hg.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   226
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   227
      It is possible to limit the amount of source history to be converted by
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   228
      specifying an initial Perforce revision.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   229
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   230
      --config convert.p4.startrev=0            (perforce changelist number)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   231
          specify initial Perforce revision.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   232
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   233
      Mercurial Destination
12787
e8a8993b625e tests: fix up changed output
Matt Mackall <mpm@selenic.com>
parents: 12510
diff changeset
   234
      '''''''''''''''''''''
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   235
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   236
      --config convert.hg.clonebranches=False   (boolean)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   237
          dispatch source branches in separate clones.
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   238
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   239
      --config convert.hg.tagsbranch=default    (branch name)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   240
          tag revisions branch name
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   241
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   242
      --config convert.hg.usebranchnames=True   (boolean)
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   243
          preserve branch names
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   244
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   245
  options:
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   246
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   247
   -s --source-type TYPE  source repository type
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   248
   -d --dest-type TYPE    destination repository type
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   249
   -r --rev REV           import up to target revision REV
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   250
   -A --authormap FILE    remap usernames using this file
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   251
      --filemap FILE      remap file names using contents of file
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   252
      --splicemap FILE    splice synthesized history into place
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   253
      --branchmap FILE    change branch names while converting
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   254
      --branchsort        try to sort changesets by branches
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   255
      --datesort          try to sort changesets by date
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   256
      --sourcesort        preserve source changesets order
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   257
  
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   258
  use "hg -v help convert" to show global options
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   259
  $ hg init a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   260
  $ cd a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   261
  $ echo a > a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   262
  $ hg ci -d'0 0' -Ama
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   263
  adding a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   264
  $ hg cp a b
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   265
  $ hg ci -d'1 0' -mb
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   266
  $ hg rm a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   267
  $ hg ci -d'2 0' -mc
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   268
  $ hg mv b a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   269
  $ hg ci -d'3 0' -md
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   270
  $ echo a >> a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   271
  $ hg ci -d'4 0' -me
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   272
  $ cd ..
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   273
  $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded'
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   274
  assuming destination a-hg
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   275
  initializing destination a-hg repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   276
  scanning source...
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   277
  sorting...
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   278
  converting...
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   279
  4 a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   280
  3 b
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   281
  2 c
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   282
  1 d
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   283
  0 e
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   284
  $ hg --cwd a-hg pull ../a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   285
  pulling from ../a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   286
  searching for changes
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   287
  no changes found
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   288
  $ touch bogusfile
7905
d596b1f2935a convert: missing p4 tool is only slightly fatal
Mads Kiilerich <mads@kiilerich.com>
parents: 5805
diff changeset
   289
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   290
should fail
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   291
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   292
  $ hg convert a bogusfile
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   293
  initializing destination bogusfile repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   294
  abort: cannot create new bundle repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   295
  [255]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   296
  $ mkdir bogusdir
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   297
  $ chmod 000 bogusdir
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   298
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   299
should fail
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   300
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   301
  $ hg convert a bogusdir
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   302
  abort: Permission denied: bogusdir
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   303
  [255]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   304
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   305
should succeed
9962
a7178eccf2dc convert: better error on invalid repository type
Patrick Mezard <pmezard@gmail.com>
parents: 8674
diff changeset
   306
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   307
  $ chmod 700 bogusdir
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   308
  $ hg convert a bogusdir
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   309
  initializing destination bogusdir repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   310
  scanning source...
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   311
  sorting...
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   312
  converting...
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   313
  4 a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   314
  3 b
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   315
  2 c
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   316
  1 d
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   317
  0 e
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   318
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   319
test pre and post conversion actions
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   320
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   321
  $ echo 'include b' > filemap
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   322
  $ hg convert --debug --filemap filemap a partialb | \
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   323
  >     grep 'run hg'
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   324
  run hg source pre-conversion action
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   325
  run hg sink pre-conversion action
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   326
  run hg sink post-conversion action
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   327
  run hg source post-conversion action
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   328
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   329
converting empty dir should fail "nicely
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   330
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   331
  $ mkdir emptydir
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   332
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   333
override $PATH to ensure p4 not visible; use $PYTHON in case we're
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   334
running from a devel copy, not a temp installation
9962
a7178eccf2dc convert: better error on invalid repository type
Patrick Mezard <pmezard@gmail.com>
parents: 8674
diff changeset
   335
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   336
  $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   337
  assuming destination emptydir-hg
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   338
  initializing destination emptydir-hg repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   339
  emptydir does not look like a CVS checkout
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   340
  emptydir does not look like a Git repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   341
  emptydir does not look like a Subversion repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   342
  emptydir is not a local Mercurial repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   343
  emptydir does not look like a darcs repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   344
  emptydir does not look like a monotone repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   345
  emptydir does not look like a GNU Arch repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   346
  emptydir does not look like a Bazaar repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   347
  cannot find required "p4" tool
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   348
  abort: emptydir: missing or unsupported repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   349
  [255]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   350
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   351
convert with imaginary source type
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   352
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   353
  $ hg convert --source-type foo a a-foo
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   354
  initializing destination a-foo repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   355
  abort: foo: invalid source repository type
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   356
  [255]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   357
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   358
convert with imaginary sink type
10577
d5bd1beff794 store: only add new entries to the fncache file
Adrian Buehlmann <adrian@cadifra.com>
parents: 9962
diff changeset
   359
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   360
  $ hg convert --dest-type foo a a-foo
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   361
  abort: foo: invalid destination repository type
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   362
  [255]
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   363
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   364
testing: convert must not produce duplicate entries in fncache
10885
9e4d120e3c32 convert/subversion: fix default URL checker prototype
Patrick Mezard <pmezard@gmail.com>
parents: 10775
diff changeset
   365
12510
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   366
  $ hg convert a b
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   367
  initializing destination b repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   368
  scanning source...
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   369
  sorting...
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   370
  converting...
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   371
  4 a
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   372
  3 b
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   373
  2 c
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   374
  1 d
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   375
  0 e
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   376
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   377
contents of fncache file:
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   378
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   379
  $ cat b/.hg/store/fncache
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   380
  data/a.i
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   381
  data/b.i
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   382
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   383
test bogus URL
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   384
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   385
  $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   386
  abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository
efcbff270317 tests: unify test-convert
Matt Mackall <mpm@selenic.com>
parents: 10885
diff changeset
   387
  [255]