comparison hgext/convert/__init__.py @ 4940:71fed370b7a7

Backout ad09ce1d393c and replace ''' with """ to make some highlighting happy. I have tried Debian's default emacs and the current CVS version. Default emacs doesn't have highlighting enabled (and being emacs-illiterate I don't know how to enable it) and the CVS emacs' Python highlighting has no problems with ' characters here.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sat, 21 Jul 2007 10:36:51 +0200
parents cdd33a048289
children 89fbb0a5e8e3
comparison
equal deleted inserted replaced
4939:cdd33a048289 4940:71fed370b7a7
258 def cleanup(self): 258 def cleanup(self):
259 if self.mapfilefd: 259 if self.mapfilefd:
260 self.mapfilefd.close() 260 self.mapfilefd.close()
261 261
262 def _convert(ui, src, dest=None, mapfile=None, **opts): 262 def _convert(ui, src, dest=None, mapfile=None, **opts):
263 '''Convert a foreign SCM repository to a Mercurial one. 263 """Convert a foreign SCM repository to a Mercurial one.
264 264
265 Accepted source formats: 265 Accepted source formats:
266 - GIT 266 - GIT
267 - CVS 267 - CVS
268 - SVN 268 - SVN
273 If no revision is given, all revisions will be converted. Otherwise, 273 If no revision is given, all revisions will be converted. Otherwise,
274 convert will only import up to the named revision (given in a format 274 convert will only import up to the named revision (given in a format
275 understood by the source). 275 understood by the source).
276 276
277 If no destination directory name is specified, it defaults to the 277 If no destination directory name is specified, it defaults to the
278 basename of the source with \'-hg\' appended. If the destination 278 basename of the source with '-hg' appended. If the destination
279 repository doesn\'t exist, it will be created. 279 repository doesn't exist, it will be created.
280 280
281 If <mapfile> isn\'t given, it will be put in a default location 281 If <mapfile> isn't given, it will be put in a default location
282 (<dest>/.hg/shamap by default). The <mapfile> is a simple text 282 (<dest>/.hg/shamap by default). The <mapfile> is a simple text
283 file that maps each source commit ID to the destination ID for 283 file that maps each source commit ID to the destination ID for
284 that revision, like so: 284 that revision, like so:
285 <source ID> <destination ID> 285 <source ID> <destination ID>
286 286
287 If the file doesn\'t exist, it\'s automatically created. It\'s updated 287 If the file doesn't exist, it's automatically created. It's updated
288 on each commit copied, so convert-repo can be interrupted and can 288 on each commit copied, so convert-repo can be interrupted and can
289 be run repeatedly to copy new commits. 289 be run repeatedly to copy new commits.
290 290
291 The [username mapping] file is a simple text file that maps each source 291 The [username mapping] file is a simple text file that maps each source
292 commit author to a destination commit author. It is handy for source SCMs 292 commit author to a destination commit author. It is handy for source SCMs
293 that use unix logins to identify authors (eg: CVS). One line per author 293 that use unix logins to identify authors (eg: CVS). One line per author
294 mapping and the line format is: 294 mapping and the line format is:
295 srcauthor=whatever string you want 295 srcauthor=whatever string you want
296 ''' 296 """
297 297
298 util._encoding = 'UTF-8' 298 util._encoding = 'UTF-8'
299 299
300 if not dest: 300 if not dest:
301 dest = hg.defaultdest(src) + "-hg" 301 dest = hg.defaultdest(src) + "-hg"