6 # of the GNU General Public License, incorporated herein by reference. |
6 # of the GNU General Public License, incorporated herein by reference. |
7 |
7 |
8 from common import NoRepo, converter_source, converter_sink |
8 from common import NoRepo, converter_source, converter_sink |
9 from cvs import convert_cvs |
9 from cvs import convert_cvs |
10 from git import convert_git |
10 from git import convert_git |
11 from hg import convert_mercurial |
11 from hg import mercurial_source, mercurial_sink |
12 from subversion import convert_svn |
12 from subversion import convert_svn |
13 |
13 |
14 import os, shutil |
14 import os, shutil |
15 from mercurial import hg, ui, util, commands |
15 from mercurial import hg, ui, util, commands |
16 |
16 |
17 commands.norepo += " convert" |
17 commands.norepo += " convert" |
18 |
18 |
19 converters = [convert_cvs, convert_git, convert_svn, convert_mercurial] |
19 converters = [convert_cvs, convert_git, convert_svn, mercurial_source, |
|
20 mercurial_sink] |
20 |
21 |
21 def convertsource(ui, path, **opts): |
22 def convertsource(ui, path, **opts): |
22 for c in converters: |
23 for c in converters: |
23 if not hasattr(c, 'getcommit'): |
24 if not hasattr(c, 'getcommit'): |
24 continue |
25 continue |