diff mainwindow.cpp @ 306:b280a2dc0512 status_outside_tabs

Merge from the default branch
author Chris Cannam
date Sat, 26 Feb 2011 23:04:18 +0000
parents 031dddcd967f 7708149d252a
children 5b4aa1c24407
line wrap: on
line diff
--- a/mainwindow.cpp	Tue Feb 22 15:57:09 2011 +0000
+++ b/mainwindow.cpp	Sat Feb 26 23:04:18 2011 +0000
@@ -327,6 +327,16 @@
 
 void MainWindow::hgLogIncremental(QStringList prune)
 {
+    // Sometimes we can be called with prune empty -- it represents
+    // the current heads, but if we have none already and for some
+    // reason are being prompted for an incremental update, we may run
+    // into trouble.  In that case, make this a full log instead
+
+    if (prune.empty()) {
+        hgLog();
+        return;
+    }
+
     QStringList params;
     params << "log";
 
@@ -908,6 +918,7 @@
 
 void MainWindow::clearState()
 {
+    DEBUG << "MainWindow::clearState" << endl;
     foreach (Changeset *cs, m_currentParents) delete cs;
     m_currentParents.clear();
     foreach (Changeset *cs, m_currentHeads) delete cs;
@@ -1907,6 +1918,8 @@
         QStringList newHeadIds = Changeset::getIds(newHeads);
         if (oldHeadIds != newHeadIds) {
             DEBUG << "Heads changed, will prompt an incremental log if appropriate" << endl;
+            DEBUG << "Old heads: " << oldHeadIds.join(",") << endl;
+            DEBUG << "New heads: " << newHeadIds.join(",") << endl;
             headsChanged = true;
             foreach (Changeset *cs, m_currentHeads) delete cs;
             m_currentHeads = newHeads;