# HG changeset patch # User Chris Cannam # Date 1322047463 0 # Node ID 2262f753b19ef6b690ba3f910be36054d91a2fc7 # Parent 4276c7923d653113a2454c1c69094a8183a06691 Add more useful message for merge with working directory ancestor diff -r 4276c7923d65 -r 2262f753b19e src/mainwindow.cpp --- a/src/mainwindow.cpp Thu Nov 17 17:49:05 2011 +0000 +++ b/src/mainwindow.cpp Wed Nov 23 11:24:23 2011 +0000 @@ -2210,6 +2210,16 @@ // as the user closing the window via the wm happens return; case ACT_MERGE: + if (output.contains("working directory ancestor")) { + // arguably we should prevent this upfront, but that's + // trickier! + MoreInformationDialog::information + (this, tr("Merge"), tr("Merge has no effect"), + tr("You asked to merge a revision with one of its ancestors.

This has no effect, because the ancestor's changes already exist in both revisions."), + output); + return; + } + // else fall through case ACT_RETRY_MERGE: MoreInformationDialog::information (this, tr("Merge"), tr("Merge failed"),