Mercurial > hg > easyhg
changeset 114:bb2d2eecdd60
* minor output fixes
author | Chris Cannam |
---|---|
date | Fri, 26 Nov 2010 21:17:24 +0000 |
parents | 5fc7b4fc77a8 |
children | 78374cefa10f |
files | grapher.cpp hgrunner.cpp mainwindow.cpp |
diffstat | 3 files changed, 14 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/grapher.cpp Fri Nov 26 21:04:40 2010 +0000 +++ b/grapher.cpp Fri Nov 26 21:17:24 2010 +0000 @@ -18,6 +18,7 @@ #include "grapher.h" #include "connectionitem.h" #include "dateitem.h" +#include "debug.h" #include <QGraphicsScene> @@ -58,7 +59,7 @@ } Changeset *cs = m_changesets[id]; ChangesetItem *item = m_items[id]; - std::cerr << "layoutRow: Looking at " << id.toStdString() << std::endl; + DEBUG << "layoutRow: Looking at " << id.toStdString() << endl; int row = 0; int nparents = cs->parents().size(); @@ -102,8 +103,8 @@ m_rowDates[row] = date; } - std::cerr << "putting " << cs->id().toStdString() << " at row " << row - << std::endl; + DEBUG << "putting " << cs->id().toStdString() << " at row " << row + << endl; item->setRow(row); m_handled.insert(id); @@ -112,7 +113,7 @@ void Grapher::layoutCol(QString id) { if (m_handled.contains(id)) { - std::cerr << "Already looked at " << id.toStdString() << std::endl; + DEBUG << "Already looked at " << id.toStdString() << endl; return; } if (!m_changesets.contains(id)) { @@ -123,7 +124,7 @@ } Changeset *cs = m_changesets[id]; -// std::cerr << "layoutCol: Looking at " << id.toStdString() << std::endl; +// DEBUG << "layoutCol: Looking at " << id.toStdString() << endl; ChangesetItem *item = m_items[id]; @@ -180,7 +181,7 @@ break; } -// std::cerr << "putting " << cs->id().toStdString() << " at col " << col << std::endl; +// DEBUG << "putting " << cs->id().toStdString() << " at col " << col << endl; m_alloc[row].insert(col); item->setColumn(col); @@ -300,7 +301,7 @@ } foreach (QString branch, m_branchRanges.keys()) { - std::cerr << branch.toStdString() << ": " << m_branchRanges[branch].first << " - " << m_branchRanges[branch].second << ", home " << m_branchHomes[branch] << std::endl; + DEBUG << branch.toStdString() << ": " << m_branchRanges[branch].first << " - " << m_branchRanges[branch].second << ", home " << m_branchHomes[branch] << endl; } } @@ -329,7 +330,7 @@ foreach (Changeset *cs, csets) { QString id = cs->id(); - std::cerr << id.toStdString() << std::endl; + DEBUG << id.toStdString() << endl; if (id == "") { throw LayoutException("Changeset has no ID"); @@ -390,7 +391,7 @@ qStableSort(csets.begin(), csets.end(), compareChangesetsByDate); foreach (Changeset *cs, csets) { - std::cerr << "id " << cs->id().toStdString() << ", ts " << cs->timestamp() << ", date " << cs->datetime().toStdString() << std::endl; + DEBUG << "id " << cs->id().toStdString() << ", ts " << cs->timestamp() << ", date " << cs->datetime().toStdString() << endl; } m_handled.clear();
--- a/hgrunner.cpp Fri Nov 26 21:04:40 2010 +0000 +++ b/hgrunner.cpp Fri Nov 26 21:17:24 2010 +0000 @@ -50,7 +50,7 @@ HgRunner::~HgRunner() { closeTerminal(); - delete m_proc; + if (m_proc) delete m_proc; } void HgRunner::requestAction(HgAction action) @@ -245,6 +245,7 @@ if (procExitCode == 0 && procExitStatus == QProcess::NormalExit) { DEBUG << "HgRunner::finished: Command completed successfully" << endl; + DEBUG << "stdout is " << m_stdout << endl; emit commandCompleted(completedAction, m_stdout); } else { DEBUG << "HgRunner::finished: Command failed, exit code " @@ -338,7 +339,7 @@ if (m_ptySlaveFilename != "") { DEBUG << "HgRunner: connecting to pseudoterminal" << endl; m_proc->setStandardInputFile(m_ptySlaveFilename); - m_proc->setStandardOutputFile(m_ptySlaveFilename); +// m_proc->setStandardOutputFile(m_ptySlaveFilename); // m_proc->setStandardErrorFile(m_ptySlaveFilename); } }