Mercurial > hg > easyhg
diff src/grapher.cpp @ 691:5b3bcb2d0943
Update handling of auth extension load failures on Windows: hg itself is returning a successful error code, so we must check the output in the extension test phase. Also fix a failure & crash when trying to use fallback auth mechanism
author | Chris Cannam |
---|---|
date | Mon, 10 Dec 2018 12:03:04 +0000 |
parents | ae67ea0af696 |
children |
line wrap: on
line diff
--- a/src/grapher.cpp Mon Dec 10 10:28:25 2018 +0000 +++ b/src/grapher.cpp Mon Dec 10 12:03:04 2018 +0000 @@ -24,6 +24,8 @@ #include <iostream> +//#define GRAPHER_VERBOSE_DEBUG 1 + Grapher::Grapher(ChangesetScene *scene) : m_scene(scene) { @@ -74,7 +76,9 @@ } Changeset *cs = m_changesets[id]; ChangesetItem *item = m_items[id]; +#ifdef GRAPHER_VERBOSE_DEBUG DEBUG << "layoutRow: Looking at " << id.toStdString() << endl; +#endif int row = 0; int nparents = cs->parents().size(); @@ -129,9 +133,11 @@ m_uncommittedParentRow = row; } +#ifdef GRAPHER_VERBOSE_DEBUG DEBUG << "putting " << cs->id().toStdString() << " at row " << row << endl; - +#endif + item->setRow(row); m_handled.insert(id); } @@ -139,7 +145,9 @@ void Grapher::layoutCol(QString id) { if (m_handled.contains(id)) { +#ifdef GRAPHER_VERBOSE_DEBUG DEBUG << "Already looked at " << id.toStdString() << endl; +#endif return; } if (!m_changesets.contains(id)) { @@ -150,7 +158,9 @@ } Changeset *cs = m_changesets[id]; +#ifdef GRAPHER_VERBOSE_DEBUG DEBUG << "layoutCol: Looking at " << id.toStdString() << endl; +#endif ChangesetItem *item = m_items[id]; @@ -209,8 +219,10 @@ break; } +#ifdef GRAPHER_VERBOSE_DEBUG DEBUG << "putting " << cs->id().toStdString() << " at col " << col << endl; - +#endif + m_alloc[row].insert(col); item->setColumn(col); m_handled.insert(id); @@ -246,7 +258,9 @@ // connection lines foreach (QString childId, cs->children()) { +#ifdef GRAPHER_VERBOSE_DEBUG DEBUG << "reserving connection line space" << endl; +#endif if (!m_items.contains(childId)) continue; Changeset *child = m_changesets[childId]; int childRow = m_items[childId]->row(); @@ -272,7 +286,9 @@ } } if (special.size() == 2) { +#ifdef GRAPHER_VERBOSE_DEBUG DEBUG << "handling split-in-two for children " << special[0] << " and " << special[1] << endl; +#endif for (int i = 0; i < 2; ++i) { int off = i * 2 - 1; // 0 -> -1, 1 -> 1 ChangesetItem *it = m_items[special[i]]; @@ -352,9 +368,11 @@ m_branchHomes[branch] = home; } +#ifdef GRAPHER_VERBOSE_DEBUG foreach (QString branch, m_branchRanges.keys()) { DEBUG << branch.toStdString() << ": " << m_branchRanges[branch].first << " - " << m_branchRanges[branch].second << ", home " << m_branchHomes[branch] << endl; } +#endif } static bool @@ -630,10 +648,12 @@ qStableSort(csets.begin(), csets.end(), compareChangesetsByDate); +#ifdef GRAPHER_VERBOSE_DEBUG foreach (Changeset *cs, csets) { DEBUG << "id " << cs->id().toStdString() << ", ts " << cs->timestamp() << ", date " << cs->datetime().toStdString() << endl; } +#endif m_handled.clear(); foreach (Changeset *cs, csets) { @@ -684,7 +704,9 @@ if (m_uncommitted) { --minrow; +#ifdef GRAPHER_VERBOSE_DEBUG DEBUG << "putting uncommitted item at row " << minrow << endl; +#endif m_uncommitted->setRow(minrow); }