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

  • SEARCH
  • Home
  • 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 69247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:32:36+00:00 2026-05-10T19:32:36+00:00

When using mercurial, I’d like to be able to diff the working copy of

  • 0

When using mercurial, I’d like to be able to diff the working copy of a file with the tip file in my default remote repository. Is there an easy way to do this?

I know I can do an ‘hg incoming -p’ to see the patch sets of changes coming in, but it’d be nice to just directly see the actual changes for a particular file that I’d get if I do a pull of the latest stuff (or what I might be about put push out).

The easiest thing I can think of right now is to create a little script that takes a look at the default location in .hg/hgrc and downloads the file using curl (if it’s over http, otherwise scp it over ssh, or just do a direct diff if it’s on the local file system) and then to diff the working copy or the tip against that temporary copy.

I’m trying to sell mercurial to my team, and one of my team members brought this up today as something that they’re able to do easily in SVN with their GUI tools.

  • 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. 2026-05-10T19:32:37+00:00Added an answer on May 10, 2026 at 7:32 pm

    After some digging, I came across the Rdiff extension that does most of what I want it to.

    It doesn’t come with mercurial, but it can be installed by cloning the repository:

    hg clone http://hg.kublai.com/mercurial/extensions/rdiff  

    And then modifing your ~/.hgrc file to load the extension:

    [extensions]  rdiff=~/path/to/rdiff/repo/rdiff.py 

    It’s a little quirky in that it actually modifies the existing ‘hg diff’ command by detecting if the first parameter is a remote URL. If it is then it will diff that file against your tip file in your local repo (not the working copy). This as the remote repo is first in the arguments, it’s the reverse of what I’d expect, but you can pass ‘–reverse’ to the hg diff command to switch that around.

    I could see these being potential enhancements to the extension, but for now, I can work around them with a bash/zsh shell function in my starup file. It does a temp checkin of my working copy (held by the mercurial transaction so it can be rolled back), executes the reverse diff, and then rolls the transaction back to return things back to the way they were:

    hgrdiff() {     hg commit -m 'temp commit for remote diff' &&      hg diff --reverse http://my_hardcoded_repo $* &&     hg rollback      # revert the temporary commit } 

    And then call it with:

    hgrdiff <filename to diff against remote repo tip> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Select Catg, Count(*) From TableName Group By CatG For the… May 11, 2026 at 3:32 pm
  • added an answer Soundex won't help you. Soundex focuses on the beginning of… May 11, 2026 at 3:32 pm
  • added an answer I would use levels of linked lists. message1 message2 message3… May 11, 2026 at 3:32 pm

Related Questions

When using mercurial, I'd like to be able to diff the working copy of
When using Mercurial I sometimes find that it is hard to understand the relationship
It seems rather common (around here, at least) for people to recommend SVN to
Here are two different questions but I think they are related. When using Git,
I've decided that I want to use Mercurial for a small, personal project. Most

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.