Search code examples
mercurial

Is there any way to see difference between last two versions of a file using hg commands?


I want something like this

hg vdiff filename.txt -lastRevision -secondLastRevision


Solution

  • I don't know what vdiff is, but how about:

    hg diff -r rev1 -r rev2 filename.txt
    

    Edit: to get the last 2 revisions, that would be:

    hg diff -r -2 -r -1 filename.txt
    

    Type hg help revisions for information about specifying revisions.