[MERGE] get rid of os.spawnvp() usage for external diff
Aaron Bentley
aaron.bentley at utoronto.ca
Sat Jun 17 01:07:28 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> James Henstridge wrote:
>
>> On 09/06/06, John Arbash Meinel <john at arbash-meinel.com> wrote:
>
>
> I missed one other fixup when I did the review. You need an extra blank
> line before 'external_udiff_lines'. (At the top level all object are
> spaced by 2 blank lines.
>
>>> > def udiff_lines(old, new, allow_binary=False):
>>> > @@ -30,6 +30,15 @@
>>> > output.seek(0, 0)
>>> > return output.readlines()
>>> >
>>> > +def external_udiff_lines(old, new):
>>> > + output = TemporaryFile()
>>> > + external_diff('old', old, 'new', new, output, diff_opts=['-u'])
>>> > + output.seek(0, 0)
>>> > + lines = output.readlines()
>>> > + output.close()
>>> > + return lines
>>> > +
>>> > +
>>> >
>>>
>
> I went ahead and merged you and did some cleanup. (I'm trying to get the
> pending merges out of the mailing list). I went ahead and implemented
> mkstemp.
>
> Can I get a +1 to merge this into mainline?
I don't see any handling of the case where patch is not installed. Am I
missing something?
Bonus points if you pass in -b, because that's more similar to
internal_diff's output.
We actually could support file-like objects with no descriptors, if we
wanted to. Something for later, I guess.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEk0fA0F+nu1YWqI0RAlGgAJ0bleebClK1CG+4/zk+CHaWARf/oACfSB+I
WEJ4uW3XDjWarairgKKoid8=
=HjWk
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list