Mercurial > hg > easyhg
comparison changeset.cpp @ 106:729438d70af8
* Retrieve and store current branch and heads; some refactoring
| author | Chris Cannam |
|---|---|
| date | Thu, 25 Nov 2010 17:54:35 +0000 |
| parents | f583e44d9d31 |
| children | 8ae3b44c0073 |
comparison
equal
deleted
inserted
replaced
| 105:1928f9b408e6 | 106:729438d70af8 |
|---|---|
| 14 License, or (at your option) any later version. See the file | 14 License, or (at your option) any later version. See the file |
| 15 COPYING included with this distribution for more information. | 15 COPYING included with this distribution for more information. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 #include "changeset.h" | 18 #include "changeset.h" |
| 19 | |
| 20 #include <QVariant> | |
| 21 | |
| 22 Changeset::Changeset(const LogEntry &e) | |
| 23 { | |
| 24 foreach (QString key, e.keys()) { | |
| 25 if (key == "parents") { | |
| 26 QStringList parents = e.value(key).split | |
| 27 (" ", QString::SkipEmptyParts); | |
| 28 setParents(parents); | |
| 29 } else if (key == "timestamp") { | |
| 30 setTimestamp(e.value(key).split(" ")[0].toULongLong()); | |
| 31 } else { | |
| 32 setProperty(key.toLocal8Bit().data(), e.value(key)); | |
| 33 } | |
| 34 } | |
| 35 } | |
| 36 |
