# HG changeset patch # User Chris Cannam # Date 1291029269 0 # Node ID c3e8342d2de929a8e9f34e5aa23025223ed315ad # Parent 6ce2ceb2c3a5e4f04e12ad9638109394a8796875 * Further fix to incremental log (put new changesets on the correct end of the list!) diff -r 6ce2ceb2c3a5 -r c3e8342d2de9 grapher.cpp --- a/grapher.cpp Mon Nov 29 11:04:52 2010 +0000 +++ b/grapher.cpp Mon Nov 29 11:14:29 2010 +0000 @@ -123,7 +123,7 @@ } Changeset *cs = m_changesets[id]; -// DEBUG << "layoutCol: Looking at " << id.toStdString() << endl; + DEBUG << "layoutCol: Looking at " << id.toStdString() << endl; ChangesetItem *item = m_items[id]; @@ -180,7 +180,7 @@ break; } -// DEBUG << "putting " << cs->id().toStdString() << " at col " << col << endl; + DEBUG << "putting " << cs->id().toStdString() << " at col " << col << endl; m_alloc[row].insert(col); item->setColumn(col); diff -r 6ce2ceb2c3a5 -r c3e8342d2de9 hgrunner.cpp --- a/hgrunner.cpp Mon Nov 29 11:04:52 2010 +0000 +++ b/hgrunner.cpp Mon Nov 29 11:14:29 2010 +0000 @@ -52,7 +52,7 @@ closeTerminal(); if (m_proc) { m_proc->kill(); - delete m_proc; + m_proc->deleteLater(); } } diff -r 6ce2ceb2c3a5 -r c3e8342d2de9 historywidget.cpp --- a/historywidget.cpp Mon Nov 29 11:04:52 2010 +0000 +++ b/historywidget.cpp Mon Nov 29 11:14:29 2010 +0000 @@ -55,7 +55,7 @@ void HistoryWidget::parseNewLog(QString log) { DEBUG << "HistoryWidget::parseNewLog: log has " << log.length() << " chars" << endl; - Changesets csets = parseChangeSets(log); + Changesets csets = Changeset::parseChangesets(log); DEBUG << "HistoryWidget::parseNewLog: log has " << csets.size() << " changesets" << endl; clearChangesets(); m_changesets = csets; @@ -65,16 +65,19 @@ void HistoryWidget::parseIncrementalLog(QString log) { DEBUG << "HistoryWidget::parseIncrementalLog: log has " << log.length() << " chars" << endl; - Changesets csets = parseChangeSets(log); + Changesets csets = Changeset::parseChangesets(log); DEBUG << "HistoryWidget::parseIncrementalLog: log has " << csets.size() << " changesets" << endl; if (!csets.empty()) { - m_changesets << csets; + csets << m_changesets; + m_changesets = csets; layoutAll(); } } void HistoryWidget::layoutAll() { + setChangesetParents(); + ChangesetScene *scene = new ChangesetScene(); ChangesetItem *tipItem = 0; @@ -98,16 +101,14 @@ if (tipItem) tipItem->ensureVisible(); } -Changesets HistoryWidget::parseChangeSets(QString changeSetsStr) +void HistoryWidget::setChangesetParents() { - Changesets csets = Changeset::parseChangesets(changeSetsStr); - for (int i = 0; i+1 < csets.size(); ++i) { - Changeset *cs = csets[i]; + for (int i = 0; i+1 < m_changesets.size(); ++i) { + Changeset *cs = m_changesets[i]; if (cs->parents().empty()) { QStringList list; - list.push_back(csets[i+1]->id()); + list.push_back(m_changesets[i+1]->id()); cs->setParents(list); } } - return csets; } diff -r 6ce2ceb2c3a5 -r c3e8342d2de9 historywidget.h --- a/historywidget.h Mon Nov 29 11:04:52 2010 +0000 +++ b/historywidget.h Mon Nov 29 11:14:29 2010 +0000 @@ -44,7 +44,7 @@ void clearChangesets(); void layoutAll(); - Changesets parseChangeSets(QString); + void setChangesetParents(); }; #endif diff -r 6ce2ceb2c3a5 -r c3e8342d2de9 mainwindow.cpp --- a/mainwindow.cpp Mon Nov 29 11:04:52 2010 +0000 +++ b/mainwindow.cpp Mon Nov 29 11:14:29 2010 +0000 @@ -1023,13 +1023,15 @@ this, SLOT(fsFileChanged(QString))); } -void MainWindow::fsDirectoryChanged(QString) +void MainWindow::fsDirectoryChanged(QString d) { + DEBUG << "MainWindow::fsDirectoryChanged " << d << endl; hgStat(); } -void MainWindow::fsFileChanged(QString) +void MainWindow::fsFileChanged(QString f) { + DEBUG << "MainWindow::fsFileChanged " << f << endl; hgStat(); }