2008/12/11 Robert Collins <span dir="ltr"><<a href="mailto:robertc@robertcollins.net">robertc@robertcollins.net</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Robert Collins has voted tweak.<br>
Status is now: Conditionally approved</blockquote><div> </div><div>BTW. MartinP suggested a different approach on the mailing list, <br>which I'll pursue later. I think this can go in so long to pave the way.<br>We can always remove it later if it becomes redundant.<br>
<br>I addressed your concerns, and attached new version.<br><br>... <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
+ bzr_dir = osutils.dirname(osutils.realpath(sys.argv[0]))<br>
<br>
better as<br>
bzr_dir = bzrlib.__path__[0]</blockquote><div><br>I dont really aggree, since we want the workingtree containing the command being executed,<br>but I changed it to <br>bzr_dir = osutils.dirname(bzrlib.__path__[0])<br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">You have a bug:<br>
+ if (changed_content and kind[1] == 'file'<br>
... diff<br>
this will fail if it wasn't a file before.</blockquote><div>(it didn't fail, but it didn't pick up style regressions in this remote edge case).<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
+ if (changed_content and kind == ('file', 'file')<br>
<br>
will be safe; for the case where kind[0] != 'file', you should just askf or the content.<br>
</blockquote><div><br>fixed.<br>excellent catch.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
+ # Special workaround for Python2.3, where difflib fails if<br>
+ # both sequences are empty.<br>
+ if not oldlines and not newlines:<br>
+ return <br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
We don't support python2.3 - no need for this.</blockquote><div><br>:)<br>
this was copied from diff.internal_diff +- line 77<br>
I removed mine now.<br><br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">For details, see: <a href="http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C418c22640812071434nb0ccfc2ma10f851a41bf367d%40mail.gmail.com%3E" target="_blank">http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C418c22640812071434nb0ccfc2ma10f851a41bf367d%40mail.gmail.com%3E</a><br>
Project: Bazaar<br>
<br>
</div></div></blockquote></div><br>thanks for looking at this.<br>regards<br>marius<br><br>