##// END OF EJS Templates
convert documentation: --config argument with spaces needs quoting.
Thomas Arendsen Hein -
r7170:aff204c9 default
parent child Browse files
Show More
@@ -1,199 +1,199
1 # convert.py Foreign SCM converter
1 # convert.py Foreign SCM converter
2 #
2 #
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms
5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference.
6 # of the GNU General Public License, incorporated herein by reference.
7 '''converting foreign VCS repositories to Mercurial'''
7 '''converting foreign VCS repositories to Mercurial'''
8
8
9 import convcmd
9 import convcmd
10 from mercurial import commands
10 from mercurial import commands
11 from mercurial.i18n import _
11 from mercurial.i18n import _
12
12
13 # Commands definition was moved elsewhere to ease demandload job.
13 # Commands definition was moved elsewhere to ease demandload job.
14
14
15 def convert(ui, src, dest=None, revmapfile=None, **opts):
15 def convert(ui, src, dest=None, revmapfile=None, **opts):
16 """Convert a foreign SCM repository to a Mercurial one.
16 """Convert a foreign SCM repository to a Mercurial one.
17
17
18 Accepted source formats [identifiers]:
18 Accepted source formats [identifiers]:
19 - Mercurial [hg]
19 - Mercurial [hg]
20 - CVS [cvs]
20 - CVS [cvs]
21 - Darcs [darcs]
21 - Darcs [darcs]
22 - git [git]
22 - git [git]
23 - Subversion [svn]
23 - Subversion [svn]
24 - Monotone [mtn]
24 - Monotone [mtn]
25 - GNU Arch [gnuarch]
25 - GNU Arch [gnuarch]
26 - Bazaar [bzr]
26 - Bazaar [bzr]
27
27
28 Accepted destination formats [identifiers]:
28 Accepted destination formats [identifiers]:
29 - Mercurial [hg]
29 - Mercurial [hg]
30 - Subversion [svn] (history on branches is not preserved)
30 - Subversion [svn] (history on branches is not preserved)
31
31
32 If no revision is given, all revisions will be converted. Otherwise,
32 If no revision is given, all revisions will be converted. Otherwise,
33 convert will only import up to the named revision (given in a format
33 convert will only import up to the named revision (given in a format
34 understood by the source).
34 understood by the source).
35
35
36 If no destination directory name is specified, it defaults to the
36 If no destination directory name is specified, it defaults to the
37 basename of the source with '-hg' appended. If the destination
37 basename of the source with '-hg' appended. If the destination
38 repository doesn't exist, it will be created.
38 repository doesn't exist, it will be created.
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
41 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text
42 file that maps each source commit ID to the destination ID for
42 file that maps each source commit ID to the destination ID for
43 that revision, like so:
43 that revision, like so:
44 <source ID> <destination ID>
44 <source ID> <destination ID>
45
45
46 If the file doesn't exist, it's automatically created. It's updated
46 If the file doesn't exist, it's automatically created. It's updated
47 on each commit copied, so convert-repo can be interrupted and can
47 on each commit copied, so convert-repo can be interrupted and can
48 be run repeatedly to copy new commits.
48 be run repeatedly to copy new commits.
49
49
50 The [username mapping] file is a simple text file that maps each source
50 The [username mapping] file is a simple text file that maps each source
51 commit author to a destination commit author. It is handy for source SCMs
51 commit author to a destination commit author. It is handy for source SCMs
52 that use unix logins to identify authors (eg: CVS). One line per author
52 that use unix logins to identify authors (eg: CVS). One line per author
53 mapping and the line format is:
53 mapping and the line format is:
54 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
56 The filemap is a file that allows filtering and remapping of files
57 and directories. Comment lines start with '#'. Each line can
57 and directories. Comment lines start with '#'. Each line can
58 contain one of 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
67 directory, to be included in the destination repository, and the
67 directory, to be included in the destination repository, and the
68 exclusion of all other files and dirs not explicitely included.
68 exclusion of all other files and dirs not explicitely included.
69 The 'exclude' directive causes files or directories to be omitted.
69 The 'exclude' directive causes files or directories to be omitted.
70 The 'rename' directive renames a file or directory. To rename from a
70 The 'rename' directive renames a file or directory. To rename from a
71 subdirectory into the root of the repository, use '.' as the path to
71 subdirectory into the root of the repository, use '.' as the path to
72 rename to.
72 rename to.
73
73
74 The splicemap is a file that allows insertion of synthetic
74 The splicemap is a file that allows insertion of synthetic
75 history, letting you specify the parents of a revision. This is
75 history, letting you specify the parents of a revision. This is
76 useful if you want to e.g. give a Subversion merge two parents, or
76 useful if you want to e.g. give a Subversion merge two parents, or
77 graft two disconnected series of history together. Each entry
77 graft two disconnected series of history together. Each entry
78 contains a key, followed by a space, followed by one or two
78 contains a key, followed by a space, followed by one or two
79 values, separated by spaces. The key is the revision ID in the
79 values, separated by spaces. The key is the revision ID in the
80 source revision control system whose parents should be modified
80 source revision control system whose parents should be modified
81 (same format as a key in .hg/shamap). The values are the revision
81 (same format as a key in .hg/shamap). The values are the revision
82 IDs (in either the source or destination revision control system)
82 IDs (in either the source or destination revision control system)
83 that should be used as the new parents for that node.
83 that should be used as the new parents for that node.
84
84
85 Mercurial Source
85 Mercurial Source
86 -----------------
86 -----------------
87
87
88 --config convert.hg.saverev=True (boolean)
88 --config convert.hg.saverev=True (boolean)
89 allow target to preserve source revision ID
89 allow target to preserve source revision ID
90 --config convert.hg.startrev=0 (hg revision identifier)
90 --config convert.hg.startrev=0 (hg revision identifier)
91 convert start revision and its descendants
91 convert start revision and its descendants
92
92
93 CVS Source
93 CVS Source
94 ----------
94 ----------
95
95
96 CVS source will use a sandbox (i.e. a checked-out copy) from CVS
96 CVS source will use a sandbox (i.e. a checked-out copy) from CVS
97 to indicate the starting point of what will be converted. Direct
97 to indicate the starting point of what will be converted. Direct
98 access to the repository files is not needed, unless of course
98 access to the repository files is not needed, unless of course
99 the repository is :local:. The conversion uses the top level
99 the repository is :local:. The conversion uses the top level
100 directory in the sandbox to find the CVS repository, and then uses
100 directory in the sandbox to find the CVS repository, and then uses
101 CVS rlog commands to find files to convert. This means that unless
101 CVS rlog commands to find files to convert. This means that unless
102 a filemap is given, all files under the starting directory will be
102 a filemap is given, all files under the starting directory will be
103 converted, and that any directory reorganisation in the CVS
103 converted, and that any directory reorganisation in the CVS
104 sandbox is ignored.
104 sandbox is ignored.
105
105
106 Because CVS does not have changesets, it is necessary to collect
106 Because CVS does not have changesets, it is necessary to collect
107 individual commits to CVS and merge them into changesets. CVS
107 individual commits to CVS and merge them into changesets. CVS
108 source uses its internal changeset merging code by default but can
108 source uses its internal changeset merging code by default but can
109 be configured to call the external 'cvsps' program by setting:
109 be configured to call the external 'cvsps' program by setting:
110 --config convert.cvsps=cvsps -A -u --cvs-direct -q
110 --config convert.cvsps='cvsps -A -u --cvs-direct -q'
111 This is a legacy option and may be removed in future.
111 This is a legacy option and may be removed in future.
112
112
113 The options shown are the defaults.
113 The options shown are the defaults.
114
114
115 Internal cvsps is selected by setting
115 Internal cvsps is selected by setting
116 --config convert.cvsps=builtin
116 --config convert.cvsps=builtin
117 and has a few more configurable options:
117 and has a few more configurable options:
118 --config convert.cvsps.fuzz=60 (integer)
118 --config convert.cvsps.fuzz=60 (integer)
119 Specify the maximum time (in seconds) that is allowed between
119 Specify the maximum time (in seconds) that is allowed between
120 commits with identical user and log message in a single
120 commits with identical user and log message in a single
121 changeset. When very large files were checked in as part
121 changeset. When very large files were checked in as part
122 of a changeset then the default may not be long enough.
122 of a changeset then the default may not be long enough.
123 --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}'
123 --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}'
124 Specify a regular expression to which commit log messages are
124 Specify a regular expression to which commit log messages are
125 matched. If a match occurs, then the conversion process will
125 matched. If a match occurs, then the conversion process will
126 insert a dummy revision merging the branch on which this log
126 insert a dummy revision merging the branch on which this log
127 message occurs to the branch indicated in the regex.
127 message occurs to the branch indicated in the regex.
128 --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}'
128 --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}'
129 Specify a regular expression to which commit log messages are
129 Specify a regular expression to which commit log messages are
130 matched. If a match occurs, then the conversion process will
130 matched. If a match occurs, then the conversion process will
131 add the most recent revision on the branch indicated in the
131 add the most recent revision on the branch indicated in the
132 regex as the second parent of the changeset.
132 regex as the second parent of the changeset.
133
133
134 The hgext/convert/cvsps wrapper script allows the builtin changeset
134 The hgext/convert/cvsps wrapper script allows the builtin changeset
135 merging code to be run without doing a conversion. Its parameters and
135 merging code to be run without doing a conversion. Its parameters and
136 output are similar to that of cvsps 2.1.
136 output are similar to that of cvsps 2.1.
137
137
138 Subversion Source
138 Subversion Source
139 -----------------
139 -----------------
140
140
141 Subversion source detects classical trunk/branches/tags layouts.
141 Subversion source detects classical trunk/branches/tags layouts.
142 By default, the supplied "svn://repo/path/" source URL is
142 By default, the supplied "svn://repo/path/" source URL is
143 converted as a single branch. If "svn://repo/path/trunk" exists
143 converted as a single branch. If "svn://repo/path/trunk" exists
144 it replaces the default branch. If "svn://repo/path/branches"
144 it replaces the default branch. If "svn://repo/path/branches"
145 exists, its subdirectories are listed as possible branches. If
145 exists, its subdirectories are listed as possible branches. If
146 "svn://repo/path/tags" exists, it is looked for tags referencing
146 "svn://repo/path/tags" exists, it is looked for tags referencing
147 converted branches. Default "trunk", "branches" and "tags" values
147 converted branches. Default "trunk", "branches" and "tags" values
148 can be overriden with following options. Set them to paths
148 can be overriden with following options. Set them to paths
149 relative to the source URL, or leave them blank to disable
149 relative to the source URL, or leave them blank to disable
150 autodetection.
150 autodetection.
151
151
152 --config convert.svn.branches=branches (directory name)
152 --config convert.svn.branches=branches (directory name)
153 specify the directory containing branches
153 specify the directory containing branches
154 --config convert.svn.tags=tags (directory name)
154 --config convert.svn.tags=tags (directory name)
155 specify the directory containing tags
155 specify the directory containing tags
156 --config convert.svn.trunk=trunk (directory name)
156 --config convert.svn.trunk=trunk (directory name)
157 specify the name of the trunk branch
157 specify the name of the trunk branch
158
158
159 Source history can be retrieved starting at a specific revision,
159 Source history can be retrieved starting at a specific revision,
160 instead of being integrally converted. Only single branch
160 instead of being integrally converted. Only single branch
161 conversions are supported.
161 conversions are supported.
162
162
163 --config convert.svn.startrev=0 (svn revision number)
163 --config convert.svn.startrev=0 (svn revision number)
164 specify start Subversion revision.
164 specify start Subversion revision.
165
165
166 Mercurial Destination
166 Mercurial Destination
167 ---------------------
167 ---------------------
168
168
169 --config convert.hg.clonebranches=False (boolean)
169 --config convert.hg.clonebranches=False (boolean)
170 dispatch source branches in separate clones.
170 dispatch source branches in separate clones.
171 --config convert.hg.tagsbranch=default (branch name)
171 --config convert.hg.tagsbranch=default (branch name)
172 tag revisions branch name
172 tag revisions branch name
173 --config convert.hg.usebranchnames=True (boolean)
173 --config convert.hg.usebranchnames=True (boolean)
174 preserve branch names
174 preserve branch names
175
175
176 """
176 """
177 return convcmd.convert(ui, src, dest, revmapfile, **opts)
177 return convcmd.convert(ui, src, dest, revmapfile, **opts)
178
178
179 def debugsvnlog(ui, **opts):
179 def debugsvnlog(ui, **opts):
180 return convcmd.debugsvnlog(ui, **opts)
180 return convcmd.debugsvnlog(ui, **opts)
181
181
182 commands.norepo += " convert debugsvnlog"
182 commands.norepo += " convert debugsvnlog"
183
183
184 cmdtable = {
184 cmdtable = {
185 "convert":
185 "convert":
186 (convert,
186 (convert,
187 [('A', 'authors', '', _('username mapping filename')),
187 [('A', 'authors', '', _('username mapping filename')),
188 ('d', 'dest-type', '', _('destination repository type')),
188 ('d', 'dest-type', '', _('destination repository type')),
189 ('', 'filemap', '', _('remap file names using contents of file')),
189 ('', 'filemap', '', _('remap file names using contents of file')),
190 ('r', 'rev', '', _('import up to target revision REV')),
190 ('r', 'rev', '', _('import up to target revision REV')),
191 ('s', 'source-type', '', _('source repository type')),
191 ('s', 'source-type', '', _('source repository type')),
192 ('', 'splicemap', '', _('splice synthesized history into place')),
192 ('', 'splicemap', '', _('splice synthesized history into place')),
193 ('', 'datesort', None, _('try to sort changesets by date'))],
193 ('', 'datesort', None, _('try to sort changesets by date'))],
194 _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]')),
194 _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]')),
195 "debugsvnlog":
195 "debugsvnlog":
196 (debugsvnlog,
196 (debugsvnlog,
197 [],
197 [],
198 'hg debugsvnlog'),
198 'hg debugsvnlog'),
199 }
199 }
@@ -1,207 +1,207
1 hg convert [OPTION]... SOURCE [DEST [REVMAP]]
1 hg convert [OPTION]... SOURCE [DEST [REVMAP]]
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 [identifiers]:
5 Accepted source formats [identifiers]:
6 - Mercurial [hg]
6 - Mercurial [hg]
7 - CVS [cvs]
7 - CVS [cvs]
8 - Darcs [darcs]
8 - Darcs [darcs]
9 - git [git]
9 - git [git]
10 - Subversion [svn]
10 - Subversion [svn]
11 - Monotone [mtn]
11 - Monotone [mtn]
12 - GNU Arch [gnuarch]
12 - GNU Arch [gnuarch]
13 - Bazaar [bzr]
13 - Bazaar [bzr]
14
14
15 Accepted destination formats [identifiers]:
15 Accepted destination formats [identifiers]:
16 - Mercurial [hg]
16 - Mercurial [hg]
17 - Subversion [svn] (history on branches is not preserved)
17 - Subversion [svn] (history on branches is not preserved)
18
18
19 If no revision is given, all revisions will be converted. Otherwise,
19 If no revision is given, all revisions will be converted. Otherwise,
20 convert will only import up to the named revision (given in a format
20 convert will only import up to the named revision (given in a format
21 understood by the source).
21 understood by the source).
22
22
23 If no destination directory name is specified, it defaults to the
23 If no destination directory name is specified, it defaults to the
24 basename of the source with '-hg' appended. If the destination
24 basename of the source with '-hg' appended. If the destination
25 repository doesn't exist, it will be created.
25 repository doesn't exist, it will be created.
26
26
27 If <REVMAP> isn't given, it will be put in a default location
27 If <REVMAP> isn't given, it will be put in a default location
28 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text
28 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text
29 file that maps each source commit ID to the destination ID for
29 file that maps each source commit ID to the destination ID for
30 that revision, like so:
30 that revision, like so:
31 <source ID> <destination ID>
31 <source ID> <destination ID>
32
32
33 If the file doesn't exist, it's automatically created. It's updated
33 If the file doesn't exist, it's automatically created. It's updated
34 on each commit copied, so convert-repo can be interrupted and can
34 on each commit copied, so convert-repo can be interrupted and can
35 be run repeatedly to copy new commits.
35 be run repeatedly to copy new commits.
36
36
37 The [username mapping] file is a simple text file that maps each source
37 The [username mapping] file is a simple text file that maps each source
38 commit author to a destination commit author. It is handy for source SCMs
38 commit author to a destination commit author. It is handy for source SCMs
39 that use unix logins to identify authors (eg: CVS). One line per author
39 that use unix logins to identify authors (eg: CVS). One line per author
40 mapping and the line format is:
40 mapping and the line format is:
41 srcauthor=whatever string you want
41 srcauthor=whatever string you want
42
42
43 The filemap is a file that allows filtering and remapping of files
43 The filemap is a file that allows filtering and remapping of files
44 and directories. Comment lines start with '#'. Each line can
44 and directories. Comment lines start with '#'. Each line can
45 contain one of the following directives:
45 contain one of the following directives:
46
46
47 include path/to/file
47 include path/to/file
48
48
49 exclude path/to/file
49 exclude path/to/file
50
50
51 rename from/file to/file
51 rename from/file to/file
52
52
53 The 'include' directive causes a file, or all files under a
53 The 'include' directive causes a file, or all files under a
54 directory, to be included in the destination repository, and the
54 directory, to be included in the destination repository, and the
55 exclusion of all other files and dirs not explicitely included.
55 exclusion of all other files and dirs not explicitely included.
56 The 'exclude' directive causes files or directories to be omitted.
56 The 'exclude' directive causes files or directories to be omitted.
57 The 'rename' directive renames a file or directory. To rename from a
57 The 'rename' directive renames a file or directory. To rename from a
58 subdirectory into the root of the repository, use '.' as the path to
58 subdirectory into the root of the repository, use '.' as the path to
59 rename to.
59 rename to.
60
60
61 The splicemap is a file that allows insertion of synthetic
61 The splicemap is a file that allows insertion of synthetic
62 history, letting you specify the parents of a revision. This is
62 history, letting you specify the parents of a revision. This is
63 useful if you want to e.g. give a Subversion merge two parents, or
63 useful if you want to e.g. give a Subversion merge two parents, or
64 graft two disconnected series of history together. Each entry
64 graft two disconnected series of history together. Each entry
65 contains a key, followed by a space, followed by one or two
65 contains a key, followed by a space, followed by one or two
66 values, separated by spaces. The key is the revision ID in the
66 values, separated by spaces. The key is the revision ID in the
67 source revision control system whose parents should be modified
67 source revision control system whose parents should be modified
68 (same format as a key in .hg/shamap). The values are the revision
68 (same format as a key in .hg/shamap). The values are the revision
69 IDs (in either the source or destination revision control system)
69 IDs (in either the source or destination revision control system)
70 that should be used as the new parents for that node.
70 that should be used as the new parents for that node.
71
71
72 Mercurial Source
72 Mercurial Source
73 -----------------
73 -----------------
74
74
75 --config convert.hg.saverev=True (boolean)
75 --config convert.hg.saverev=True (boolean)
76 allow target to preserve source revision ID
76 allow target to preserve source revision ID
77 --config convert.hg.startrev=0 (hg revision identifier)
77 --config convert.hg.startrev=0 (hg revision identifier)
78 convert start revision and its descendants
78 convert start revision and its descendants
79
79
80 CVS Source
80 CVS Source
81 ----------
81 ----------
82
82
83 CVS source will use a sandbox (i.e. a checked-out copy) from CVS
83 CVS source will use a sandbox (i.e. a checked-out copy) from CVS
84 to indicate the starting point of what will be converted. Direct
84 to indicate the starting point of what will be converted. Direct
85 access to the repository files is not needed, unless of course
85 access to the repository files is not needed, unless of course
86 the repository is :local:. The conversion uses the top level
86 the repository is :local:. The conversion uses the top level
87 directory in the sandbox to find the CVS repository, and then uses
87 directory in the sandbox to find the CVS repository, and then uses
88 CVS rlog commands to find files to convert. This means that unless
88 CVS rlog commands to find files to convert. This means that unless
89 a filemap is given, all files under the starting directory will be
89 a filemap is given, all files under the starting directory will be
90 converted, and that any directory reorganisation in the CVS
90 converted, and that any directory reorganisation in the CVS
91 sandbox is ignored.
91 sandbox is ignored.
92
92
93 Because CVS does not have changesets, it is necessary to collect
93 Because CVS does not have changesets, it is necessary to collect
94 individual commits to CVS and merge them into changesets. CVS
94 individual commits to CVS and merge them into changesets. CVS
95 source uses its internal changeset merging code by default but can
95 source uses its internal changeset merging code by default but can
96 be configured to call the external 'cvsps' program by setting:
96 be configured to call the external 'cvsps' program by setting:
97 --config convert.cvsps=cvsps -A -u --cvs-direct -q
97 --config convert.cvsps='cvsps -A -u --cvs-direct -q'
98 This is a legacy option and may be removed in future.
98 This is a legacy option and may be removed in future.
99
99
100 The options shown are the defaults.
100 The options shown are the defaults.
101
101
102 Internal cvsps is selected by setting
102 Internal cvsps is selected by setting
103 --config convert.cvsps=builtin
103 --config convert.cvsps=builtin
104 and has a few more configurable options:
104 and has a few more configurable options:
105 --config convert.cvsps.fuzz=60 (integer)
105 --config convert.cvsps.fuzz=60 (integer)
106 Specify the maximum time (in seconds) that is allowed between
106 Specify the maximum time (in seconds) that is allowed between
107 commits with identical user and log message in a single
107 commits with identical user and log message in a single
108 changeset. When very large files were checked in as part
108 changeset. When very large files were checked in as part
109 of a changeset then the default may not be long enough.
109 of a changeset then the default may not be long enough.
110 --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}'
110 --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}'
111 Specify a regular expression to which commit log messages are
111 Specify a regular expression to which commit log messages are
112 matched. If a match occurs, then the conversion process will
112 matched. If a match occurs, then the conversion process will
113 insert a dummy revision merging the branch on which this log
113 insert a dummy revision merging the branch on which this log
114 message occurs to the branch indicated in the regex.
114 message occurs to the branch indicated in the regex.
115 --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}'
115 --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}'
116 Specify a regular expression to which commit log messages are
116 Specify a regular expression to which commit log messages are
117 matched. If a match occurs, then the conversion process will
117 matched. If a match occurs, then the conversion process will
118 add the most recent revision on the branch indicated in the
118 add the most recent revision on the branch indicated in the
119 regex as the second parent of the changeset.
119 regex as the second parent of the changeset.
120
120
121 The hgext/convert/cvsps wrapper script allows the builtin changeset
121 The hgext/convert/cvsps wrapper script allows the builtin changeset
122 merging code to be run without doing a conversion. Its parameters and
122 merging code to be run without doing a conversion. Its parameters and
123 output are similar to that of cvsps 2.1.
123 output are similar to that of cvsps 2.1.
124
124
125 Subversion Source
125 Subversion Source
126 -----------------
126 -----------------
127
127
128 Subversion source detects classical trunk/branches/tags layouts.
128 Subversion source detects classical trunk/branches/tags layouts.
129 By default, the supplied "svn://repo/path/" source URL is
129 By default, the supplied "svn://repo/path/" source URL is
130 converted as a single branch. If "svn://repo/path/trunk" exists
130 converted as a single branch. If "svn://repo/path/trunk" exists
131 it replaces the default branch. If "svn://repo/path/branches"
131 it replaces the default branch. If "svn://repo/path/branches"
132 exists, its subdirectories are listed as possible branches. If
132 exists, its subdirectories are listed as possible branches. If
133 "svn://repo/path/tags" exists, it is looked for tags referencing
133 "svn://repo/path/tags" exists, it is looked for tags referencing
134 converted branches. Default "trunk", "branches" and "tags" values
134 converted branches. Default "trunk", "branches" and "tags" values
135 can be overriden with following options. Set them to paths
135 can be overriden with following options. Set them to paths
136 relative to the source URL, or leave them blank to disable
136 relative to the source URL, or leave them blank to disable
137 autodetection.
137 autodetection.
138
138
139 --config convert.svn.branches=branches (directory name)
139 --config convert.svn.branches=branches (directory name)
140 specify the directory containing branches
140 specify the directory containing branches
141 --config convert.svn.tags=tags (directory name)
141 --config convert.svn.tags=tags (directory name)
142 specify the directory containing tags
142 specify the directory containing tags
143 --config convert.svn.trunk=trunk (directory name)
143 --config convert.svn.trunk=trunk (directory name)
144 specify the name of the trunk branch
144 specify the name of the trunk branch
145
145
146 Source history can be retrieved starting at a specific revision,
146 Source history can be retrieved starting at a specific revision,
147 instead of being integrally converted. Only single branch
147 instead of being integrally converted. Only single branch
148 conversions are supported.
148 conversions are supported.
149
149
150 --config convert.svn.startrev=0 (svn revision number)
150 --config convert.svn.startrev=0 (svn revision number)
151 specify start Subversion revision.
151 specify start Subversion revision.
152
152
153 Mercurial Destination
153 Mercurial Destination
154 ---------------------
154 ---------------------
155
155
156 --config convert.hg.clonebranches=False (boolean)
156 --config convert.hg.clonebranches=False (boolean)
157 dispatch source branches in separate clones.
157 dispatch source branches in separate clones.
158 --config convert.hg.tagsbranch=default (branch name)
158 --config convert.hg.tagsbranch=default (branch name)
159 tag revisions branch name
159 tag revisions branch name
160 --config convert.hg.usebranchnames=True (boolean)
160 --config convert.hg.usebranchnames=True (boolean)
161 preserve branch names
161 preserve branch names
162
162
163 options:
163 options:
164
164
165 -A --authors username mapping filename
165 -A --authors username mapping filename
166 -d --dest-type destination repository type
166 -d --dest-type destination repository type
167 --filemap remap file names using contents of file
167 --filemap remap file names using contents of file
168 -r --rev import up to target revision REV
168 -r --rev import up to target revision REV
169 -s --source-type source repository type
169 -s --source-type source repository type
170 --splicemap splice synthesized history into place
170 --splicemap splice synthesized history into place
171 --datesort try to sort changesets by date
171 --datesort try to sort changesets by date
172
172
173 use "hg -v help convert" to show global options
173 use "hg -v help convert" to show global options
174 adding a
174 adding a
175 assuming destination a-hg
175 assuming destination a-hg
176 initializing destination a-hg repository
176 initializing destination a-hg repository
177 scanning source...
177 scanning source...
178 sorting...
178 sorting...
179 converting...
179 converting...
180 4 a
180 4 a
181 3 b
181 3 b
182 2 c
182 2 c
183 1 d
183 1 d
184 0 e
184 0 e
185 pulling from ../a
185 pulling from ../a
186 searching for changes
186 searching for changes
187 no changes found
187 no changes found
188 % should fail
188 % should fail
189 initializing destination bogusfile repository
189 initializing destination bogusfile repository
190 abort: cannot create new bundle repository
190 abort: cannot create new bundle repository
191 % should fail
191 % should fail
192 abort: Permission denied: bogusdir
192 abort: Permission denied: bogusdir
193 % should succeed
193 % should succeed
194 initializing destination bogusdir repository
194 initializing destination bogusdir repository
195 scanning source...
195 scanning source...
196 sorting...
196 sorting...
197 converting...
197 converting...
198 4 a
198 4 a
199 3 b
199 3 b
200 2 c
200 2 c
201 1 d
201 1 d
202 0 e
202 0 e
203 % test pre and post conversion actions
203 % test pre and post conversion actions
204 run hg source pre-conversion action
204 run hg source pre-conversion action
205 run hg sink pre-conversion action
205 run hg sink pre-conversion action
206 run hg sink post-conversion action
206 run hg sink post-conversion action
207 run hg source post-conversion action
207 run hg source post-conversion action
General Comments 0
You need to be logged in to leave comments. Login now