[MERGE] get rid of os.spawnvp() usage for external diff

John Arbash Meinel john at arbash-meinel.com
Sat Jun 17 01:19:00 BST 2006


Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1


...


> 
> I don't see any handling of the case where patch is not installed.  Am I
> missing something?

I don't see where patch is needed for this.
All it does is run the external diff, and check that it has real patch 
headers. I didn't see anywhere that it tried to apply the patch.
Am I missing something?

> 
> Bonus points if you pass in -b, because that's more similar to
> internal_diff's output.

I thought '-b' would mean that it doesn't create a diff hunk for 
whitespace. Which is actually important for python. Again, the point of 
'external_diff' is to let people set whatever options they want. I 
suppose the test itself could use '-ub', but I'm not sure if that is useful.

> 
> We actually could support file-like objects with no descriptors, if we
> wanted to.  Something for later, I guess.
> 
> Aaron

Popen() doesn't support them, so you can't pass them as stdout for the 
spawned command.
You could create another temporary file, and then read in the output, 
and write it to the passed in file.
But why not let other people worry about that.

John
=:->




More information about the bazaar mailing list