Show More
@@ -32,28 +32,28 def convert(ui, src, dest=None, revmapfi | |||||
32 | - Mercurial [hg] |
|
32 | - Mercurial [hg] | |
33 | - Subversion [svn] (history on branches is not preserved) |
|
33 | - Subversion [svn] (history on branches is not preserved) | |
34 |
|
34 | |||
35 |
If no revision is given, all revisions will be converted. |
|
35 | If no revision is given, all revisions will be converted. | |
36 |
convert will only import up to the named revision |
|
36 | Otherwise, convert will only import up to the named revision | |
37 | understood by the source). |
|
37 | (given in a format understood by the source). | |
38 |
|
38 | |||
39 | If no destination directory name is specified, it defaults to the |
|
39 | If no destination directory name is specified, it defaults to the | |
40 | basename of the source with '-hg' appended. If the destination |
|
40 | basename of the source with '-hg' appended. If the destination | |
41 | repository doesn't exist, it will be created. |
|
41 | repository doesn't exist, it will be created. | |
42 |
|
42 | |||
43 | If <REVMAP> isn't given, it will be put in a default location |
|
43 | If <REVMAP> isn't given, it will be put in a default location | |
44 | (<dest>/.hg/shamap by default). The <REVMAP> is a simple text |
|
44 | (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file | |
45 |
|
|
45 | that maps each source commit ID to the destination ID for that | |
46 |
|
|
46 | revision, like so: | |
47 | <source ID> <destination ID> |
|
47 | <source ID> <destination ID> | |
48 |
|
48 | |||
49 |
If the file doesn't exist, it's automatically created. It's |
|
49 | If the file doesn't exist, it's automatically created. It's | |
50 |
on each commit copied, so convert-repo can be interrupted |
|
50 | updated on each commit copied, so convert-repo can be interrupted | |
51 | be run repeatedly to copy new commits. |
|
51 | and can be run repeatedly to copy new commits. | |
52 |
|
52 | |||
53 |
The [username mapping] file is a simple text file that maps each |
|
53 | The [username mapping] file is a simple text file that maps each | |
54 |
commit author to a destination commit author. It is handy |
|
54 | source commit author to a destination commit author. It is handy | |
55 |
that use unix logins to identify authors (eg: |
|
55 | for source SCMs that use unix logins to identify authors (eg: | |
56 | mapping and the line format is: |
|
56 | CVS). One line per author mapping and the line format is: | |
57 | srcauthor=whatever string you want |
|
57 | srcauthor=whatever string you want | |
58 |
|
58 | |||
59 | The filemap is a file that allows filtering and remapping of files |
|
59 | The filemap is a file that allows filtering and remapping of files | |
@@ -70,20 +70,20 def convert(ui, src, dest=None, revmapfi | |||||
70 | directory, to be included in the destination repository, and the |
|
70 | directory, to be included in the destination repository, and the | |
71 | exclusion of all other files and dirs not explicitely included. |
|
71 | exclusion of all other files and dirs not explicitely included. | |
72 | The 'exclude' directive causes files or directories to be omitted. |
|
72 | The 'exclude' directive causes files or directories to be omitted. | |
73 |
The 'rename' directive renames a file or directory. To rename from |
|
73 | The 'rename' directive renames a file or directory. To rename from | |
74 |
subdirectory into the root of the repository, use '.' as the |
|
74 | a subdirectory into the root of the repository, use '.' as the | |
75 | rename to. |
|
75 | path to rename to. | |
76 |
|
76 | |||
77 | The splicemap is a file that allows insertion of synthetic |
|
77 | The splicemap is a file that allows insertion of synthetic | |
78 | history, letting you specify the parents of a revision. This is |
|
78 | history, letting you specify the parents of a revision. This is | |
79 | useful if you want to e.g. give a Subversion merge two parents, or |
|
79 | useful if you want to e.g. give a Subversion merge two parents, or | |
80 | graft two disconnected series of history together. Each entry |
|
80 | graft two disconnected series of history together. Each entry | |
81 | contains a key, followed by a space, followed by one or two |
|
81 | contains a key, followed by a space, followed by one or two | |
82 | comma-separated values. The key is the revision ID in the |
|
82 | comma-separated values. The key is the revision ID in the source | |
83 |
|
|
83 | revision control system whose parents should be modified (same | |
84 |
|
|
84 | format as a key in .hg/shamap). The values are the revision IDs | |
85 |
|
|
85 | (in either the source or destination revision control system) that | |
86 |
|
|
86 | should be used as the new parents for that node. | |
87 |
|
87 | |||
88 | Mercurial Source |
|
88 | Mercurial Source | |
89 | ----------------- |
|
89 | ----------------- | |
@@ -93,7 +93,8 def convert(ui, src, dest=None, revmapfi | |||||
93 | repositories with missing revlogs, by converting from and to |
|
93 | repositories with missing revlogs, by converting from and to | |
94 | Mercurial. |
|
94 | Mercurial. | |
95 | --config convert.hg.saverev=False (boolean) |
|
95 | --config convert.hg.saverev=False (boolean) | |
96 |
store original revision ID in changeset (forces target IDs to |
|
96 | store original revision ID in changeset (forces target IDs to | |
|
97 | change) | |||
97 | --config convert.hg.startrev=0 (hg revision identifier) |
|
98 | --config convert.hg.startrev=0 (hg revision identifier) | |
98 | convert start revision and its descendants |
|
99 | convert start revision and its descendants | |
99 |
|
100 | |||
@@ -102,11 +103,11 def convert(ui, src, dest=None, revmapfi | |||||
102 |
|
103 | |||
103 | CVS source will use a sandbox (i.e. a checked-out copy) from CVS |
|
104 | CVS source will use a sandbox (i.e. a checked-out copy) from CVS | |
104 | to indicate the starting point of what will be converted. Direct |
|
105 | to indicate the starting point of what will be converted. Direct | |
105 | access to the repository files is not needed, unless of course |
|
106 | access to the repository files is not needed, unless of course the | |
106 |
|
|
107 | repository is :local:. The conversion uses the top level directory | |
107 |
|
|
108 | in the sandbox to find the CVS repository, and then uses CVS rlog | |
108 |
|
|
109 | commands to find files to convert. This means that unless a | |
109 |
|
|
110 | filemap is given, all files under the starting directory will be | |
110 | converted, and that any directory reorganisation in the CVS |
|
111 | converted, and that any directory reorganisation in the CVS | |
111 | sandbox is ignored. |
|
112 | sandbox is ignored. | |
112 |
|
113 | |||
@@ -123,33 +124,36 def convert(ui, src, dest=None, revmapfi | |||||
123 | --config convert.cvsps=builtin |
|
124 | --config convert.cvsps=builtin | |
124 | and has a few more configurable options: |
|
125 | and has a few more configurable options: | |
125 | --config convert.cvsps.fuzz=60 (integer) |
|
126 | --config convert.cvsps.fuzz=60 (integer) | |
126 |
Specify the maximum time (in seconds) that is allowed |
|
127 | Specify the maximum time (in seconds) that is allowed | |
127 |
commits with identical user and log message in a |
|
128 | between commits with identical user and log message in a | |
128 |
changeset. When very large files were checked in as |
|
129 | single changeset. When very large files were checked in as | |
129 |
of a changeset then the default may not be long |
|
130 | part of a changeset then the default may not be long | |
|
131 | enough. | |||
130 | --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}' |
|
132 | --config convert.cvsps.mergeto='{{mergetobranch ([-\w]+)}}' | |
131 |
Specify a regular expression to which commit log messages |
|
133 | Specify a regular expression to which commit log messages | |
132 |
matched. If a match occurs, then the conversion |
|
134 | are matched. If a match occurs, then the conversion | |
133 |
insert a dummy revision merging the branch on |
|
135 | process will insert a dummy revision merging the branch on | |
134 |
message occurs to the branch indicated in |
|
136 | which this log message occurs to the branch indicated in | |
|
137 | the regex. | |||
135 | --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}' |
|
138 | --config convert.cvsps.mergefrom='{{mergefrombranch ([-\w]+)}}' | |
136 |
Specify a regular expression to which commit log messages |
|
139 | Specify a regular expression to which commit log messages | |
137 |
matched. If a match occurs, then the conversion |
|
140 | are matched. If a match occurs, then the conversion | |
138 |
add the most recent revision on the branch |
|
141 | process will add the most recent revision on the branch | |
139 |
regex as the second parent of the |
|
142 | indicated in the regex as the second parent of the | |
|
143 | changeset. | |||
140 |
|
144 | |||
141 |
The hgext/convert/cvsps wrapper script allows the builtin |
|
145 | The hgext/convert/cvsps wrapper script allows the builtin | |
142 |
merging code to be run without doing a conversion. Its |
|
146 | changeset merging code to be run without doing a conversion. Its | |
143 | output are similar to that of cvsps 2.1. |
|
147 | parameters and output are similar to that of cvsps 2.1. | |
144 |
|
148 | |||
145 | Subversion Source |
|
149 | Subversion Source | |
146 | ----------------- |
|
150 | ----------------- | |
147 |
|
151 | |||
148 | Subversion source detects classical trunk/branches/tags layouts. |
|
152 | Subversion source detects classical trunk/branches/tags layouts. | |
149 | By default, the supplied "svn://repo/path/" source URL is |
|
153 | By default, the supplied "svn://repo/path/" source URL is | |
150 | converted as a single branch. If "svn://repo/path/trunk" exists |
|
154 | converted as a single branch. If "svn://repo/path/trunk" exists it | |
151 |
|
|
155 | replaces the default branch. If "svn://repo/path/branches" exists, | |
152 |
|
|
156 | its subdirectories are listed as possible branches. If | |
153 | "svn://repo/path/tags" exists, it is looked for tags referencing |
|
157 | "svn://repo/path/tags" exists, it is looked for tags referencing | |
154 | converted branches. Default "trunk", "branches" and "tags" values |
|
158 | converted branches. Default "trunk", "branches" and "tags" values | |
155 | can be overriden with following options. Set them to paths |
|
159 | can be overriden with following options. Set them to paths | |
@@ -173,14 +177,15 def convert(ui, src, dest=None, revmapfi | |||||
173 | Perforce Source |
|
177 | Perforce Source | |
174 | --------------- |
|
178 | --------------- | |
175 |
|
179 | |||
176 |
The Perforce (P4) importer can be given a p4 depot path or a |
|
180 | The Perforce (P4) importer can be given a p4 depot path or a | |
177 |
specification as source. It will convert all files in the |
|
181 | client specification as source. It will convert all files in the | |
178 |
a flat Mercurial repository, ignoring labels, branches |
|
182 | source to a flat Mercurial repository, ignoring labels, branches | |
179 |
Note that when a depot path is given you then |
|
183 | and integrations. Note that when a depot path is given you then | |
180 |
target directory, because otherwise the |
|
184 | usually should specify a target directory, because otherwise the | |
|
185 | target may be named ...-hg. | |||
181 |
|
186 | |||
182 |
It is possible to limit the amount of source history to be |
|
187 | It is possible to limit the amount of source history to be | |
183 | by specifying an initial Perforce revision. |
|
188 | converted by specifying an initial Perforce revision. | |
184 |
|
189 | |||
185 | --config convert.p4.startrev=0 (perforce changelist number) |
|
190 | --config convert.p4.startrev=0 (perforce changelist number) | |
186 | specify initial Perforce revision. |
|
191 | specify initial Perforce revision. | |
@@ -205,12 +210,14 def debugsvnlog(ui, **opts): | |||||
205 | def debugcvsps(ui, *args, **opts): |
|
210 | def debugcvsps(ui, *args, **opts): | |
206 | '''create changeset information from CVS |
|
211 | '''create changeset information from CVS | |
207 |
|
212 | |||
208 |
This command is intended as a debugging tool for the CVS to |
|
213 | This command is intended as a debugging tool for the CVS to | |
209 |
converter, and can be used as a direct replacement for |
|
214 | Mercurial converter, and can be used as a direct replacement for | |
|
215 | cvsps. | |||
210 |
|
216 | |||
211 |
Hg debugcvsps reads the CVS rlog for current directory (or any |
|
217 | Hg debugcvsps reads the CVS rlog for current directory (or any | |
212 |
directory) in the CVS repository, and converts the log to a |
|
218 | named directory) in the CVS repository, and converts the log to a | |
213 |
changesets based on matching commit log entries and |
|
219 | series of changesets based on matching commit log entries and | |
|
220 | dates.''' | |||
214 | return cvsps.debugcvsps(ui, *args, **opts) |
|
221 | return cvsps.debugcvsps(ui, *args, **opts) | |
215 |
|
222 | |||
216 | commands.norepo += " convert debugsvnlog debugcvsps" |
|
223 | commands.norepo += " convert debugsvnlog debugcvsps" |
@@ -17,28 +17,28 convert a foreign SCM repository to a Me | |||||
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. |
|
20 | If no revision is given, all revisions will be converted. | |
21 |
convert will only import up to the named revision |
|
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 |
|
|
30 | that maps each source commit ID to the destination ID for that | |
31 |
|
|
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 |
|
34 | If the file doesn't exist, it's automatically created. It's | |
35 |
on each commit copied, so convert-repo can be interrupted |
|
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 |
|
38 | The [username mapping] file is a simple text file that maps each | |
39 |
commit author to a destination commit author. It is handy |
|
39 | source commit author to a destination commit author. It is handy | |
40 |
that use unix logins to identify authors (eg: |
|
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 | |
@@ -55,20 +55,20 convert a foreign SCM repository to a Me | |||||
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 |
|
58 | The 'rename' directive renames a file or directory. To rename from | |
59 |
subdirectory into the root of the repository, use '.' as the |
|
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 |
|
|
68 | revision control system whose parents should be modified (same | |
69 |
|
|
69 | format as a key in .hg/shamap). The values are the revision IDs | |
70 |
|
|
70 | (in either the source or destination revision control system) that | |
71 |
|
|
71 | should be used as the new parents for that node. | |
72 |
|
72 | |||
73 | Mercurial Source |
|
73 | Mercurial Source | |
74 | ----------------- |
|
74 | ----------------- | |
@@ -78,7 +78,8 convert a foreign SCM repository to a Me | |||||
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 |
|
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 | |||
@@ -87,11 +88,11 convert a foreign SCM repository to a Me | |||||
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 |
|
|
92 | repository is :local:. The conversion uses the top level directory | |
92 |
|
|
93 | in the sandbox to find the CVS repository, and then uses CVS rlog | |
93 |
|
|
94 | commands to find files to convert. This means that unless a | |
94 |
|
|
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 | |||
@@ -108,33 +109,36 convert a foreign SCM repository to a Me | |||||
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 |
|
112 | Specify the maximum time (in seconds) that is allowed | |
112 |
commits with identical user and log message in a |
|
113 | between commits with identical user and log message in a | |
113 |
changeset. When very large files were checked in as |
|
114 | single changeset. When very large files were checked in as | |
114 |
of a changeset then the default may not be long |
|
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 |
|
118 | Specify a regular expression to which commit log messages | |
117 |
matched. If a match occurs, then the conversion |
|
119 | are matched. If a match occurs, then the conversion | |
118 |
insert a dummy revision merging the branch on |
|
120 | process will insert a dummy revision merging the branch on | |
119 |
message occurs to the branch indicated in |
|
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 |
|
124 | Specify a regular expression to which commit log messages | |
122 |
matched. If a match occurs, then the conversion |
|
125 | are matched. If a match occurs, then the conversion | |
123 |
add the most recent revision on the branch |
|
126 | process will add the most recent revision on the branch | |
124 |
regex as the second parent of the |
|
127 | indicated in the regex as the second parent of the | |
|
128 | changeset. | |||
125 |
|
129 | |||
126 |
The hgext/convert/cvsps wrapper script allows the builtin |
|
130 | The hgext/convert/cvsps wrapper script allows the builtin | |
127 |
merging code to be run without doing a conversion. Its |
|
131 | changeset merging code to be run without doing a conversion. Its | |
128 | output are similar to that of cvsps 2.1. |
|
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 |
|
|
140 | replaces the default branch. If "svn://repo/path/branches" exists, | |
137 |
|
|
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 | |
@@ -158,14 +162,15 convert a foreign SCM repository to a Me | |||||
158 | Perforce Source |
|
162 | Perforce Source | |
159 | --------------- |
|
163 | --------------- | |
160 |
|
164 | |||
161 |
The Perforce (P4) importer can be given a p4 depot path or a |
|
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 |
|
166 | client specification as source. It will convert all files in the | |
163 |
a flat Mercurial repository, ignoring labels, branches |
|
167 | source to a flat Mercurial repository, ignoring labels, branches | |
164 |
Note that when a depot path is given you then |
|
168 | and integrations. Note that when a depot path is given you then | |
165 |
target directory, because otherwise the |
|
169 | usually should specify a target directory, because otherwise the | |
|
170 | target may be named ...-hg. | |||
166 |
|
171 | |||
167 |
It is possible to limit the amount of source history to be |
|
172 | It is possible to limit the amount of source history to be | |
168 | by specifying an initial Perforce revision. |
|
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. |
General Comments 0
You need to be logged in to leave comments.
Login now