[MERGE] Less bazaar coding style regressions.
Robert Collins
robertc at robertcollins.net
Thu Dec 11 20:50:51 GMT 2008
Robert Collins has voted tweak.
Status is now: Conditionally approved
Comment:
+ * ``bzr selftest`` now fails if new trailing white space is added
to the
+ bazaar sources.
+ (Marius Kruger)
+
Should be
+ * ``bzr selftest`` now fails if new trailing white space is added
to the
+ bazaar sources. (Marius Kruger)
+ def test_coding_style(self):
+ """ Check if bazaar code conforms to some coding style
conventions.
+
+ Currently we check all .py files for:
+ * new trailing white space
+ * new leading tabs
+ * new long lines (give warning only)
+ * no newline at end of files
+ """
should be
+ def test_coding_style(self):
+ """Check if bazaar code conforms to some coding style
conventions.
+
+ Currently we check all .py files for:
+ * new trailing white space
+ * new leading tabs
+ * new long lines (give warning only)
+ * no newline at end of files
+ """
(PEP-8)
+ bzr_dir = osutils.dirname(osutils.realpath(sys.argv[0]))
better as
bzr_dir = bzrlib.__path__[0]
+ iterator = new_tree.iter_changes(old_tree,
specific_files=None,
+ extra_trees=None, require_versioned=False)
->
iterator = new_tree.iter_changes(old_tree)
You have a bug:
+ if (changed_content and kind[1] == 'file'
... diff
this will fail if it wasn't a file before.
+ if (changed_content and kind == ('file', 'file')
will be safe; for the case where kind[0] != 'file', you should just askf
or the content.
+ # Special workaround for Python2.3, where difflib fails if
+ # both sequences are empty.
+ if not oldlines and not newlines:
+ return
We don't support python2.3 - no need for this.
For details, see:
http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C418c22640812071434nb0ccfc2ma10f851a41bf367d%40mail.gmail.com%3E
Project: Bazaar
More information about the bazaar
mailing list