comparison hgext/convert/__init__.py @ 9157:9261667e9b82

commands: use minirst parser when displaying help
author Martin Geisler <mg@lazybytes.net>
date Thu, 16 Jul 2009 23:25:26 +0200
parents 9c7a5d70e72f
children dd89dd090b47
comparison
equal deleted inserted replaced
9156:c9c7e8cdac9c 9157:9261667e9b82
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 - Mercurial [hg] 23 - Mercurial [hg]
23 - CVS [cvs] 24 - CVS [cvs]
24 - Darcs [darcs] 25 - Darcs [darcs]
25 - git [git] 26 - git [git]
26 - Subversion [svn] 27 - Subversion [svn]
28 - GNU Arch [gnuarch] 29 - GNU Arch [gnuarch]
29 - Bazaar [bzr] 30 - Bazaar [bzr]
30 - Perforce [p4] 31 - Perforce [p4]
31 32
32 Accepted destination formats [identifiers]: 33 Accepted destination formats [identifiers]:
34
33 - Mercurial [hg] 35 - Mercurial [hg]
34 - Subversion [svn] (history on branches is not preserved) 36 - Subversion [svn] (history on branches is not preserved)
35 37
36 If no revision is given, all revisions will be converted. Otherwise, 38 If no revision is given, all revisions will be converted. Otherwise,
37 convert will only import up to the named revision (given in a format 39 convert will only import up to the named revision (given in a format
43 45
44 By default, all sources except Mercurial will use --branchsort. Mercurial 46 By default, all sources except Mercurial will use --branchsort. Mercurial
45 uses --sourcesort to preserve original revision numbers order. Sort modes 47 uses --sourcesort to preserve original revision numbers order. Sort modes
46 have the following effects: 48 have the following effects:
47 49
48 --branchsort: convert from parent to child revision when possible, which 50 --branchsort convert from parent to child revision when possible, which
49 means branches are usually converted one after the other. It generates 51 means branches are usually converted one after the other. It
50 more compact repositories. 52 generates more compact repositories.
51 --datesort: sort revisions by date. Converted repositories have 53
52 good-looking changelogs but are often an order of magnitude larger than 54 --datesort sort revisions by date. Converted repositories have
53 the same ones generated by --branchsort. 55 good-looking changelogs but are often an order of magnitude
54 --sourcesort: try to preserve source revisions order, only supported by 56 larger than the same ones generated by --branchsort.
55 Mercurial sources. 57
58 --sourcesort try to preserve source revisions order, only supported by
59 Mercurial sources.
56 60
57 If <REVMAP> isn't given, it will be put in a default location 61 If <REVMAP> isn't given, it will be put in a default location
58 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file that 62 (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file that
59 maps each source commit ID to the destination ID for that revision, like 63 maps each source commit ID to the destination ID for that revision, like
60 so: 64 so::
61 65
62 <source ID> <destination ID> 66 <source ID> <destination ID>
63 67
64 If the file doesn't exist, it's automatically created. It's updated on 68 If the file doesn't exist, it's automatically created. It's updated on
65 each commit copied, so convert-repo can be interrupted and can be run 69 each commit copied, so convert-repo can be interrupted and can be run
66 repeatedly to copy new commits. 70 repeatedly to copy new commits.
67 71
70 that use unix logins to identify authors (eg: CVS). One line per author 74 that use unix logins to identify authors (eg: CVS). One line per author
71 mapping and the line format is: srcauthor=whatever string you want 75 mapping and the line format is: srcauthor=whatever string you want
72 76
73 The filemap is a file that allows filtering and remapping of files and 77 The filemap is a file that allows filtering and remapping of files and
74 directories. Comment lines start with '#'. Each line can contain one of 78 directories. Comment lines start with '#'. Each line can contain one of
75 the following directives: 79 the following directives::
76 80
77 include path/to/file 81 include path/to/file
78 82
79 exclude path/to/file 83 exclude path/to/file
80 84
132 reorganization in the CVS sandbox is ignored. 136 reorganization in the CVS sandbox is ignored.
133 137
134 Because CVS does not have changesets, it is necessary to collect 138 Because CVS does not have changesets, it is necessary to collect
135 individual commits to CVS and merge them into changesets. CVS source uses 139 individual commits to CVS and merge them into changesets. CVS source uses
136 its internal changeset merging code by default but can be configured to 140 its internal changeset merging code by default but can be configured to
137 call the external 'cvsps' program by setting: 141 call the external 'cvsps' program by setting::
138 142
139 --config convert.cvsps='cvsps -A -u --cvs-direct -q' 143 --config convert.cvsps='cvsps -A -u --cvs-direct -q'
140 144
141 This option is deprecated and will be removed in Mercurial 1.4. 145 This option is deprecated and will be removed in Mercurial 1.4.
142 146
143 The options shown are the defaults. 147 The options shown are the defaults.
144 148
145 Internal cvsps is selected by setting 149 Internal cvsps is selected by setting ::
146 150
147 --config convert.cvsps=builtin 151 --config convert.cvsps=builtin
148 152
149 and has a few more configurable options: 153 and has a few more configurable options:
150 154
151 --config convert.cvsps.cache=True (boolean) 155 --config convert.cvsps.cache=True (boolean)
152 Set to False to disable remote log caching, for testing and debugging 156 Set to False to disable remote log caching, for testing and debugging