Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/convert/__init__.py @ 5013:6c1029aacc9a
convert: Support Mercurial as a source, as well as a sink
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 26 Jul 2007 13:34:36 -0700 |
parents | be25decfdb13 |
children | 914054ca532e |
comparison
equal
deleted
inserted
replaced
5012:be25decfdb13 | 5013:6c1029aacc9a |
---|---|
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 |