Nikos Athanasiou
Nikos Athanasiou

Reputation: 31489

Mercurial - How do I diff with a previous version?

I'm using the command

hg kdiff3 filename

to visualize differences between my current status and what's pushed in the master repository.

If I was to see the differences between a specific revision (say 5 commits back) and the current, how would I do it?

Upvotes: 1

Views: 1013

Answers (1)

msw
msw

Reputation: 43487

To see the changes between two versions of a file in the repository:

 hg kdiff3 -r 4 filename

where the current version is assumed to be the "other" changeset. If you want to compare two past revisions:

 hg log filename
 hg kdiff3 -r2 -r7 filename

where the revision numbers -r2 -r7 are drawn from the changeset log.

Upvotes: 4

Related Questions