[MERGE] Implement diff --using natively

Aaron Bentley aaron.bentley at utoronto.ca
Thu Dec 27 02:37:29 GMT 2007


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

Hi all,

This patch allows arbitrary diff programs to be used with Bazaar.

The --using flag takes a command name and command arguments, possibly
quoted.

$ ./bzr diff --using 'diff -U "1"'
=== modified file 'bzrlib/commands.py'
- --- old/bzrlib/commands.py      2007-12-26 21:24:41.000000000 -0500
+++ new/bzrlib/commands.py      2007-12-26 21:24:41.000000000 -0500
@@ -649,3 +649,3 @@
     if (alias):
- -        return shliex_split_unicode(alias)
+        return shlex_split_unicode(alias)
     return None

Unlike native diff, this necessarily includes 'old' and 'new' prefixes,
and the date on the old file does not reflect its commit time.  Unlike
Stephen Ward's difftools plugin, this support is not customized to the
specific program-- all tools are invoked the same way.

But on the positive side, it's tightly integrated into the core, which
makes it available to everyone, and it's certainly ripe for future
extension.

Aaron

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

iD8DBQFHcw/p0F+nu1YWqI0RAmCxAJ0Z0fX2EekTeP6YAXrK0UJ2lqIgxgCfbjpD
ppt7mE2v13nKwe7lpSpHaEc=
=MzLj
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff-using.patch
Type: text/x-diff
Size: 18445 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071226/6c7cf077/attachment.bin 


More information about the bazaar mailing list