On Wed, Mar 23, 2011 at 4:47 PM, Satish Balay <span dir="ltr"><<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, 23 Mar 2011, Matthew Knepley wrote:<br>
<br>
> On Wed, Mar 23, 2011 at 3:21 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
><br>
> ><br>
> > hg diff src/makefile<br>
> ><br>
> ><br>
> > How come there isn't an option to have it show the most recent set of<br>
> > changes? It seems I have to hunt down some "revision numbers" and type them<br>
> > in the request to get any useful information? How about something like<br>
> ><br>
> > hg diff --last src/makefile<br>
><br>
><br>
> The closest I can find is<br>
><br>
> hg diff -r-2 src/makefile<br>
><br>
> which diffs against the first revision before tip. However, if you pull a<br>
> bunch of revisions, there<br>
> is no guarantee that is right. You can generate this diff before the pull<br>
> using 'hg incoming', but<br>
> I can't yet find a command to give me the last thing pulled down.<br>
<br>
</div>hg diff by default does diff with working dir. What you want is:<br>
<br>
hg diff -c tip<br>
or<br>
hg diff -c -2<br>
<br>
The relative-rev numbering is based on full changeset numbering from<br>
tip - and not selective-file-changeset nubmering - which is what Barry<br>
wants.. I don't know if that exists..</blockquote><div><br></div><div>I will point out that this would be easy to write as an extension. We use</div><div>a 'bsmithdiff' diff that first calls 'log' to get the sequence of changesets</div>
<div>for this file, and then counts backwards.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font color="#888888"><br>
Satish</font></blockquote></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>