diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-12 02:39:11 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-12 02:39:11 +0200 |
commit | f9ba58d75e62aceb87391e2ac1fca126d5ac9b34 (patch) | |
tree | d9717a67a604807211bbc6078af8200e114d8ed5 | |
parent | 56203a5ee7cfae77b74af1e5e51f4cb37e2a0dc5 (diff) | |
download | python-fastimport-f9ba58d75e62aceb87391e2ac1fca126d5ac9b34.tar.gz |
Don't rely on bzrlib.trace.
-rw-r--r-- | fastimport/processor.py | 39 | ||||
-rw-r--r-- | fastimport/processors/filter_processor.py | 9 | ||||
-rw-r--r-- | fastimport/processors/info_processor.py | 1 |
3 files changed, 7 insertions, 42 deletions
diff --git a/fastimport/processor.py b/fastimport/processor.py index 77291ac..4ddca7b 100644 --- a/fastimport/processor.py +++ b/fastimport/processor.py @@ -23,12 +23,6 @@ for basing real processors on. See the processors package for examples. import sys import time -from bzrlib import debug -from bzrlib.trace import ( - mutter, - note, - warning, - ) import errors @@ -85,21 +79,13 @@ class ImportProcessor(object): break self.post_process() - def note(self, msg, *args): - """Output a note but timestamp it.""" - msg = "%s %s" % (self._time_of_day(), msg) - note(msg, *args) - def warning(self, msg, *args): """Output a warning but timestamp it.""" - msg = "%s WARNING: %s" % (self._time_of_day(), msg) - warning(msg, *args) + pass def debug(self, mgs, *args): - """Output a debug message if the appropriate -D option was given.""" - if "fast-import" in debug.debug_flags: - msg = "%s DEBUG: %s" % (self._time_of_day(), msg) - mutter(msg, *args) + """Output a debug message.""" + pass def _time_of_day(self): """Time of day as a string.""" @@ -172,26 +158,9 @@ class CommitHandler(object): handler(self, fc) self.post_process_files() - def note(self, msg, *args): - """Output a note but add context.""" - msg = "%s (%s)" % (msg, self.command.id) - note(msg, *args) - def warning(self, msg, *args): """Output a warning but add context.""" - msg = "WARNING: %s (%s)" % (msg, self.command.id) - warning(msg, *args) - - def mutter(self, msg, *args): - """Output a mutter but add context.""" - msg = "%s (%s)" % (msg, self.command.id) - mutter(msg, *args) - - def debug(self, msg, *args): - """Output a mutter if the appropriate -D option was given.""" - if "fast-import" in debug.debug_flags: - msg = "%s (%s)" % (msg, self.command.id) - mutter(msg, *args) + pass def pre_process_files(self): """Prepare for committing.""" diff --git a/fastimport/processors/filter_processor.py b/fastimport/processors/filter_processor.py index c8336f9..3b35a0c 100644 --- a/fastimport/processors/filter_processor.py +++ b/fastimport/processors/filter_processor.py @@ -18,9 +18,6 @@ from bzrlib import osutils -from bzrlib.trace import ( - warning, - ) from fastimport import ( commands, helpers, @@ -184,7 +181,7 @@ class FilterProcessor(processor.ImportProcessor): elif isinstance(fc, commands.FileCopyCommand): fc = self._convert_copy(fc) else: - warning("cannot handle FileCommands of class %s - ignoring", + self.warning("cannot handle FileCommands of class %s - ignoring", fc.__class__) continue if fc is not None: @@ -264,7 +261,7 @@ class FilterProcessor(processor.ImportProcessor): # to. Maybe fast-import-info needs to be extended to # remember all renames and a config file can be passed # into here ala fast-import? - warning("cannot turn rename of %s into an add of %s yet" % + self.warning("cannot turn rename of %s into an add of %s yet" % (old, new)) return None @@ -294,6 +291,6 @@ class FilterProcessor(processor.ImportProcessor): # to. Maybe fast-import-info needs to be extended to # remember all copies and a config file can be passed # into here ala fast-import? - warning("cannot turn copy of %s into an add of %s yet" % + self.warning("cannot turn copy of %s into an add of %s yet" % (src, dest)) return None diff --git a/fastimport/processors/info_processor.py b/fastimport/processors/info_processor.py index 6d8c15d..2575b4b 100644 --- a/fastimport/processors/info_processor.py +++ b/fastimport/processors/info_processor.py @@ -44,7 +44,6 @@ class InfoProcessor(processor.ImportProcessor): outf=outf) def pre_process(self): - self.note("Collecting statistics ...") # Init statistics self.cmd_counts = {} for cmd in commands.COMMAND_NAMES: |