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