diff options
author | Eric Day <eday@oddments.org> | 2010-10-21 11:49:51 -0700 |
---|---|---|
committer | Eric Day <eday@oddments.org> | 2010-10-21 11:49:51 -0700 |
commit | e012a2b73725bded6d4ac39747d57affda545770 (patch) | |
tree | 3c675423e1d7f5b187b70723bf0d02b3f1e5d1b5 /bzrplugins/novalog | |
parent | 3e3407f2e4f44e7f717bba94219bb0023695fc4d (diff) | |
download | nova-e012a2b73725bded6d4ac39747d57affda545770.tar.gz nova-e012a2b73725bded6d4ac39747d57affda545770.tar.xz nova-e012a2b73725bded6d4ac39747d57affda545770.zip |
PEP8 and pylint cleanup. There should be no functional changes here, just style changes to get violations down.
Diffstat (limited to 'bzrplugins/novalog')
-rw-r--r-- | bzrplugins/novalog/__init__.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/bzrplugins/novalog/__init__.py b/bzrplugins/novalog/__init__.py index e16b2e00f..9817dc886 100644 --- a/bzrplugins/novalog/__init__.py +++ b/bzrplugins/novalog/__init__.py @@ -17,13 +17,14 @@ import bzrlib.log from bzrlib.osutils import format_date -# -# This is mostly stolen from bzrlib.log.GnuChangelogLogFormatter -# The difference is that it logs the author rather than the committer -# which for Nova always is Tarmac. -# + class NovaLogFormat(bzrlib.log.GnuChangelogLogFormatter): + """This is mostly stolen from bzrlib.log.GnuChangelogLogFormatter + The difference is that it logs the author rather than the committer + which for Nova always is Tarmac.""" + preferred_levels = 1 + def log_revision(self, revision): """Log a revision, either merged or not.""" to_file = self.to_file @@ -38,13 +39,14 @@ class NovaLogFormat(bzrlib.log.GnuChangelogLogFormatter): to_file.write('%s %s\n\n' % (date_str, ", ".join(authors))) if revision.delta is not None and revision.delta.has_changed(): - for c in revision.delta.added + revision.delta.removed + revision.delta.modified: + for c in revision.delta.added + revision.delta.removed + \ + revision.delta.modified: path, = c[:1] to_file.write('\t* %s:\n' % (path,)) for c in revision.delta.renamed: - oldpath,newpath = c[:2] + oldpath, newpath = c[:2] # For renamed files, show both the old and the new path - to_file.write('\t* %s:\n\t* %s:\n' % (oldpath,newpath)) + to_file.write('\t* %s:\n\t* %s:\n' % (oldpath, newpath)) to_file.write('\n') if not revision.rev.message: @@ -56,4 +58,3 @@ class NovaLogFormat(bzrlib.log.GnuChangelogLogFormatter): to_file.write('\n') bzrlib.log.register_formatter('novalog', NovaLogFormat) - |