:wq - blog » color http://writequit.org/blog Tu fui, ego eris Mon, 22 Dec 2014 14:54:59 +0000 en-US hourly 1 http://wordpress.org/?v=4.1.5 Annoyance, colored diffs in perforce http://writequit.org/blog/2010/02/01/annoyance-colored-diffs-in-perforce/ http://writequit.org/blog/2010/02/01/annoyance-colored-diffs-in-perforce/#comments Mon, 01 Feb 2010 15:40:09 +0000 http://writequit.org/blog/?p=341 Quick one-off here, let’s begin.

Git has nice colored diffs, like this:

Perforce does not:

A simple script can remedy this:

Here’s the script:

Simply drop it somewhere in your $PATH and use it like so:

p4 diff | p4c.rb

You can find it in my one-offs directory (it’s called p4c.rb). We recently switched from subversion to perforce (definitely not my choice, I pushed for git), and so far it’s awful. I am definitely not a fan. This makes it a little better.

]]>
http://writequit.org/blog/2010/02/01/annoyance-colored-diffs-in-perforce/feed/ 7