# HG changeset patch # User Chris Cannam # Date 1294144948 0 # Node ID 8c8c04bdf0faa37f9f3f7aabc3caa0dc081cf76f # Parent f16fe0db11f35d6abaf62a4e52e158e4536c20ca * Separate out the hg test action into two tests, one for plain hg and one with the extension (so can report separately) diff -r f16fe0db11f3 -r 8c8c04bdf0fa hgaction.h --- a/hgaction.h Mon Jan 03 22:02:08 2011 +0000 +++ b/hgaction.h Tue Jan 04 12:42:28 2011 +0000 @@ -25,6 +25,7 @@ { ACT_NONE, ACT_TEST_HG, + ACT_TEST_HG_EXT, ACT_QUERY_PATHS, ACT_QUERY_BRANCH, ACT_STAT, @@ -75,6 +76,8 @@ bool shouldBeFast() const { switch (action) { case ACT_NONE: + case ACT_TEST_HG: + case ACT_TEST_HG_EXT: case ACT_QUERY_PATHS: case ACT_QUERY_BRANCH: case ACT_STAT: @@ -90,7 +93,7 @@ bool mayBeInteractive() const { switch (action) { - case ACT_TEST_HG: // so we force the module load to be tested + case ACT_TEST_HG_EXT: // so we force the module load to be tested case ACT_INCOMING: case ACT_PUSH: case ACT_PULL: diff -r f16fe0db11f3 -r 8c8c04bdf0fa mainwindow.cpp --- a/mainwindow.cpp Mon Jan 03 22:02:08 2011 +0000 +++ b/mainwindow.cpp Tue Jan 04 12:42:28 2011 +0000 @@ -194,6 +194,13 @@ runner->requestAction(HgAction(ACT_TEST_HG, m_myDirPath, params)); } +void MainWindow::hgTestExtension() +{ + QStringList params; + params << "--version"; + runner->requestAction(HgAction(ACT_TEST_HG_EXT, m_myDirPath, params)); +} + void MainWindow::hgStat() { QStringList params; @@ -1487,7 +1494,15 @@ QMessageBox::warning (this, tr("Failed to run Mercurial"), format3(tr("Failed to run Mercurial"), - tr("The Mercurial program either could not be found or failed to run.
This may indicate a problem with the Mercurial installation, or with the EasyHg interaction extension.

%1").arg(output == "" ? QString("") : tr("The test command said:")), + tr("The Mercurial program either could not be found or failed to run.
Check that the Mercurial program path is correct in Settings.

%1").arg(output == "" ? QString("") : tr("The test command said:")), + output)); + settings(); + return; + case ACT_TEST_HG_EXT: + QMessageBox::warning + (this, tr("Failed to run Mercurial"), + format3(tr("Failed to run Mercurial with extension enabled"), + tr("The Mercurial program failed to run with the EasyMercurial interaction extension enabled.
This may indicate an installation problem with EasyMercurial.

You may be able to continue working if you switch off “Use EasyHg Mercurial Extension” in Settings. Note that remote repositories that require authentication may not work if you do this.

%1").arg(output == "" ? QString("") : tr("The test command said:")), output)); settings(); return; @@ -1555,6 +1570,9 @@ case ACT_TEST_HG: break; + case ACT_TEST_HG_EXT: + break; + case ACT_QUERY_PATHS: { DEBUG << "stdout is " << output << endl; @@ -1741,6 +1759,10 @@ switch (action) { case ACT_TEST_HG: + hgTestExtension(); + break; + + case ACT_TEST_HG_EXT: hgQueryPaths(); break; diff -r f16fe0db11f3 -r 8c8c04bdf0fa mainwindow.h --- a/mainwindow.h Mon Jan 03 22:02:08 2011 +0000 +++ b/mainwindow.h Tue Jan 04 12:42:28 2011 +0000 @@ -74,6 +74,7 @@ void showAllChanged(bool); void hgTest(); + void hgTestExtension(); void hgQueryPaths(); void hgStat(); void hgRemove();