comparison src/mainwindow.cpp @ 546:4edb47f8c3a3 fswatcher

Same for stdout
author Chris Cannam
date Tue, 14 Feb 2012 17:43:02 +0000
parents 3944da037ab8
children 06f7ae09015f
comparison
equal deleted inserted replaced
545:3944da037ab8 546:4edb47f8c3a3
1981 void MainWindow::commandStarting(HgAction action) 1981 void MainWindow::commandStarting(HgAction action)
1982 { 1982 {
1983 m_commandSequenceInProgress = true; 1983 m_commandSequenceInProgress = true;
1984 } 1984 }
1985 1985
1986 void MainWindow::commandFailed(HgAction action, QString stdErr, QString stdout) 1986 void MainWindow::commandFailed(HgAction action, QString stdErr, QString stdOut)
1987 { 1987 {
1988 DEBUG << "MainWindow::commandFailed" << endl; 1988 DEBUG << "MainWindow::commandFailed" << endl;
1989 1989
1990 m_commandSequenceInProgress = false; 1990 m_commandSequenceInProgress = false;
1991 1991
2064 reportAuthFailed(stdErr); 2064 reportAuthFailed(stdErr);
2065 return; 2065 return;
2066 } else if (stdErr.contains("entry cancelled")) { 2066 } else if (stdErr.contains("entry cancelled")) {
2067 // ignore this, user cancelled username or password dialog 2067 // ignore this, user cancelled username or password dialog
2068 return; 2068 return;
2069 } else if (stdErr.contains("no changes found") || stdout.contains("no changes found")) { 2069 } else if (stdErr.contains("no changes found") || stdOut.contains("no changes found")) {
2070 // success: hg 2.1 starts returning failure code for empty pull/push 2070 // success: hg 2.1 starts returning failure code for empty pull/push
2071 m_commandSequenceInProgress = true; // there may be further commands 2071 m_commandSequenceInProgress = true; // there may be further commands
2072 commandCompleted(action, stdout); 2072 commandCompleted(action, stdOut);
2073 return; 2073 return;
2074 } 2074 }
2075 break; // go on to default report 2075 break; // go on to default report
2076 case ACT_PUSH: 2076 case ACT_PUSH:
2077 if (stdErr.contains("creates new remote head")) { 2077 if (stdErr.contains("creates new remote head")) {
2081 reportAuthFailed(stdErr); 2081 reportAuthFailed(stdErr);
2082 return; 2082 return;
2083 } else if (stdErr.contains("entry cancelled")) { 2083 } else if (stdErr.contains("entry cancelled")) {
2084 // ignore this, user cancelled username or password dialog 2084 // ignore this, user cancelled username or password dialog
2085 return; 2085 return;
2086 } else if (stdErr.contains("no changes found") || stdout.contains("no changes found")) { 2086 } else if (stdErr.contains("no changes found") || stdOut.contains("no changes found")) {
2087 // success: hg 2.1 starts returning failure code for empty pull/push 2087 // success: hg 2.1 starts returning failure code for empty pull/push
2088 m_commandSequenceInProgress = true; // there may be further commands 2088 m_commandSequenceInProgress = true; // there may be further commands
2089 commandCompleted(action, stdout); 2089 commandCompleted(action, stdOut);
2090 return; 2090 return;
2091 } 2091 }
2092 break; // go on to default report 2092 break; // go on to default report
2093 case ACT_QUERY_HEADS_ACTIVE: 2093 case ACT_QUERY_HEADS_ACTIVE:
2094 case ACT_QUERY_HEADS: 2094 case ACT_QUERY_HEADS: