Mercurial > hg > easyhg
diff grapher.cpp @ 74:10eb97683aa9
* Show branch names even for changes with children, if those children are on a different branch
* Pick up remote repo path from local repo via hg paths
* Some work towards breaking down files into various groups based on status
* Add /usr/local/bin to path for hg (temporary hack I hope)
author | Chris Cannam |
---|---|
date | Fri, 19 Nov 2010 14:54:19 +0000 |
parents | f583e44d9d31 |
children | 729438d70af8 |
line wrap: on
line diff
--- a/grapher.cpp Thu Nov 18 18:08:18 2010 +0000 +++ b/grapher.cpp Fri Nov 19 14:54:19 2010 +0000 @@ -353,6 +353,8 @@ m_scene->addItem(item); } + // Add the connecting lines + foreach (Changeset *cs, csets) { QString id = cs->id(); ChangesetItem *item = m_items[id]; @@ -369,6 +371,21 @@ } } + // Add the branch labels + foreach (Changeset *cs, csets) { + QString id = cs->id(); + ChangesetItem *item = m_items[id]; + bool haveChildOnSameBranch = false; + foreach (QString childId, cs->children()) { + Changeset *child = m_changesets[childId]; + if (child->branch() == cs->branch()) { + haveChildOnSameBranch = true; + break; + } + } + item->setShowBranch(!haveChildOnSameBranch); + } + // We need to lay out the changesets in forward chronological // order. We have no guarantees about the order in which // changesets appear in the list -- in a simple repository they