Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>After some digging, I came across the <a href="https://www.mercurial-scm.org/wiki/RdiffExtension" rel="nofollow noreferrer">Rdiff extension</a> that does most of what I want it to.</p> <p>It doesn't come with mercurial, but it can be installed by cloning the repository:</p> <pre><code>hg clone http://hg.kublai.com/mercurial/extensions/rdiff </code></pre> <p>And then modifing your ~/.hgrc file to load the extension:</p> <pre><code>[extensions] rdiff=~/path/to/rdiff/repo/rdiff.py </code></pre> <p>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.</p> <p>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:</p> <pre><code>hgrdiff() { hg commit -m "temp commit for remote diff" &amp;&amp; hg diff --reverse http://my_hardcoded_repo $* &amp;&amp; hg rollback # revert the temporary commit } </code></pre> <p>And then call it with:</p> <pre><code>hgrdiff &lt;filename to diff against remote repo tip&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload