# HG changeset patch # User Chris Cannam # Date 1291234761 0 # Node ID 465c8d51c6d5728a4e4de55d57755a59c1071cc4 # Parent 5e16b83374fdb600500c2bad0a897f6bf6b18436 * Don't show tip tag; return to using incremental log on commit diff -r 5e16b83374fd -r 465c8d51c6d5 changesetitem.cpp --- a/changesetitem.cpp Wed Dec 01 17:43:43 2010 +0000 +++ b/changesetitem.cpp Wed Dec 01 20:19:21 2010 +0000 @@ -204,12 +204,26 @@ paint->setPen(QPen(Qt::black)); - QString tags = m_changeset->tags().join(" ").trimmed(); - if (tags != "") { - int tw = fm.width(tags); - paint->fillRect(QRectF(x0 + width - 8 - tw, 1, tw + 4, fh - 1), - QBrush(Qt::yellow)); - paint->drawText(x0 + width - 6 - tw, fm.ascent(), tags); + QStringList tags = m_changeset->tags(); + if (!tags.empty()) { + QStringList nonTipTags; + foreach (QString t, tags) { + // I'm not convinced that showing the tip tag really + // works; I think perhaps it confuses as much as it + // illuminates. But also, our current implementation + // doesn't interact well with it because it moves -- it's + // the one thing that can actually (in normal use) change + // inside an existing changeset record even during an + // incremental update + if (t != "tip") nonTipTags.push_back(t); + } + if (!nonTipTags.empty()) { + QString tagText = nonTipTags.join(" ").trimmed(); + int tw = fm.width(tagText); + paint->fillRect(QRectF(x0 + width - 8 - tw, 1, tw + 4, fh - 1), + QBrush(Qt::yellow)); + paint->drawText(x0 + width - 6 - tw, fm.ascent(), tagText); + } } if (m_showBranch) { diff -r 5e16b83374fd -r 465c8d51c6d5 historywidget.cpp --- a/historywidget.cpp Wed Dec 01 17:43:43 2010 +0000 +++ b/historywidget.cpp Wed Dec 01 20:19:21 2010 +0000 @@ -221,9 +221,12 @@ if (newid) { DEBUG << "id " << id << " is new" << endl; } - - csit->setCurrent(current); - csit->setNew(newid); + + if (csit->isCurrent() != current || csit->isNew() != newid) { + csit->setCurrent(current); + csit->setNew(newid); + csit->update(); + } } } diff -r 5e16b83374fd -r 465c8d51c6d5 mainwindow.cpp --- a/mainwindow.cpp Wed Dec 01 17:43:43 2010 +0000 +++ b/mainwindow.cpp Wed Dec 01 20:19:21 2010 +0000 @@ -1273,7 +1273,6 @@ case ACT_COMMIT: hgTabs->clearSelections(); shouldHgStat = true; - needNewLog = true; // naive incremental log will give us a duplicate tip tag break; case ACT_REMOVE: