Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 543857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:35:39+00:00 2026-05-13T10:35:39+00:00

Instead of running svn diff, hg diff and so on .. can we write

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:35:40+00:00Added an answer on May 13, 2026 at 10:35 am

    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).

    function dif {
       if [ -d .hg ]; then
           VC='hg'
       elif [ -d .svn ]; then
           VC='svn'
       else
           echo "cannot find VC type"
           return 1
       fi
       $VC diff $1 | colordiff | less -R
    }
    

    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:

    function dif {
       uvc diff $1 | colordiff | less -R
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 342k
  • Answers 342k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Unless you give focus to a control within the page… May 14, 2026 at 5:08 am
  • Editorial Team
    Editorial Team added an answer The problem wasn't with Asp.net but with Sitecore (A CMS),… May 14, 2026 at 5:08 am
  • Editorial Team
    Editorial Team added an answer You can use System.Threading.ThreadPool or the upcoming Task Parallel Library… May 14, 2026 at 5:08 am

Related Questions

When I try to do any svn command and supply the --username and/or --password
I'm running VisualSVN as my SVN server and using TortoiseSVN as the client. I've
I have a laptop running Ubuntu that I would like to act as a
I'm new to Linux and have inherited keeping our single linux server running. It's
Let me start by telling you that I never used anything besides SVN and

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.