'Is there a way to view all changes in my branch within a JetBrains IDE?

I have a mercurial branch with three commits and I would like to view the aggregate changes of these three commits within Rider.

I have TortiseHg and BeyondCompare available to me, but I am wondering if I can achieve what I'm looking for within the IDE.

I know I can use the Commit and Mercurial tabs to view the changes for a single commit, is there similar way to view all of the file changes for a branch?



Solution 1:[1]

For people using TortoiseHG (which is a common GUI front-end to Mercurial) it has a built-in feature for this.

In the Workbench window you can CTRL+click to select any two arbitrary commits in the history. Then right-click on one of those and select "Visual Diff".

That brings up a confirmation showing the relevant changed files. From there you can pick from one or more diff tools (I have WinMerge installed in addition to KDiff3 which comes with Tortoise) and click "Directory Diff".

(THG seems to know which available diff tools are capable of performing this action).

The diff tool should then show you first the difference between the sets of files, and then you can drill down into individual file diffs. (Both KDiff3 and WinMerge do this.)

Solution 2:[2]

There are multiple ways of doing this, here is how I'd do it:

You have a branch off default with three commits (A,B,C)

   C
  B
 A
D1
  1. Make sure you don't have uncommitted/working changes - shelve or commit them if you do.
  2. Update to the default branch which is the parent of your first branch commit (D1).
  3. Without updating, revert all changes to commit C (say C is rev 1234).

hg revert --all --rev=1234

or if you using thg just right click on the C commit and click 'revert all files' enter image description here

This updates your working directory to the changes made by commit A, B, and C, allowing reviewing them as a single change.

This is often a useful thing to do before merging a feature branch back to default.

Solution 3:[3]

Yes, this is possible pretty easily:

  1. Open the Git tab (Alt+9 keyboard shortcut in most cases)
  2. Filter to just the specific branch you are interested it
  3. Click on the newest commit in the branch (the top of the list)
  4. Press Ctrl on your keyboard and keep it pressed
  5. Scroll down in the list and click on the commit from which the branch was spawned off (it is easy to spot because the little circle glyph next to it will have a different color).

Example

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 StayOnTarget
Solution 2
Solution 3 Omer Raviv