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

I need something like this

hg vdiff filename.txt -lastRevision -secondLastRevision

+3
source share
3 answers

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

hg diff -r rev1 -r rev2 filename.txt

Edit: to get the latest 2 versions, this would be:

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

Enter hg help revisionsfor information on updating changes.

+10
source

At the time of writing, the top answers relate to -1, -2and -3. Negative integers are historical artifacts and should not be used with modern Mercurial workflows.

, " " " ". , file ,

hg diff --change . filename.txt

filename.txt,

hg log --follow --patch --limit 1 filename.txt

--follow hg log , .

+5

Using

hg diff -r -3 -r -2 file
0
source

Source: https://habr.com/ru/post/1752014/


All Articles