Merge lp:~vila/bzr/osx-regressions into lp:~bzr/bzr/trunk-old

Proposed by John A Meinel on 2009-06-05
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vila/bzr/osx-regressions
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 30 lines
To merge this branch: bzr merge lp:~vila/bzr/osx-regressions
Reviewer Review Type Date Requested Status
John A Meinel Approve on 2009-06-05
Review via email:

This proposal supersedes a proposal from 2009-06-05.

To post a comment you must log in.
Vincent Ladeuil (vila) wrote : Posted in a previous version of this proposal

This patch fixes some test failures revealed on OSX 10.5 with python 2.6.

It seems that OSX changed the way it creates temp directories and that they can
now contain funny characters (including %), that's for the note() fix.

It also seems that '+' can appear repeatedly in these paths, which revealed
the wrong order used for the assertNotContainsRe() call (well known trap :-/).

John A Meinel (jameinel) wrote :

Sorry about the 'Resubmit' but code-review generated the preview against an old version of, and I didn't want to have to re-review my patch again. Will review now.

John A Meinel (jameinel) wrote :

This seems like a little bit of a band-aid, though I suppose people won't intermix

 note('foo %s %%s' % one, two)

Certainly the recommended form has been note('foo %s %s', one, two)

Anyway, both are better than before.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/tests/'
--- bzrlib/tests/ 2009-06-05 07:14:08 +0000
+++ bzrlib/tests/ 2009-06-05 14:35:11 +0000
@@ -728,9 +728,11 @@
728 def finished(self):728 def finished(self):
729 """See progress.ProgressBar.finished()."""729 """See progress.ProgressBar.finished()."""
731 def note(self, fmt_string, *args, **kwargs):731 def note(self, fmt_string, *args):
732 """See progress.ProgressBar.note()."""732 """See progress.ProgressBar.note()."""
733 self.stdout.write((fmt_string + "\n") % args)733 if args:
734 fmt_string = fmt_string % args
735 self.stdout.write(fmt_string + "\n")
735 def progress_bar(self):737 def progress_bar(self):
736 return self738 return self
=== modified file 'bzrlib/tests/'
--- bzrlib/tests/ 2009-03-24 01:53:42 +0000
+++ bzrlib/tests/ 2009-06-05 14:35:11 +0000
@@ -633,7 +633,7 @@
633 path = plugin.get_standard_plugins_path()633 path = plugin.get_standard_plugins_path()
634 self.assertEqual(plugin.get_default_plugin_path(), path[0])634 self.assertEqual(plugin.get_default_plugin_path(), path[0])
635 for directory in path:635 for directory in path:
636 self.assertNotContainsRe(r'\\/$', directory)636 self.assertNotContainsRe(directory, r'\\/$')
637 try:637 try:
638 from distutils.sysconfig import get_python_lib638 from distutils.sysconfig import get_python_lib
639 except ImportError:639 except ImportError: