15 |
15 |
16 Accepted destination formats [identifiers]: |
16 Accepted destination formats [identifiers]: |
17 - Mercurial [hg] |
17 - Mercurial [hg] |
18 - Subversion [svn] (history on branches is not preserved) |
18 - Subversion [svn] (history on branches is not preserved) |
19 |
19 |
20 If no revision is given, all revisions will be converted. Otherwise, |
20 If no revision is given, all revisions will be converted. |
21 convert will only import up to the named revision (given in a format |
21 Otherwise, convert will only import up to the named revision |
22 understood by the source). |
22 (given in a format understood by the source). |
23 |
23 |
24 If no destination directory name is specified, it defaults to the |
24 If no destination directory name is specified, it defaults to the |
25 basename of the source with '-hg' appended. If the destination |
25 basename of the source with '-hg' appended. If the destination |
26 repository doesn't exist, it will be created. |
26 repository doesn't exist, it will be created. |
27 |
27 |
28 If <REVMAP> isn't given, it will be put in a default location |
28 If <REVMAP> isn't given, it will be put in a default location |
29 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text |
29 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file |
30 file that maps each source commit ID to the destination ID for |
30 that maps each source commit ID to the destination ID for that |
31 that revision, like so: |
31 revision, like so: |
32 <source ID> <destination ID> |
32 <source ID> <destination ID> |
33 |
33 |
34 If the file doesn't exist, it's automatically created. It's updated |
34 If the file doesn't exist, it's automatically created. It's |
35 on each commit copied, so convert-repo can be interrupted and can |
35 updated on each commit copied, so convert-repo can be interrupted |
36 be run repeatedly to copy new commits. |
36 and can be run repeatedly to copy new commits. |
37 |
37 |
38 The [username mapping] file is a simple text file that maps each source |
38 The [username mapping] file is a simple text file that maps each |
39 commit author to a destination commit author. It is handy for source SCMs |
39 source commit author to a destination commit author. It is handy |
40 that use unix logins to identify authors (eg: CVS). One line per author |
40 for source SCMs that use unix logins to identify authors (eg: |
41 mapping and the line format is: |
41 CVS). One line per author mapping and the line format is: |
42 srcauthor=whatever string you want |
42 srcauthor=whatever string you want |
43 |
43 |
44 The filemap is a file that allows filtering and remapping of files |
44 The filemap is a file that allows filtering and remapping of files |
45 and directories. Comment lines start with '#'. Each line can |
45 and directories. Comment lines start with '#'. Each line can |
46 contain one of the following directives: |
46 contain one of the following directives: |
53 |
53 |
54 The 'include' directive causes a file, or all files under a |
54 The 'include' directive causes a file, or all files under a |
55 directory, to be included in the destination repository, and the |
55 directory, to be included in the destination repository, and the |
56 exclusion of all other files and dirs not explicitely included. |
56 exclusion of all other files and dirs not explicitely included. |
57 The 'exclude' directive causes files or directories to be omitted. |
57 The 'exclude' directive causes files or directories to be omitted. |
58 The 'rename' directive renames a file or directory. To rename from a |
58 The 'rename' directive renames a file or directory. To rename from |
59 subdirectory into the root of the repository, use '.' as the path to |
59 a subdirectory into the root of the repository, use '.' as the |
60 rename to. |
60 path to rename to. |
61 |
61 |
62 The splicemap is a file that allows insertion of synthetic |
62 The splicemap is a file that allows insertion of synthetic |
63 history, letting you specify the parents of a revision. This is |
63 history, letting you specify the parents of a revision. This is |
64 useful if you want to e.g. give a Subversion merge two parents, or |
64 useful if you want to e.g. give a Subversion merge two parents, or |
65 graft two disconnected series of history together. Each entry |
65 graft two disconnected series of history together. Each entry |
66 contains a key, followed by a space, followed by one or two |
66 contains a key, followed by a space, followed by one or two |
67 comma-separated values. The key is the revision ID in the |
67 comma-separated values. The key is the revision ID in the source |
68 source revision control system whose parents should be modified |
68 revision control system whose parents should be modified (same |
69 (same format as a key in .hg/shamap). The values are the revision |
69 format as a key in .hg/shamap). The values are the revision IDs |
70 IDs (in either the source or destination revision control system) |
70 (in either the source or destination revision control system) that |
71 that should be used as the new parents for that node. |
71 should be used as the new parents for that node. |
72 |
72 |
73 Mercurial Source |
73 Mercurial Source |
74 ----------------- |
74 ----------------- |
75 |
75 |
76 --config convert.hg.ignoreerrors=False (boolean) |
76 --config convert.hg.ignoreerrors=False (boolean) |
77 ignore integrity errors when reading. Use it to fix Mercurial |
77 ignore integrity errors when reading. Use it to fix Mercurial |
78 repositories with missing revlogs, by converting from and to |
78 repositories with missing revlogs, by converting from and to |
79 Mercurial. |
79 Mercurial. |
80 --config convert.hg.saverev=False (boolean) |
80 --config convert.hg.saverev=False (boolean) |
81 store original revision ID in changeset (forces target IDs to change) |
81 store original revision ID in changeset (forces target IDs to |
|
82 change) |
82 --config convert.hg.startrev=0 (hg revision identifier) |
83 --config convert.hg.startrev=0 (hg revision identifier) |
83 convert start revision and its descendants |
84 convert start revision and its descendants |
84 |
85 |
85 CVS Source |
86 CVS Source |
86 ---------- |
87 ---------- |
87 |
88 |
88 CVS source will use a sandbox (i.e. a checked-out copy) from CVS |
89 CVS source will use a sandbox (i.e. a checked-out copy) from CVS |
89 to indicate the starting point of what will be converted. Direct |
90 to indicate the starting point of what will be converted. Direct |
90 access to the repository files is not needed, unless of course |
91 access to the repository files is not needed, unless of course the |
91 the repository is :local:. The conversion uses the top level |
92 repository is :local:. The conversion uses the top level directory |
92 directory in the sandbox to find the CVS repository, and then uses |
93 in the sandbox to find the CVS repository, and then uses CVS rlog |
93 CVS rlog commands to find files to convert. This means that unless |
94 commands to find files to convert. This means that unless a |
94 a filemap is given, all files under the starting directory will be |
95 filemap is given, all files under the starting directory will be |
95 converted, and that any directory reorganisation in the CVS |
96 converted, and that any directory reorganisation in the CVS |
96 sandbox is ignored. |
97 sandbox is ignored. |
97 |
98 |
98 Because CVS does not have changesets, it is necessary to collect |
99 Because CVS does not have changesets, it is necessary to collect |
99 individual commits to CVS and merge them into changesets. CVS |
100 individual commits to CVS and merge them into changesets. CVS |
106 |
107 |
107 Internal cvsps is selected by setting |
108 Internal cvsps is selected by setting |
108 --config convert.cvsps=builtin |
109 --config convert.cvsps=builtin |
109 and has a few more configurable options: |
110 and has a few more configurable options: |
110 --config convert.cvsps.fuzz=60 (integer) |
111 --config convert.cvsps.fuzz=60 (integer) |
111 Specify the maximum time (in seconds) that is allowed between |
112 Specify the maximum time (in seconds) that is allowed |
112 commits with identical user and log message in a single |
113 between commits with identical user and log message in a |
113 changeset. When very large files were checked in as part |
114 single changeset. When very large files were checked in as |
114 of a changeset then the default may not be long enough. |
115 part of a changeset then the default may not be long |
|
116 enough. |
115 --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}' |
117 --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}' |
116 Specify a regular expression to which commit log messages are |
118 Specify a regular expression to which commit log messages |
117 matched. If a match occurs, then the conversion process will |
119 are matched. If a match occurs, then the conversion |
118 insert a dummy revision merging the branch on which this log |
120 process will insert a dummy revision merging the branch on |
119 message occurs to the branch indicated in the regex. |
121 which this log message occurs to the branch indicated in |
|
122 the regex. |
120 --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}' |
123 --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}' |
121 Specify a regular expression to which commit log messages are |
124 Specify a regular expression to which commit log messages |
122 matched. If a match occurs, then the conversion process will |
125 are matched. If a match occurs, then the conversion |
123 add the most recent revision on the branch indicated in the |
126 process will add the most recent revision on the branch |
124 regex as the second parent of the changeset. |
127 indicated in the regex as the second parent of the |
125 |
128 changeset. |
126 The hgext/convert/cvsps wrapper script allows the builtin changeset |
129 |
127 merging code to be run without doing a conversion. Its parameters and |
130 The hgext/convert/cvsps wrapper script allows the builtin |
128 output are similar to that of cvsps 2.1. |
131 changeset merging code to be run without doing a conversion. Its |
|
132 parameters and output are similar to that of cvsps 2.1. |
129 |
133 |
130 Subversion Source |
134 Subversion Source |
131 ----------------- |
135 ----------------- |
132 |
136 |
133 Subversion source detects classical trunk/branches/tags layouts. |
137 Subversion source detects classical trunk/branches/tags layouts. |
134 By default, the supplied "svn://repo/path/" source URL is |
138 By default, the supplied "svn://repo/path/" source URL is |
135 converted as a single branch. If "svn://repo/path/trunk" exists |
139 converted as a single branch. If "svn://repo/path/trunk" exists it |
136 it replaces the default branch. If "svn://repo/path/branches" |
140 replaces the default branch. If "svn://repo/path/branches" exists, |
137 exists, its subdirectories are listed as possible branches. If |
141 its subdirectories are listed as possible branches. If |
138 "svn://repo/path/tags" exists, it is looked for tags referencing |
142 "svn://repo/path/tags" exists, it is looked for tags referencing |
139 converted branches. Default "trunk", "branches" and "tags" values |
143 converted branches. Default "trunk", "branches" and "tags" values |
140 can be overriden with following options. Set them to paths |
144 can be overriden with following options. Set them to paths |
141 relative to the source URL, or leave them blank to disable |
145 relative to the source URL, or leave them blank to disable |
142 autodetection. |
146 autodetection. |
156 specify start Subversion revision. |
160 specify start Subversion revision. |
157 |
161 |
158 Perforce Source |
162 Perforce Source |
159 --------------- |
163 --------------- |
160 |
164 |
161 The Perforce (P4) importer can be given a p4 depot path or a client |
165 The Perforce (P4) importer can be given a p4 depot path or a |
162 specification as source. It will convert all files in the source to |
166 client specification as source. It will convert all files in the |
163 a flat Mercurial repository, ignoring labels, branches and integrations. |
167 source to a flat Mercurial repository, ignoring labels, branches |
164 Note that when a depot path is given you then usually should specify a |
168 and integrations. Note that when a depot path is given you then |
165 target directory, because otherwise the target may be named ...-hg. |
169 usually should specify a target directory, because otherwise the |
166 |
170 target may be named ...-hg. |
167 It is possible to limit the amount of source history to be converted |
171 |
168 by specifying an initial Perforce revision. |
172 It is possible to limit the amount of source history to be |
|
173 converted by specifying an initial Perforce revision. |
169 |
174 |
170 --config convert.p4.startrev=0 (perforce changelist number) |
175 --config convert.p4.startrev=0 (perforce changelist number) |
171 specify initial Perforce revision. |
176 specify initial Perforce revision. |
172 |
177 |
173 |
178 |