Mercurial > hg
comparison hgext/convert/__init__.py @ 12188:6045d467abd7
merge with stable
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Fri, 10 Sep 2010 01:04:32 +0200 |
parents | 4a854122a1c7 3417b3d95b05 |
children | 0c67a58f0580 |
comparison
equal
deleted
inserted
replaced
12187:4a854122a1c7 | 12188:6045d467abd7 |
---|---|
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: |
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 convert-repo 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 [username mapping] file is a simple text file that maps each | 73 The username mapping file is a simple text file that maps each |
74 source commit author to a destination commit author. It is handy | 74 source commit author to a destination commit author. It is handy |
75 for source SCMs that use unix logins to identify authors (eg: | 75 for source SCMs that use unix logins to identify authors (eg: |
76 CVS). One line per author mapping and the line format is: | 76 CVS). One line per author mapping and the line format is:: |
77 srcauthor=whatever string you want | 77 |
78 source author = destination author | |
79 | |
80 Empty lines and lines starting with a ``#`` are ignored. | |
78 | 81 |
79 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 |
80 and directories. Each line can contain one of the following | 83 and directories. Each line can contain one of the following |
81 directives:: | 84 directives:: |
82 | 85 |
84 | 87 |
85 exclude path/to/file-or-dir | 88 exclude path/to/file-or-dir |
86 | 89 |
87 rename path/to/source path/to/destination | 90 rename path/to/source path/to/destination |
88 | 91 |
89 Comment lines start with '#'. A specified path matches if it | 92 Comment lines start with ``#``. A specified path matches if it |
90 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 |
91 directories. The 'include' or 'exclude' directive with the longest | 94 directories. The ``include`` or ``exclude`` directive with the |
92 matching path applies, so line order does not matter. | 95 longest matching path applies, so line order does not matter. |
93 | 96 |
94 The 'include' directive causes a file, or all files under a | 97 The ``include`` directive causes a file, or all files under a |
95 directory, to be included in the destination repository, and the | 98 directory, to be included in the destination repository, and the |
96 exclusion of all other files and directories not explicitly | 99 exclusion of all other files and directories not explicitly |
97 included. The 'exclude' directive causes files or directories to | 100 included. The ``exclude`` directive causes files or directories to |
98 be omitted. The 'rename' directive renames a file or directory if | 101 be omitted. The ``rename`` directive renames a file or directory if |
99 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 |
100 the repository, use '.' as the path to rename to. | 103 the repository, use ``.`` as the path to rename to. |
101 | 104 |
102 The splicemap is a file that allows insertion of synthetic | 105 The splicemap is a file that allows insertion of synthetic |
103 history, letting you specify the parents of a revision. This is | 106 history, letting you specify the parents of a revision. This is |
104 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 |
105 graft two disconnected series of history together. Each entry | 108 graft two disconnected series of history together. Each entry |
106 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 |
107 comma-separated values. The key is the revision ID in the source | 110 comma-separated values:: |
111 | |
112 key parent1, parent2 | |
113 | |
114 The key is the revision ID in the source | |
108 revision control system whose parents should be modified (same | 115 revision control system whose parents should be modified (same |
109 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 |
110 (in either the source or destination revision control system) that | 117 (in either the source or destination revision control system) that |
111 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 |
112 you have merged "release-1.0" into "trunk", then you should | 119 you have merged "release-1.0" into "trunk", then you should |
116 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 |
117 being brought in from whatever external repository. When used in | 124 being brought in from whatever external repository. When used in |
118 conjunction with a splicemap, it allows for a powerful combination | 125 conjunction with a splicemap, it allows for a powerful combination |
119 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 |
120 into nicely structured Mercurial repositories. The branchmap contains | 127 into nicely structured Mercurial repositories. The branchmap contains |
121 lines of the form "original_branch_name new_branch_name". | 128 lines of the form:: |
122 "original_branch_name" is the name of the branch in the source | 129 |
123 repository, and "new_branch_name" is the name of the branch is the | 130 original_branch_name new_branch_name |
124 destination repository. This can be used to (for instance) move code | 131 |
125 in one repository from "default" to a named branch. | 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 | |
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 | |
136 repository from "default" to a named branch. | |
126 | 137 |
127 Mercurial Source | 138 Mercurial Source |
128 ---------------- | 139 ---------------- |
129 | 140 |
130 --config convert.hg.ignoreerrors=False (boolean) | 141 --config convert.hg.ignoreerrors=False (boolean) |