Mercurial > hg > hg-fastimport
view hgfastimport/__init__.py @ 33:31b9a5805f02
Rename the extension's package from 'fastimport' to 'hgfastimport'.
| author | Greg Ward <greg-hg@gerg.ca> |
|---|---|
| date | Tue, 05 May 2009 10:27:27 -0400 |
| parents | fastimport/__init__.py@f6f0fd01b34a |
| children | 08e2157aaa9a |
line wrap: on
line source
from mercurial import commands import parser import hgechoprocessor import hgimport def fastimport(ui, repo, *sources, **opts): proc = hgimport.HgImportProcessor(ui, repo, **opts) #proc = hgechoprocessor.HgEchoProcessor(ui, repo, **opts) proc.setup() try: for source in sources: ui.write("Reading source: %s\n" % source) f = open(source) p = parser.ImportParser(f) proc._process(p.iter_commands) f.close() finally: proc.teardown() cmdtable = { "fastimport": (fastimport, [], 'hg fastimport SOURCE ...') }
