comparison hgtabwidget.cpp @ 108:8ae3b44c0073

* Enable/disable update and merge actions depending on whether default update and merge will actually do anything
author Chris Cannam
date Thu, 25 Nov 2010 21:08:17 +0000
parents 729438d70af8
children 1721c580c10e
comparison
equal deleted inserted replaced
107:fdca34c989c0 108:8ae3b44c0073
148 panned->setScene(scene); 148 panned->setScene(scene);
149 panner->setScene(scene); 149 panner->setScene(scene);
150 if (oldScene) delete oldScene; 150 if (oldScene) delete oldScene;
151 ChangesetItem *tipItem = g.getItemFor(csets[0]); 151 ChangesetItem *tipItem = g.getItemFor(csets[0]);
152 if (tipItem) tipItem->ensureVisible(); 152 if (tipItem) tipItem->ensureVisible();
153 //!!! track lifecycle of those Changesets
153 } 154 }
154 155
155 Changesets HgTabWidget::parseChangeSets(QString changeSetsStr) 156 Changesets HgTabWidget::parseChangeSets(QString changeSetsStr)
156 { 157 {
157 Changesets csets; 158 Changesets csets = Changeset::parseChangesets(changeSetsStr);
158 LogList log = LogParser(changeSetsStr).parse();
159 foreach (LogEntry e, log) {
160 Changeset *cs = new Changeset(e);
161 csets.push_back(cs);
162 }
163 for (int i = 0; i+1 < csets.size(); ++i) { 159 for (int i = 0; i+1 < csets.size(); ++i) {
164 Changeset *cs = csets[i]; 160 Changeset *cs = csets[i];
165 if (cs->parents().empty()) { 161 if (cs->parents().empty()) {
166 QStringList list; 162 QStringList list;
167 list.push_back(csets[i+1]->id()); 163 list.push_back(csets[i+1]->id());