Mercurial > hg > easyhg
comparison mainwindow.cpp @ 143:f61f032b06f9
* Fix another use of stderr as identifier
author | Chris Cannam |
---|---|
date | Wed, 01 Dec 2010 11:54:01 +0000 |
parents | e6c6b88d19b9 |
children | 644bd31e8301 |
comparison
equal
deleted
inserted
replaced
142:46bf2a4a1fc8 | 143:f61f032b06f9 |
---|---|
1122 //!!! and something about updating | 1122 //!!! and something about updating |
1123 | 1123 |
1124 QMessageBox::information(this, "Pull complete", report); | 1124 QMessageBox::information(this, "Pull complete", report); |
1125 } | 1125 } |
1126 | 1126 |
1127 void MainWindow::commandFailed(HgAction action, QString stderr) | 1127 void MainWindow::commandFailed(HgAction action, QString output) |
1128 { | 1128 { |
1129 DEBUG << "MainWindow::commandFailed" << endl; | 1129 DEBUG << "MainWindow::commandFailed" << endl; |
1130 | 1130 |
1131 // Some commands we just have to ignore bad return values from: | 1131 // Some commands we just have to ignore bad return values from: |
1132 | 1132 |
1135 // uh huh | 1135 // uh huh |
1136 return; | 1136 return; |
1137 case ACT_INCOMING: | 1137 case ACT_INCOMING: |
1138 // returns non-zero code if the check was successful but there | 1138 // returns non-zero code if the check was successful but there |
1139 // are no changes pending | 1139 // are no changes pending |
1140 if (stderr.trimmed() == "") showIncoming(""); | 1140 if (output.trimmed() == "") showIncoming(""); |
1141 return; | 1141 return; |
1142 case ACT_FOLDERDIFF: | 1142 case ACT_FOLDERDIFF: |
1143 case ACT_FILEDIFF: | 1143 case ACT_FILEDIFF: |
1144 case ACT_CHGSETDIFF: | 1144 case ACT_CHGSETDIFF: |
1145 // external program, unlikely to be anything useful in stderr | 1145 // external program, unlikely to be anything useful in stderr |
1160 QString message = tr("<qt><h3>Command failed</h3>" | 1160 QString message = tr("<qt><h3>Command failed</h3>" |
1161 "<p>The following command failed:</p>" | 1161 "<p>The following command failed:</p>" |
1162 "<code>%1</code>" | 1162 "<code>%1</code>" |
1163 "%2</qt>") | 1163 "%2</qt>") |
1164 .arg(command) | 1164 .arg(command) |
1165 .arg((stderr.trimmed() != "") ? | 1165 .arg((output.trimmed() != "") ? |
1166 tr("<p>Its output said:</p><code>%1</code>") | 1166 tr("<p>Its output said:</p><code>%1</code>") |
1167 .arg(xmlEncode(stderr.left(800)) | 1167 .arg(xmlEncode(output.left(800)) |
1168 .replace("\n", "<br>")) | 1168 .replace("\n", "<br>")) |
1169 : ""); | 1169 : ""); |
1170 | 1170 |
1171 QMessageBox::warning(this, tr("Command failed"), message); | 1171 QMessageBox::warning(this, tr("Command failed"), message); |
1172 } | 1172 } |