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

Aaron Bentley aaron.bentley at utoronto.ca
Sat Jun 17 01:46:40 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Arbash Meinel wrote:
> The test is skipped in that case.
> Do you need the external_code to handle it specifically.

I think that would be best.  If you look at how we invoke diff3,
(patch.py) we throw NoDiff3 when it's not present.

I pity the user who gets 'No such file or directory' when they run 'bzr
diff --diff-options=-p.

>> Sorry,  --binary.
> 
> 
> I would be up for that. It does nothing on posix platforms, but is very
> important for windows. Should we always be setting this flag, or just in
> the test suite?

I think always, because we transparently switch to external patch when
certain options are supplied, and so we should minimize the differences.

>> It's easier than that:
>> p = Popen(stdout=PIPE)
>> to_file.writelines(p.stdout.readlines())

> The problem is if the output is larger than say 8K, then this would
> block.

No, that's not when we'd block.  readlines will block until diff has
sent us everything.  Which is fine.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEk1Dw0F+nu1YWqI0RAoEsAJ99L+SvJMMFjuhpQgsjAy6yYlT07QCdF4Zw
j7wopfI12TjmTeW/2XvYVDk=
=U3QK
-----END PGP SIGNATURE-----




More information about the bazaar mailing list