changeset 306:b280a2dc0512 status_outside_tabs

Merge from the default branch
author Chris Cannam
date Sat, 26 Feb 2011 23:04:18 +0000
parents 031dddcd967f (current diff) 7708149d252a (diff)
children 5b4aa1c24407
files mainwindow.cpp
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/historywidget.cpp	Tue Feb 22 15:57:09 2011 +0000
+++ b/historywidget.cpp	Sat Feb 26 23:04:18 2011 +0000
@@ -141,7 +141,8 @@
         m_newIds.insert(cs->id());
     }
 
-    DEBUG << "addChangesets: " << csets.size() << " new changesets" << endl;
+    DEBUG << "addChangesets: " << csets.size() << " new changesets have ("
+          << m_changesets.size() << " already)" << endl;
 
     csets << m_changesets;
     m_changesets = csets;
--- 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;