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