Mercurial > hg > easyhg
annotate 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 |
rev | line source |
---|---|
Chris@57 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@57 | 2 |
Chris@57 | 3 /* |
Chris@57 | 4 EasyMercurial |
Chris@57 | 5 |
Chris@57 | 6 Based on HgExplorer by Jari Korhonen |
Chris@57 | 7 Copyright (c) 2010 Jari Korhonen |
Chris@57 | 8 Copyright (c) 2010 Chris Cannam |
Chris@57 | 9 Copyright (c) 2010 Queen Mary, University of London |
Chris@57 | 10 |
Chris@57 | 11 This program is free software; you can redistribute it and/or |
Chris@57 | 12 modify it under the terms of the GNU General Public License as |
Chris@57 | 13 published by the Free Software Foundation; either version 2 of the |
Chris@57 | 14 License, or (at your option) any later version. See the file |
Chris@57 | 15 COPYING included with this distribution for more information. |
Chris@57 | 16 */ |
Chris@57 | 17 |
Chris@43 | 18 #include "changeset.h" |
Chris@106 | 19 |
Chris@106 | 20 #include <QVariant> |
Chris@106 | 21 |
Chris@106 | 22 Changeset::Changeset(const LogEntry &e) |
Chris@106 | 23 { |
Chris@106 | 24 foreach (QString key, e.keys()) { |
Chris@106 | 25 if (key == "parents") { |
Chris@106 | 26 QStringList parents = e.value(key).split |
Chris@106 | 27 (" ", QString::SkipEmptyParts); |
Chris@106 | 28 setParents(parents); |
Chris@106 | 29 } else if (key == "timestamp") { |
Chris@106 | 30 setTimestamp(e.value(key).split(" ")[0].toULongLong()); |
Chris@106 | 31 } else { |
Chris@106 | 32 setProperty(key.toLocal8Bit().data(), e.value(key)); |
Chris@106 | 33 } |
Chris@106 | 34 } |
Chris@106 | 35 } |
Chris@106 | 36 |