##// END OF EJS Templates
Fix test-convert.out after 55455556f921
Patrick Mezard -
r6170:747169c5 default
parent child Browse files
Show More
@@ -1,132 +1,150 b''
1 1 hg convert [OPTION]... SOURCE [DEST [MAPFILE]]
2 2
3 3 Convert a foreign SCM repository to a Mercurial one.
4 4
5 5 Accepted source formats:
6 6 - Mercurial
7 7 - CVS
8 8 - Darcs
9 9 - git
10 10 - Subversion
11 11 - GNU Arch
12 12
13 13 Accepted destination formats:
14 14 - Mercurial
15 15 - Subversion (history on branches is not preserved)
16 16
17 17 If no revision is given, all revisions will be converted. Otherwise,
18 18 convert will only import up to the named revision (given in a format
19 19 understood by the source).
20 20
21 21 If no destination directory name is specified, it defaults to the
22 22 basename of the source with '-hg' appended. If the destination
23 23 repository doesn't exist, it will be created.
24 24
25 25 If <MAPFILE> isn't given, it will be put in a default location
26 26 (<dest>/.hg/shamap by default). The <MAPFILE> is a simple text
27 27 file that maps each source commit ID to the destination ID for
28 28 that revision, like so:
29 29 <source ID> <destination ID>
30 30
31 31 If the file doesn't exist, it's automatically created. It's updated
32 32 on each commit copied, so convert-repo can be interrupted and can
33 33 be run repeatedly to copy new commits.
34 34
35 35 The [username mapping] file is a simple text file that maps each source
36 36 commit author to a destination commit author. It is handy for source SCMs
37 37 that use unix logins to identify authors (eg: CVS). One line per author
38 38 mapping and the line format is:
39 39 srcauthor=whatever string you want
40 40
41 41 The filemap is a file that allows filtering and remapping of files
42 42 and directories. Comment lines start with '#'. Each line can
43 43 contain one of the following directives:
44 44
45 45 include path/to/file
46 46
47 47 exclude path/to/file
48 48
49 49 rename from/file to/file
50 50
51 51 The 'include' directive causes a file, or all files under a
52 52 directory, to be included in the destination repository, and the
53 53 exclusion of all other files and dirs not explicitely included.
54 54 The 'exclude' directive causes files or directories to be omitted.
55 55 The 'rename' directive renames a file or directory. To rename from a
56 56 subdirectory into the root of the repository, use '.' as the path to
57 57 rename to.
58 58
59 59 The splicemap is a file that allows insertion of synthetic
60 60 history, letting you specify the parents of a revision. This is
61 61 useful if you want to e.g. give a Subversion merge two parents, or
62 62 graft two disconnected series of history together. Each entry
63 63 contains a key, followed by a space, followed by one or two
64 64 values, separated by spaces. The key is the revision ID in the
65 65 source revision control system whose parents should be modified
66 66 (same format as a key in .hg/shamap). The values are the revision
67 67 IDs (in either the source or destination revision control system)
68 68 that should be used as the new parents for that node.
69 69
70 Back end options:
70 Mercurial Source
71 -----------------
72
73 --config convert.hg.saverev=True (boolean)
74 allow target to preserve source revision ID
75
76 Subversion Source
77 -----------------
78
79 Subversion source detects classical trunk/branches/tags layouts.
80 By default, the supplied "svn://repo/path/" source URL is
81 converted as a single branch. If "svn://repo/path/trunk" exists
82 it replaces the default branch. If "svn://repo/path/branches"
83 exists, its subdirectories are listed as possible branches. If
84 "svn://repo/path/tags" exists, it is looked for tags referencing
85 converted branches. Default "trunk", "branches" and "tags" values
86 can be overriden with following options. Set them to paths
87 relative to the source URL.
88
89 --config convert.svn.branches=branches (directory name)
90 specify the directory containing branches
91 --config convert.svn.tags=tags (directory name)
92 specify the directory containing tags
93 --config convert.svn.trunk=trunk (directory name)
94 specify the name of the trunk branch
95
96 Mercurial Destination
97 ---------------------
71 98
72 99 --config convert.hg.clonebranches=False (boolean)
73 hg target: XXX not documented
74 --config convert.hg.saverev=True (boolean)
75 hg source: allow target to preserve source revision ID
100 dispatch source branches in separate clones.
76 101 --config convert.hg.tagsbranch=default (branch name)
77 hg target: XXX not documented
102 tag revisions branch name
78 103 --config convert.hg.usebranchnames=True (boolean)
79 hg target: preserve branch names
80
81 --config convert.svn.branches=branches (directory name)
82 svn source: specify the directory containing branches
83 --config convert.svn.tags=tags (directory name)
84 svn source: specify the directory containing tags
85 --config convert.svn.trunk=trunk (directory name)
86 svn source: specify the name of the trunk branch
104 preserve branch names
87 105
88 106 options:
89 107
90 108 -A --authors username mapping filename
91 109 -d --dest-type destination repository type
92 110 --filemap remap file names using contents of file
93 111 -r --rev import up to target revision REV
94 112 -s --source-type source repository type
95 113 --splicemap splice synthesized history into place
96 114 --datesort try to sort changesets by date
97 115
98 116 use "hg -v help convert" to show global options
99 117 adding a
100 118 assuming destination a-hg
101 119 initializing destination a-hg repository
102 120 scanning source...
103 121 sorting...
104 122 converting...
105 123 4 a
106 124 3 b
107 125 2 c
108 126 1 d
109 127 0 e
110 128 pulling from ../a
111 129 searching for changes
112 130 no changes found
113 131 % should fail
114 132 initializing destination bogusfile repository
115 133 abort: cannot create new bundle repository
116 134 % should fail
117 135 abort: Permission denied: bogusdir
118 136 % should succeed
119 137 initializing destination bogusdir repository
120 138 scanning source...
121 139 sorting...
122 140 converting...
123 141 4 a
124 142 3 b
125 143 2 c
126 144 1 d
127 145 0 e
128 146 % test pre and post conversion actions
129 147 run hg source pre-conversion action
130 148 run hg sink pre-conversion action
131 149 run hg sink post-conversion action
132 150 run hg source post-conversion action
General Comments 0
You need to be logged in to leave comments. Login now