This morning I discovered that my co-worker had merged the wrong way between two branches in mercurial --we have a ver5 and ver6 branch, with extra files in ver6. Is there any w
This should do it. It uses a revset query to find any merges into ver5
from ver6
.
hg log -r 'children(p2(::ver5 and ::ver6 and merge()) and branch(ver6)) and branch(ver5)'
::ver5 and ::ver6 and merge()
finds all merges that are ancestors of both ver5
and ver6
branchesp2(...) and branch(ver6)
grabs the second parent (incoming changeset) that are on the ver6
branch.children(...) and branch(ver5)
then grabs the actual merge changeset that is on the ver5
branch.I recently needed to figure this out myself, but also needed to ensure that default
wasn't indirectly merged into my release branch, i.e. default -> feature -> release.