mercurial - see changes on the branch ignoring all the merge commits

branch, branching-and-merging, diff, mercurial

Solution

You have to read about revsets syntax

Your case

`hg log -r "branch('myBranch') and ! merge()"`

Problem

I have a branch that was developed for a long period of time. During the development default branch was merged into that branch several times. I would like now to review all the changes done on that branch ignoring merges, to decide whether it is safe to merge it to default. I tried `hg diff -r "branch('myBranch') - merge()"` but it still shows changes introduced by merges. Also tried following this How to show the diff specific to a named branch in mercurial but `hg diff -r "branch('myBranch') - branch('default')"` still bring changes introduced by merges.

Original source

Related problems