2 # |
2 # |
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> |
4 # |
4 # |
5 # This software may be used and distributed according to the terms of the |
5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. |
6 # GNU General Public License version 2 or any later version. |
7 |
7 from __future__ import absolute_import |
8 from common import NoRepo, MissingTool, SKIPREV, mapfile |
8 |
9 from cvs import convert_cvs |
9 import os |
10 from darcs import darcs_source |
10 import shlex |
11 from git import convert_git |
11 import shutil |
12 from hg import mercurial_source, mercurial_sink |
12 |
13 from subversion import svn_source, svn_sink |
13 from mercurial import ( |
14 from monotone import monotone_source |
14 encoding, |
15 from gnuarch import gnuarch_source |
15 error, |
16 from bzr import bzr_source |
16 hg, |
17 from p4 import p4_source |
17 util, |
18 import filemap |
18 ) |
19 |
|
20 import os, shutil, shlex |
|
21 from mercurial import hg, util, encoding, error |
|
22 from mercurial.i18n import _ |
19 from mercurial.i18n import _ |
|
20 |
|
21 from . import ( |
|
22 bzr, |
|
23 common, |
|
24 cvs, |
|
25 darcs, |
|
26 filemap, |
|
27 git, |
|
28 gnuarch, |
|
29 hg as hgconvert, |
|
30 monotone, |
|
31 p4, |
|
32 subversion, |
|
33 ) |
|
34 |
|
35 mapfile = common.mapfile |
|
36 MissingTool = common.MissingTool |
|
37 NoRepo = common.NoRepo |
|
38 SKIPREV = common.SKIPREV |
|
39 |
|
40 bzr_source = bzr.bzr_source |
|
41 convert_cvs = cvs.convert_cvs |
|
42 convert_git = git.convert_git |
|
43 darcs_source = darcs.darcs_source |
|
44 gnuarch_source = gnuarch.gnuarch_source |
|
45 mercurial_sink = hgconvert.mercurial_sink |
|
46 mercurial_source = hgconvert.mercurial_source |
|
47 monotone_source = monotone.monotone_source |
|
48 p4_source = p4.p4_source |
|
49 svn_sink = subversion.svn_sink |
|
50 svn_source = subversion.svn_source |
23 |
51 |
24 orig_encoding = 'ascii' |
52 orig_encoding = 'ascii' |
25 |
53 |
26 def recode(s): |
54 def recode(s): |
27 if isinstance(s, unicode): |
55 if isinstance(s, unicode): |