Compare any two Mercurial revisions

Answered

In IntelliJ, how can I compare any two Mercurial revisions?

I want to see a left-hand tree view of all different files between the two revisions, and right-hand pane displaying the differenes for the file selected in the left-hand pane.

I should be able to select both revisions, choosing either:

- the current working directory
- by revision number
- by revision hash
- by branch
- by tag
- by bookmark
- etc.

The revision selection dialog should allow me to use revsets to filter revisions from which to select the one I want to use.

2
5 comments
Avatar
Permanently deleted user

You can choose repository directory from Project View and perform "Show History" for entire repository. Then you can choose 2 revisions (Speed Search available) and press "Ctrl+D" (show diff)-> the appropriate dialog with affected changes will be shown and inside its main panel you can press "Ctrl+D" (Show Diff) again for any file you want.
You can also perform "Compare with local"  from this history tab or "Show Affected Files".

There is another one action to compare with different branch/revision ->  "Mercurial ->Compare With -> select revision",  but it is available only for one file (not for directory).
 



Attachment(s):
Screen Shot 2015-06-08 at 7.00.55 PM.png
0

You can choose repository directory from Project View and perform "Show History" for entire repository.

 But only 1000 commits are available in history view

0

Number of commits in history is controlled by the Limit history to setting at Settings | Version Control

1

When comparing two revisions, changed files are listed.But in that list,identical files are listed. ie When open the file, it shows contents are identical

TortoiseHg Workbench also lists identical files, but i has option to enable/disable "Show identical files"

0

Files might be different not only in contents but e.g. line endings or permissions. If a file is not changed between revision it should not be shown.

Check if hg diff shows them.

> but i has option to enable/disable "Show identical files"

You are welcome to submit a request at https://youtrack.jetbrains.com/issues/IDEA

1

Please sign in to leave a comment.