On Wed, Mar 23, 2011 at 4:47 PM, Satish Balay <balay@mcs.anl.gov> wrote:
On Wed, 23 Mar 2011, Matthew Knepley wrote:

> On Wed, Mar 23, 2011 at 3:21 PM, Barry Smith <bsmith@mcs.anl.gov> wrote:
>
> >
> >  hg diff src/makefile
> >
> >
> >   How come there isn't an option to have it show the most recent set of
> > changes? It seems I have to hunt down some "revision numbers" and type them
> > in the request to get any useful information? How about something like
> >
> >  hg diff --last src/makefile
>
>
> The closest I can find is
>
>   hg diff -r-2 src/makefile
>
> which diffs against the first revision before tip. However, if you pull a
> bunch of revisions, there
> is no guarantee that is right. You can generate this diff before the pull
> using 'hg incoming', but
> I can't yet find a command to give me the last thing pulled down.

hg diff by default does diff with working dir. What you want is:

hg diff -c tip
or
hg diff -c -2

The relative-rev numbering is based on full changeset numbering from
tip - and not selective-file-changeset nubmering - which is what Barry
wants.. I don't know if that exists..

I will point out that this would be easy to write as an extension. We use
a 'bsmithdiff' diff that first calls 'log' to get the sequence of changesets
for this file, and then counts backwards.

   Matt
 

Satish
--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener