comparison mainwindow.cpp @ 121:6ce2ceb2c3a5

* Fix incremental log (was referring to "new" parents and so not actually returning anything)
author Chris Cannam
date Mon, 29 Nov 2010 11:04:52 +0000
parents c92f5859c707
children c3e8342d2de9
comparison
equal deleted inserted replaced
120:c92f5859c707 121:6ce2ceb2c3a5
996 } 996 }
997 } 997 }
998 998
999 void MainWindow::updateFileSystemWatcher() 999 void MainWindow::updateFileSystemWatcher()
1000 { 1000 {
1001 //!!! this needs to be incremental when something changes
1002
1003 delete fsWatcher; 1001 delete fsWatcher;
1004 fsWatcher = new QFileSystemWatcher(); 1002 fsWatcher = new QFileSystemWatcher();
1005 std::deque<QString> pending; 1003 std::deque<QString> pending;
1006 pending.push_back(workFolderPath); 1004 pending.push_back(workFolderPath);
1007 while (!pending.empty()) { 1005 while (!pending.empty()) {
1227 break; 1225 break;
1228 } 1226 }
1229 1227
1230 enableDisableActions(); 1228 enableDisableActions();
1231 1229
1232 // Typical sequence goes paths -> branch -> stat -> heads -> parents -> log 1230 // Sequence when no full log required:
1231 // paths -> branch -> stat -> incremental-log -> heads -> parents
1232 // Sequence when full log required:
1233 // paths -> branch -> stat -> heads -> parents -> log
1233 if (action == ACT_QUERY_PATHS) { 1234 if (action == ACT_QUERY_PATHS) {
1234 hgQueryBranch(); 1235 hgQueryBranch();
1235 } else if (action == ACT_QUERY_BRANCH) { 1236 } else if (action == ACT_QUERY_BRANCH) {
1236 hgStat(); 1237 hgStat();
1237 } else if (action == ACT_STAT) { 1238 } else if (action == ACT_STAT) {
1239 if (!needNewLog) {
1240 hgLogIncremental();
1241 } else {
1242 hgQueryHeads();
1243 }
1244 } else if (action == ACT_LOG_INCREMENTAL) {
1238 hgQueryHeads(); 1245 hgQueryHeads();
1239 } else if (action == ACT_QUERY_HEADS) { 1246 } else if (action == ACT_QUERY_HEADS) {
1240 hgQueryParents(); 1247 hgQueryParents();
1241 } else if (action == ACT_QUERY_PARENTS) { 1248 } else if (action == ACT_QUERY_PARENTS) {
1242 if (needNewLog) { 1249 if (needNewLog) {
1243 hgLog(); 1250 hgLog();
1244 } else {
1245 hgLogIncremental();
1246 } 1251 }
1247 } else 1252 } else
1248 /* Move to commandFailed 1253 /* Move to commandFailed
1249 if ((runningAction == ACT_MERGE) && (exitCode != 0)) 1254 if ((runningAction == ACT_MERGE) && (exitCode != 0))
1250 { 1255 {