Mercurial > hg > hg-fastimport
view fastimport/__init__.py @ 14:f6f0fd01b34a
Preliminary support for reading multiple input files.
| author | Greg Ward <greg-hg@gerg.ca> |
|---|---|
| date | Thu, 02 Apr 2009 17:16:02 -0400 |
| parents | 9461f5c3a67c |
| children |
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 ...') }
