[MERGE] Make annotate behave in a non-ASCII world (v3)

Adeodato Simó dato at net.com.org.es
Sun Jul 8 14:56:11 BST 2007


* John Arbash Meinel [Sat, 07 Jul 2007 12:01:03 -0400]:

> John Arbash Meinel has voted +1 (conditional).
> Status is now: Semi-approved
> Comment:
> Your tests have a slight flaw you are writing to 'to_file' but you are 
> comparing against 'sio.getvalue()'. Since it isn't changing, obviously it 
> matches what it matched the last time.

God, you're so right. Yay peer review, etc. :-)

Updated bundle attached.

=== modified file 'bzrlib/tests/test_annotate.py'
--- bzrlib/tests/test_annotate.py	2007-07-06 20:24:43 +0000
+++ bzrlib/tests/test_annotate.py	2007-07-08 13:50:13 +0000
@@ -331,12 +331,12 @@
         to_file = tests.StringIOWrapper()
         to_file.encoding = None
         annotate.annotate_file(tree1.branch, 'rev-2', 'b-id', to_file=to_file)
-        self.assertContainsRe('2   p.rez   | bye\n', sio.getvalue())
+        self.assertContainsRe('2   p.rez   | bye\n', to_file.getvalue())
 
         # and when it does not exist
         to_file = StringIO()
         annotate.annotate_file(tree1.branch, 'rev-2', 'b-id', to_file=to_file)
-        self.assertContainsRe('2   p.rez   | bye\n', sio.getvalue())
+        self.assertContainsRe('2   p.rez   | bye\n', to_file.getvalue())
 
 
> I haven't heard anything from Ian, but otherwise I'm happy with the patch, 
> and think it is worth 0.18 if someone else agrees.

CCing Ian to see if he wants to comment.

Cheers,

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
Don't worry about what anybody else is going to do. The best way to
predict the future is to invent it.
                -- Alan Kay
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr.annotate_fixes.diff
Type: text/x-diff
Size: 15511 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070708/195e1093/attachment.bin 


More information about the bazaar mailing list