Instead of running “svn diff”, “hg diff” and so on .. can we write a single command that calls svn/hg/git accordingly? Can the diff output be made pretty?
edit: command-line tools (not GUI) preferred.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Typing “svn diff” or “hg diff” is no fun if you had to type it again just to page the output with less. Further, when it is likely that your text editor does syntax highlighting .. there is no reason why the diff output in the terminal should not also be highlighted with appropriate colors.
alt text http://img25.imageshack.us/img25/8597/colordiff.png
You will need colordiff which can be installed via apt or macports.
The following bash function will enable one to type just `dif’ under the working directory of the VCS of your choice (no need to specify whether it is hg or svn).
It should be easy to add support for other VCS tools (git, cvs, etc..)
Additionally if you have UVC installed (as per Ryan Wilcox’s answer), the above script can be simplified as: