[MERGE] Implement diff --using natively

Aaron Bentley aaron at aaronbentley.com
Fri Dec 28 15:39:39 GMT 2007


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

Robert Collins wrote:
> On Thu, 2007-12-27 at 22:50 -0500, Aaron Bentley wrote:
> 
>>> - (possibly) tool does not accept options
>> How would you detect this?  Exit codes?  I don't know if there's enough
>> regularity for that.  For example, gvimdiff produces exit code 1 when
>> given bad options, but for diff, exit code 1 means "files are different".
> 
> Something like that. A better question perhaps is
> 'How will we tell that the tool failed and the user did not get their
> diff?'

I don't think we can do that reliably.

> Perhaps requiring that the tool emit 'gnu diff' exit codes is
> reasonable?

I don't think so.  I want this to work with any arbitrary tool that can
be invoked as "COMMAND [ARGS] file1 file2".  But it might be safe to
work *best* with tools that emulate gnu diff, and assume exit code 2
indicates failure, without assuming that 0 or 1 indicate success.

> Oh, it looked like they did. If they don't actually run an external tool
> then never mind (but how can you tell it's working ? :))

The external tool I run is Python.  I figure they probably have that :-)

Aaron

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

iD8DBQFHdRi70F+nu1YWqI0RAj0hAJ9XlBXH+2kidZ/0RLOg3VinAxXG0ACeKH2K
bI1ijIK1haJE1ODFNU2FhAA=
=By0D
-----END PGP SIGNATURE-----



More information about the bazaar mailing list