Show More
@@ -1,325 +1,336 | |||||
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 of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | '''import revisions from foreign VCS repositories into Mercurial''' |
|
8 | '''import revisions from foreign VCS repositories into Mercurial''' | |
9 |
|
9 | |||
10 | import convcmd |
|
10 | import convcmd | |
11 | import cvsps |
|
11 | import cvsps | |
12 | import subversion |
|
12 | import subversion | |
13 | from mercurial import commands |
|
13 | from mercurial import commands | |
14 | from mercurial.i18n import _ |
|
14 | from mercurial.i18n import _ | |
15 |
|
15 | |||
16 | # Commands definition was moved elsewhere to ease demandload job. |
|
16 | # Commands definition was moved elsewhere to ease demandload job. | |
17 |
|
17 | |||
18 | def convert(ui, src, dest=None, revmapfile=None, **opts): |
|
18 | def convert(ui, src, dest=None, revmapfile=None, **opts): | |
19 | """convert a foreign SCM repository to a Mercurial one. |
|
19 | """convert a foreign SCM repository to a Mercurial one. | |
20 |
|
20 | |||
21 | Accepted source formats [identifiers]: |
|
21 | Accepted source formats [identifiers]: | |
22 |
|
22 | |||
23 | - Mercurial [hg] |
|
23 | - Mercurial [hg] | |
24 | - CVS [cvs] |
|
24 | - CVS [cvs] | |
25 | - Darcs [darcs] |
|
25 | - Darcs [darcs] | |
26 | - git [git] |
|
26 | - git [git] | |
27 | - Subversion [svn] |
|
27 | - Subversion [svn] | |
28 | - Monotone [mtn] |
|
28 | - Monotone [mtn] | |
29 | - GNU Arch [gnuarch] |
|
29 | - GNU Arch [gnuarch] | |
30 | - Bazaar [bzr] |
|
30 | - Bazaar [bzr] | |
31 | - Perforce [p4] |
|
31 | - Perforce [p4] | |
32 |
|
32 | |||
33 | Accepted destination formats [identifiers]: |
|
33 | Accepted destination formats [identifiers]: | |
34 |
|
34 | |||
35 | - Mercurial [hg] |
|
35 | - Mercurial [hg] | |
36 | - Subversion [svn] (history on branches is not preserved) |
|
36 | - Subversion [svn] (history on branches is not preserved) | |
37 |
|
37 | |||
38 | If no revision is given, all revisions will be converted. |
|
38 | If no revision is given, all revisions will be converted. | |
39 | Otherwise, convert will only import up to the named revision |
|
39 | Otherwise, convert will only import up to the named revision | |
40 | (given in a format understood by the source). |
|
40 | (given in a format understood by the source). | |
41 |
|
41 | |||
42 | If no destination directory name is specified, it defaults to the |
|
42 | If no destination directory name is specified, it defaults to the | |
43 | basename of the source with ``-hg`` appended. If the destination |
|
43 | basename of the source with ``-hg`` appended. If the destination | |
44 | repository doesn't exist, it will be created. |
|
44 | repository doesn't exist, it will be created. | |
45 |
|
45 | |||
46 | By default, all sources except Mercurial will use --branchsort. |
|
46 | By default, all sources except Mercurial will use --branchsort. | |
47 | Mercurial uses --sourcesort to preserve original revision numbers |
|
47 | Mercurial uses --sourcesort to preserve original revision numbers | |
48 | order. Sort modes have the following effects: |
|
48 | order. Sort modes have the following effects: | |
49 |
|
49 | |||
50 | --branchsort convert from parent to child revision when possible, |
|
50 | --branchsort convert from parent to child revision when possible, | |
51 | which means branches are usually converted one after |
|
51 | which means branches are usually converted one after | |
52 | the other. It generates more compact repositories. |
|
52 | the other. It generates more compact repositories. | |
53 |
|
53 | |||
54 | --datesort sort revisions by date. Converted repositories have |
|
54 | --datesort sort revisions by date. Converted repositories have | |
55 | good-looking changelogs but are often an order of |
|
55 | good-looking changelogs but are often an order of | |
56 | magnitude larger than the same ones generated by |
|
56 | magnitude larger than the same ones generated by | |
57 | --branchsort. |
|
57 | --branchsort. | |
58 |
|
58 | |||
59 | --sourcesort try to preserve source revisions order, only |
|
59 | --sourcesort try to preserve source revisions order, only | |
60 | supported by Mercurial sources. |
|
60 | supported by Mercurial sources. | |
61 |
|
61 | |||
62 | If <REVMAP> isn't given, it will be put in a default location |
|
62 | If <REVMAP> isn't given, it will be put in a default location | |
63 | (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file |
|
63 | (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file | |
64 | that maps each source commit ID to the destination ID for that |
|
64 | that maps each source commit ID to the destination ID for that | |
65 | revision, like so:: |
|
65 | revision, like so:: | |
66 |
|
66 | |||
67 | <source ID> <destination ID> |
|
67 | <source ID> <destination ID> | |
68 |
|
68 | |||
69 | If the file doesn't exist, it's automatically created. It's |
|
69 | If the file doesn't exist, it's automatically created. It's | |
70 | updated on each commit copied, so :hg:`convert` can be interrupted |
|
70 | updated on each commit copied, so :hg:`convert` can be interrupted | |
71 | and can be run repeatedly to copy new commits. |
|
71 | and can be run repeatedly to copy new commits. | |
72 |
|
72 | |||
73 | The authormap is a simple text file that maps each source commit |
|
73 | The authormap is a simple text file that maps each source commit | |
74 | author to a destination commit author. It is handy for source SCMs |
|
74 | author to a destination commit author. It is handy for source SCMs | |
75 | that use unix logins to identify authors (eg: CVS). One line per |
|
75 | that use unix logins to identify authors (eg: CVS). One line per | |
76 | author mapping and the line format is:: |
|
76 | author mapping and the line format is:: | |
77 |
|
77 | |||
78 | source author = destination author |
|
78 | source author = destination author | |
79 |
|
79 | |||
80 | Empty lines and lines starting with a ``#`` are ignored. |
|
80 | Empty lines and lines starting with a ``#`` are ignored. | |
81 |
|
81 | |||
82 | The filemap is a file that allows filtering and remapping of files |
|
82 | The filemap is a file that allows filtering and remapping of files | |
83 | and directories. Each line can contain one of the following |
|
83 | and directories. Each line can contain one of the following | |
84 | directives:: |
|
84 | directives:: | |
85 |
|
85 | |||
86 | include path/to/file-or-dir |
|
86 | include path/to/file-or-dir | |
87 |
|
87 | |||
88 | exclude path/to/file-or-dir |
|
88 | exclude path/to/file-or-dir | |
89 |
|
89 | |||
90 | rename path/to/source path/to/destination |
|
90 | rename path/to/source path/to/destination | |
91 |
|
91 | |||
92 | Comment lines start with ``#``. A specified path matches if it |
|
92 | Comment lines start with ``#``. A specified path matches if it | |
93 | equals the full relative name of a file or one of its parent |
|
93 | equals the full relative name of a file or one of its parent | |
94 | directories. The ``include`` or ``exclude`` directive with the |
|
94 | directories. The ``include`` or ``exclude`` directive with the | |
95 | longest matching path applies, so line order does not matter. |
|
95 | longest matching path applies, so line order does not matter. | |
96 |
|
96 | |||
97 | The ``include`` directive causes a file, or all files under a |
|
97 | The ``include`` directive causes a file, or all files under a | |
98 | directory, to be included in the destination repository, and the |
|
98 | directory, to be included in the destination repository, and the | |
99 | exclusion of all other files and directories not explicitly |
|
99 | exclusion of all other files and directories not explicitly | |
100 | included. The ``exclude`` directive causes files or directories to |
|
100 | included. The ``exclude`` directive causes files or directories to | |
101 | be omitted. The ``rename`` directive renames a file or directory if |
|
101 | be omitted. The ``rename`` directive renames a file or directory if | |
102 | it is converted. To rename from a subdirectory into the root of |
|
102 | it is converted. To rename from a subdirectory into the root of | |
103 | the repository, use ``.`` as the path to rename to. |
|
103 | the repository, use ``.`` as the path to rename to. | |
104 |
|
104 | |||
105 | The splicemap is a file that allows insertion of synthetic |
|
105 | The splicemap is a file that allows insertion of synthetic | |
106 | history, letting you specify the parents of a revision. This is |
|
106 | history, letting you specify the parents of a revision. This is | |
107 | useful if you want to e.g. give a Subversion merge two parents, or |
|
107 | useful if you want to e.g. give a Subversion merge two parents, or | |
108 | graft two disconnected series of history together. Each entry |
|
108 | graft two disconnected series of history together. Each entry | |
109 | contains a key, followed by a space, followed by one or two |
|
109 | contains a key, followed by a space, followed by one or two | |
110 | comma-separated values:: |
|
110 | comma-separated values:: | |
111 |
|
111 | |||
112 | key parent1, parent2 |
|
112 | key parent1, parent2 | |
113 |
|
113 | |||
114 | The key is the revision ID in the source |
|
114 | The key is the revision ID in the source | |
115 | revision control system whose parents should be modified (same |
|
115 | revision control system whose parents should be modified (same | |
116 | format as a key in .hg/shamap). The values are the revision IDs |
|
116 | format as a key in .hg/shamap). The values are the revision IDs | |
117 | (in either the source or destination revision control system) that |
|
117 | (in either the source or destination revision control system) that | |
118 | should be used as the new parents for that node. For example, if |
|
118 | should be used as the new parents for that node. For example, if | |
119 | you have merged "release-1.0" into "trunk", then you should |
|
119 | you have merged "release-1.0" into "trunk", then you should | |
120 | specify the revision on "trunk" as the first parent and the one on |
|
120 | specify the revision on "trunk" as the first parent and the one on | |
121 | the "release-1.0" branch as the second. |
|
121 | the "release-1.0" branch as the second. | |
122 |
|
122 | |||
123 | The branchmap is a file that allows you to rename a branch when it is |
|
123 | The branchmap is a file that allows you to rename a branch when it is | |
124 | being brought in from whatever external repository. When used in |
|
124 | being brought in from whatever external repository. When used in | |
125 | conjunction with a splicemap, it allows for a powerful combination |
|
125 | conjunction with a splicemap, it allows for a powerful combination | |
126 | to help fix even the most badly mismanaged repositories and turn them |
|
126 | to help fix even the most badly mismanaged repositories and turn them | |
127 | into nicely structured Mercurial repositories. The branchmap contains |
|
127 | into nicely structured Mercurial repositories. The branchmap contains | |
128 | lines of the form:: |
|
128 | lines of the form:: | |
129 |
|
129 | |||
130 | original_branch_name new_branch_name |
|
130 | original_branch_name new_branch_name | |
131 |
|
131 | |||
132 | where "original_branch_name" is the name of the branch in the |
|
132 | where "original_branch_name" is the name of the branch in the | |
133 | source repository, and "new_branch_name" is the name of the branch |
|
133 | source repository, and "new_branch_name" is the name of the branch | |
134 | is the destination repository. No whitespace is allowed in the |
|
134 | is the destination repository. No whitespace is allowed in the | |
135 | branch names. This can be used to (for instance) move code in one |
|
135 | branch names. This can be used to (for instance) move code in one | |
136 | repository from "default" to a named branch. |
|
136 | repository from "default" to a named branch. | |
137 |
|
137 | |||
138 | Mercurial Source |
|
138 | Mercurial Source | |
139 | '''''''''''''''' |
|
139 | '''''''''''''''' | |
140 |
|
140 | |||
141 | The Mercurial source recognizes the following configuration |
|
141 | The Mercurial source recognizes the following configuration | |
142 | options, which you can set on the command line with ``--config``: |
|
142 | options, which you can set on the command line with ``--config``: | |
143 |
|
143 | |||
144 | :convert.hg.ignoreerrors: ignore integrity |
|
144 | :convert.hg.ignoreerrors: ignore integrity errors when reading. | |
145 |
|
|
145 | Use it to fix Mercurial repositories with missing revlogs, by | |
146 |
|
|
146 | converting from and to Mercurial. Default is False. | |
147 | is False. |
|
147 | ||
148 | :convert.hg.saverev: store original. |
|
148 | :convert.hg.saverev: store original. revision ID in changeset | |
149 |
|
|
149 | (forces target IDs to change). It takes and boolean argument | |
150 |
|
|
150 | and defaults to False. | |
151 | :convert.hg.startrev: convert |
|
151 | ||
152 | start revision and its descendants. It takes a hg revision identifier |
|
152 | :convert.hg.startrev: convert start revision and its descendants. | |
153 | and defaults to 0. |
|
153 | It takes a hg revision identifier and defaults to 0. | |
154 |
|
154 | |||
155 | CVS Source |
|
155 | CVS Source | |
156 | '''''''''' |
|
156 | '''''''''' | |
157 |
|
157 | |||
158 | CVS source will use a sandbox (i.e. a checked-out copy) from CVS |
|
158 | CVS source will use a sandbox (i.e. a checked-out copy) from CVS | |
159 | to indicate the starting point of what will be converted. Direct |
|
159 | to indicate the starting point of what will be converted. Direct | |
160 | access to the repository files is not needed, unless of course the |
|
160 | access to the repository files is not needed, unless of course the | |
161 | repository is :local:. The conversion uses the top level directory |
|
161 | repository is :local:. The conversion uses the top level directory | |
162 | in the sandbox to find the CVS repository, and then uses CVS rlog |
|
162 | in the sandbox to find the CVS repository, and then uses CVS rlog | |
163 | commands to find files to convert. This means that unless a |
|
163 | commands to find files to convert. This means that unless a | |
164 | filemap is given, all files under the starting directory will be |
|
164 | filemap is given, all files under the starting directory will be | |
165 | converted, and that any directory reorganization in the CVS |
|
165 | converted, and that any directory reorganization in the CVS | |
166 | sandbox is ignored. |
|
166 | sandbox is ignored. | |
167 |
|
167 | |||
168 | The following options can be used with ``--config``: |
|
168 | The following options can be used with ``--config``: | |
169 |
|
169 | |||
170 | :convert.cvsps.cache: Set to False to disable |
|
170 | :convert.cvsps.cache: Set to False to disable remote log caching, | |
171 |
|
|
171 | for testing and debugging purposes. Default is True. | |
172 | :convert.cvsps.fuzz: Specify the maximum |
|
172 | ||
173 | time (in seconds) that is allowed between commits with identical user |
|
173 | :convert.cvsps.fuzz: Specify the maximum time (in seconds) that is | |
174 | and log message in a single changeset. When very large files were |
|
174 | allowed between commits with identical user and log message in | |
175 | checked in as part of a changeset then the default may not be long |
|
175 | a single changeset. When very large files were checked in as | |
176 | enough. The default is 60. |
|
176 | part of a changeset then the default may not be long enough. | |
177 | :convert.cvsps.mergeto: Specify a |
|
177 | The default is 60. | |
178 | regular expression to which commit log messages are matched. If a |
|
178 | ||
179 | match occurs, then the conversion process will insert a dummy |
|
179 | :convert.cvsps.mergeto: Specify a regular expression to which | |
180 | revision merging the branch on which this log message occurs to the |
|
180 | commit log messages are matched. If a match occurs, then the | |
181 | branch indicated in the regex. Default is ``{{mergetobranch ([-\\w]+)}}`` |
|
181 | conversion process will insert a dummy revision merging the | |
182 | :convert.cvsps.mergefrom: Specify a |
|
182 | branch on which this log message occurs to the branch | |
183 | regular expression to which commit log messages are matched. If a |
|
183 | indicated in the regex. Default is ``{{mergetobranch | |
184 | match occurs, then the conversion process will add the most recent |
|
184 | ([-\\w]+)}}`` | |
185 | revision on the branch indicated in the regex as the second parent of |
|
185 | ||
186 | the changeset. Default is ``{{mergefrombranch ([-\\w]+)}}`` |
|
186 | :convert.cvsps.mergefrom: Specify a regular expression to which | |
|
187 | commit log messages are matched. If a match occurs, then the | |||
|
188 | conversion process will add the most recent revision on the | |||
|
189 | branch indicated in the regex as the second parent of the | |||
|
190 | changeset. Default is ``{{mergefrombranch ([-\\w]+)}}`` | |||
|
191 | ||||
187 | :hook.cvslog: Specify a Python function to be called at the end of |
|
192 | :hook.cvslog: Specify a Python function to be called at the end of | |
188 |
gathering the CVS log. The function is passed a list with the |
|
193 | gathering the CVS log. The function is passed a list with the | |
189 |
entries, and can modify the entries in-place, or add or |
|
194 | log entries, and can modify the entries in-place, or add or | |
190 | :hook.cvschangesets: Specify a Python function to be called after the |
|
195 | delete them. | |
191 | changesets are calculated from the the CVS log. The function is passed |
|
196 | ||
192 | a list with the changeset entries, and can modify the changesets |
|
197 | :hook.cvschangesets: Specify a Python function to be called after | |
193 | in-place, or add or delete them. |
|
198 | the changesets are calculated from the the CVS log. The | |
|
199 | function is passed a list with the changeset entries, and can | |||
|
200 | modify the changesets in-place, or add or delete them. | |||
194 |
|
201 | |||
195 | An additional "debugcvsps" Mercurial command allows the builtin |
|
202 | An additional "debugcvsps" Mercurial command allows the builtin | |
196 | changeset merging code to be run without doing a conversion. Its |
|
203 | changeset merging code to be run without doing a conversion. Its | |
197 | parameters and output are similar to that of cvsps 2.1. Please see |
|
204 | parameters and output are similar to that of cvsps 2.1. Please see | |
198 | the command help for more details. |
|
205 | the command help for more details. | |
199 |
|
206 | |||
200 | Subversion Source |
|
207 | Subversion Source | |
201 | ''''''''''''''''' |
|
208 | ''''''''''''''''' | |
202 |
|
209 | |||
203 | Subversion source detects classical trunk/branches/tags layouts. |
|
210 | Subversion source detects classical trunk/branches/tags layouts. | |
204 | By default, the supplied "svn://repo/path/" source URL is |
|
211 | By default, the supplied "svn://repo/path/" source URL is | |
205 | converted as a single branch. If "svn://repo/path/trunk" exists it |
|
212 | converted as a single branch. If "svn://repo/path/trunk" exists it | |
206 | replaces the default branch. If "svn://repo/path/branches" exists, |
|
213 | replaces the default branch. If "svn://repo/path/branches" exists, | |
207 | its subdirectories are listed as possible branches. If |
|
214 | its subdirectories are listed as possible branches. If | |
208 | "svn://repo/path/tags" exists, it is looked for tags referencing |
|
215 | "svn://repo/path/tags" exists, it is looked for tags referencing | |
209 | converted branches. Default "trunk", "branches" and "tags" values |
|
216 | converted branches. Default "trunk", "branches" and "tags" values | |
210 | can be overridden with following options. Set them to paths |
|
217 | can be overridden with following options. Set them to paths | |
211 | relative to the source URL, or leave them blank to disable auto |
|
218 | relative to the source URL, or leave them blank to disable auto | |
212 | detection. |
|
219 | detection. | |
213 |
|
220 | |||
214 | The following options can be set with ``--config``: |
|
221 | The following options can be set with ``--config``: | |
215 |
|
222 | |||
216 | :convert.svn.branches: specify the directory |
|
223 | :convert.svn.branches: specify the directory containing branches. | |
217 |
|
|
224 | The defaults is branches. | |
218 | :convert.svn.tags: specify the directory |
|
225 | ||
219 | containing tags. The default is tags. |
|
226 | :convert.svn.tags: specify the directory containing tags. The | |
220 | :convert.svn.trunk: specify the name of |
|
227 | default is tags. | |
221 | the trunk branch The defauls is trunk. |
|
228 | ||
|
229 | :convert.svn.trunk: specify the name of the trunk branch The | |||
|
230 | defauls is trunk. | |||
222 |
|
231 | |||
223 | Source history can be retrieved starting at a specific revision, |
|
232 | Source history can be retrieved starting at a specific revision, | |
224 | instead of being integrally converted. Only single branch |
|
233 | instead of being integrally converted. Only single branch | |
225 | conversions are supported. |
|
234 | conversions are supported. | |
226 |
|
235 | |||
227 | :convert.svn.startrev: specify start |
|
236 | :convert.svn.startrev: specify start Subversion revision number. | |
228 |
|
|
237 | The default is 0. | |
229 |
|
238 | |||
230 | Perforce Source |
|
239 | Perforce Source | |
231 | ''''''''''''''' |
|
240 | ''''''''''''''' | |
232 |
|
241 | |||
233 | The Perforce (P4) importer can be given a p4 depot path or a |
|
242 | The Perforce (P4) importer can be given a p4 depot path or a | |
234 | client specification as source. It will convert all files in the |
|
243 | client specification as source. It will convert all files in the | |
235 | source to a flat Mercurial repository, ignoring labels, branches |
|
244 | source to a flat Mercurial repository, ignoring labels, branches | |
236 | and integrations. Note that when a depot path is given you then |
|
245 | and integrations. Note that when a depot path is given you then | |
237 | usually should specify a target directory, because otherwise the |
|
246 | usually should specify a target directory, because otherwise the | |
238 | target may be named ...-hg. |
|
247 | target may be named ...-hg. | |
239 |
|
248 | |||
240 | It is possible to limit the amount of source history to be |
|
249 | It is possible to limit the amount of source history to be | |
241 | converted by specifying an initial Perforce revision: |
|
250 | converted by specifying an initial Perforce revision: | |
242 |
|
251 | |||
243 | :convert.p4.startrev: specify |
|
252 | :convert.p4.startrev: specify initial Perforce revision, a | |
244 |
|
|
253 | Perforce changelist number). | |
245 |
|
254 | |||
246 | Mercurial Destination |
|
255 | Mercurial Destination | |
247 | ''''''''''''''''''''' |
|
256 | ''''''''''''''''''''' | |
248 |
|
257 | |||
249 | The following options are supported: |
|
258 | The following options are supported: | |
250 |
|
259 | |||
251 | :convert.hg.clonebranches: dispatch source |
|
260 | :convert.hg.clonebranches: dispatch source branches in separate | |
252 |
|
|
261 | clones. The default is False. | |
|
262 | ||||
253 | :convert.hg.tagsbranch: branch name for tag revisions, defaults to |
|
263 | :convert.hg.tagsbranch: branch name for tag revisions, defaults to | |
254 | ``default``. |
|
264 | ``default``. | |
255 | :convert.hg.usebranchnames: preserve branch names. The default is True |
|
|||
256 |
|
265 | |||
|
266 | :convert.hg.usebranchnames: preserve branch names. The default is | |||
|
267 | True | |||
257 | """ |
|
268 | """ | |
258 | return convcmd.convert(ui, src, dest, revmapfile, **opts) |
|
269 | return convcmd.convert(ui, src, dest, revmapfile, **opts) | |
259 |
|
270 | |||
260 | def debugsvnlog(ui, **opts): |
|
271 | def debugsvnlog(ui, **opts): | |
261 | return subversion.debugsvnlog(ui, **opts) |
|
272 | return subversion.debugsvnlog(ui, **opts) | |
262 |
|
273 | |||
263 | def debugcvsps(ui, *args, **opts): |
|
274 | def debugcvsps(ui, *args, **opts): | |
264 | '''create changeset information from CVS |
|
275 | '''create changeset information from CVS | |
265 |
|
276 | |||
266 | This command is intended as a debugging tool for the CVS to |
|
277 | This command is intended as a debugging tool for the CVS to | |
267 | Mercurial converter, and can be used as a direct replacement for |
|
278 | Mercurial converter, and can be used as a direct replacement for | |
268 | cvsps. |
|
279 | cvsps. | |
269 |
|
280 | |||
270 | Hg debugcvsps reads the CVS rlog for current directory (or any |
|
281 | Hg debugcvsps reads the CVS rlog for current directory (or any | |
271 | named directory) in the CVS repository, and converts the log to a |
|
282 | named directory) in the CVS repository, and converts the log to a | |
272 | series of changesets based on matching commit log entries and |
|
283 | series of changesets based on matching commit log entries and | |
273 | dates.''' |
|
284 | dates.''' | |
274 | return cvsps.debugcvsps(ui, *args, **opts) |
|
285 | return cvsps.debugcvsps(ui, *args, **opts) | |
275 |
|
286 | |||
276 | commands.norepo += " convert debugsvnlog debugcvsps" |
|
287 | commands.norepo += " convert debugsvnlog debugcvsps" | |
277 |
|
288 | |||
278 | cmdtable = { |
|
289 | cmdtable = { | |
279 | "convert": |
|
290 | "convert": | |
280 | (convert, |
|
291 | (convert, | |
281 | [('', 'authors', '', |
|
292 | [('', 'authors', '', | |
282 | _('username mapping filename (DEPRECATED, use --authormap instead)'), |
|
293 | _('username mapping filename (DEPRECATED, use --authormap instead)'), | |
283 | _('FILE')), |
|
294 | _('FILE')), | |
284 | ('s', 'source-type', '', |
|
295 | ('s', 'source-type', '', | |
285 | _('source repository type'), _('TYPE')), |
|
296 | _('source repository type'), _('TYPE')), | |
286 | ('d', 'dest-type', '', |
|
297 | ('d', 'dest-type', '', | |
287 | _('destination repository type'), _('TYPE')), |
|
298 | _('destination repository type'), _('TYPE')), | |
288 | ('r', 'rev', '', |
|
299 | ('r', 'rev', '', | |
289 | _('import up to target revision REV'), _('REV')), |
|
300 | _('import up to target revision REV'), _('REV')), | |
290 | ('A', 'authormap', '', |
|
301 | ('A', 'authormap', '', | |
291 | _('remap usernames using this file'), _('FILE')), |
|
302 | _('remap usernames using this file'), _('FILE')), | |
292 | ('', 'filemap', '', |
|
303 | ('', 'filemap', '', | |
293 | _('remap file names using contents of file'), _('FILE')), |
|
304 | _('remap file names using contents of file'), _('FILE')), | |
294 | ('', 'splicemap', '', |
|
305 | ('', 'splicemap', '', | |
295 | _('splice synthesized history into place'), _('FILE')), |
|
306 | _('splice synthesized history into place'), _('FILE')), | |
296 | ('', 'branchmap', '', |
|
307 | ('', 'branchmap', '', | |
297 | _('change branch names while converting'), _('FILE')), |
|
308 | _('change branch names while converting'), _('FILE')), | |
298 | ('', 'branchsort', None, _('try to sort changesets by branches')), |
|
309 | ('', 'branchsort', None, _('try to sort changesets by branches')), | |
299 | ('', 'datesort', None, _('try to sort changesets by date')), |
|
310 | ('', 'datesort', None, _('try to sort changesets by date')), | |
300 | ('', 'sourcesort', None, _('preserve source changesets order'))], |
|
311 | ('', 'sourcesort', None, _('preserve source changesets order'))], | |
301 | _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]')), |
|
312 | _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]')), | |
302 | "debugsvnlog": |
|
313 | "debugsvnlog": | |
303 | (debugsvnlog, |
|
314 | (debugsvnlog, | |
304 | [], |
|
315 | [], | |
305 | 'hg debugsvnlog'), |
|
316 | 'hg debugsvnlog'), | |
306 | "debugcvsps": |
|
317 | "debugcvsps": | |
307 | (debugcvsps, |
|
318 | (debugcvsps, | |
308 | [ |
|
319 | [ | |
309 | # Main options shared with cvsps-2.1 |
|
320 | # Main options shared with cvsps-2.1 | |
310 | ('b', 'branches', [], _('only return changes on specified branches')), |
|
321 | ('b', 'branches', [], _('only return changes on specified branches')), | |
311 | ('p', 'prefix', '', _('prefix to remove from file names')), |
|
322 | ('p', 'prefix', '', _('prefix to remove from file names')), | |
312 | ('r', 'revisions', [], |
|
323 | ('r', 'revisions', [], | |
313 | _('only return changes after or between specified tags')), |
|
324 | _('only return changes after or between specified tags')), | |
314 | ('u', 'update-cache', None, _("update cvs log cache")), |
|
325 | ('u', 'update-cache', None, _("update cvs log cache")), | |
315 | ('x', 'new-cache', None, _("create new cvs log cache")), |
|
326 | ('x', 'new-cache', None, _("create new cvs log cache")), | |
316 | ('z', 'fuzz', 60, _('set commit time fuzz in seconds')), |
|
327 | ('z', 'fuzz', 60, _('set commit time fuzz in seconds')), | |
317 | ('', 'root', '', _('specify cvsroot')), |
|
328 | ('', 'root', '', _('specify cvsroot')), | |
318 | # Options specific to builtin cvsps |
|
329 | # Options specific to builtin cvsps | |
319 | ('', 'parents', '', _('show parent changesets')), |
|
330 | ('', 'parents', '', _('show parent changesets')), | |
320 | ('', 'ancestors', '', _('show current changeset in ancestor branches')), |
|
331 | ('', 'ancestors', '', _('show current changeset in ancestor branches')), | |
321 | # Options that are ignored for compatibility with cvsps-2.1 |
|
332 | # Options that are ignored for compatibility with cvsps-2.1 | |
322 | ('A', 'cvs-direct', None, _('ignored for compatibility')), |
|
333 | ('A', 'cvs-direct', None, _('ignored for compatibility')), | |
323 | ], |
|
334 | ], | |
324 | _('hg debugcvsps [OPTION]... [PATH]...')), |
|
335 | _('hg debugcvsps [OPTION]... [PATH]...')), | |
325 | } |
|
336 | } |
General Comments 0
You need to be logged in to leave comments.
Login now