[REVIEW] Add basic --color support to bzr diff

Aaron Bentley aaron at aaronbentley.com
Tue Aug 12 16:41:22 BST 2008


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

Russ Brown wrote:
> I think I probably titled this email incorrectly and gave the wrong
> impression. The primary goal of this endeavour is to add a useful
> framework for coloured output to bzr in the generic sense, so it can be
> used by all commands and plugins equally.

In that case, perhaps it would be worth explaining your vision for how
this framework will work.

> The diff command was just a
> starting point: I could have started with status, for example. My goal
> is not simply to replace cdiff.

Maybe  it would be better to work on status.  We already have two ways
of generating a colorized diff:
1. bzr cdiff
2. bzr diff --using colordiff

Adding another option is confusing to users, and when it doesn't have
any apparent advantages, it's not something I'd recommend.

> I actually did use some of the code from cdiff, but much of it is very
> much geared to colouring diff specifically, while this patch is focused
> on adding colour support to bzr core that can be easily used from any
> command.

I don't see what you mean about cdiff's code being especially
diff-centric.  Another approach is to start by importing the cdiff
command and then adapting the code to support other commands.  Evolution
rather than revolution.  That would have negated all my concerns and
gotten you further faster.

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

iD8DBQFIoa8h0F+nu1YWqI0RAiYNAJ9PEDNTNoO9ZQxdsgeQ+MzRz2IwvwCdFRvZ
dOrZ6uzhPQ5V4vzwLPva5Ik=
=S6/i
-----END PGP SIGNATURE-----



More information about the bazaar mailing list