comparison hgext/convert/__init__.py @ 5513:f0c58fd4b798

convert: add support for Subversion as a sink
author Bryan O'Sullivan <bos@serpentine.com>
date Wed, 07 Nov 2007 18:26:59 -0800
parents 11d7908a3ea8
children 6ffca2bf23da
comparison
equal deleted inserted replaced
5512:8cd26ccc68f8 5513:f0c58fd4b798
8 from common import NoRepo, SKIPREV, converter_source, converter_sink, mapfile 8 from common import NoRepo, SKIPREV, converter_source, converter_sink, mapfile
9 from cvs import convert_cvs 9 from cvs import convert_cvs
10 from darcs import darcs_source 10 from darcs import darcs_source
11 from git import convert_git 11 from git import convert_git
12 from hg import mercurial_source, mercurial_sink 12 from hg import mercurial_source, mercurial_sink
13 from subversion import svn_source, debugsvnlog 13 from subversion import debugsvnlog, svn_source, svn_sink
14 import filemap 14 import filemap
15 15
16 import os, shutil 16 import os, shutil
17 from mercurial import hg, ui, util, commands 17 from mercurial import hg, ui, util, commands
18 from mercurial.i18n import _ 18 from mercurial.i18n import _
27 ('darcs', darcs_source), 27 ('darcs', darcs_source),
28 ] 28 ]
29 29
30 sink_converters = [ 30 sink_converters = [
31 ('hg', mercurial_sink), 31 ('hg', mercurial_sink),
32 ('svn', svn_sink),
32 ] 33 ]
33 34
34 def convertsource(ui, path, type, rev): 35 def convertsource(ui, path, type, rev):
35 for name, source in source_converters: 36 for name, source in source_converters:
36 try: 37 try:
281 - git 282 - git
282 - Subversion 283 - Subversion
283 284
284 Accepted destination formats: 285 Accepted destination formats:
285 - Mercurial 286 - Mercurial
287 - Subversion (history on branches is not preserved)
286 288
287 If no revision is given, all revisions will be converted. Otherwise, 289 If no revision is given, all revisions will be converted. Otherwise,
288 convert will only import up to the named revision (given in a format 290 convert will only import up to the named revision (given in a format
289 understood by the source). 291 understood by the source).
290 292