Chris@57: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@57: Chris@57: /* Chris@57: EasyMercurial Chris@57: Chris@57: Based on HgExplorer by Jari Korhonen Chris@57: Copyright (c) 2010 Jari Korhonen Chris@57: Copyright (c) 2010 Chris Cannam Chris@57: Copyright (c) 2010 Queen Mary, University of London Chris@57: Chris@57: This program is free software; you can redistribute it and/or Chris@57: modify it under the terms of the GNU General Public License as Chris@57: published by the Free Software Foundation; either version 2 of the Chris@57: License, or (at your option) any later version. See the file Chris@57: COPYING included with this distribution for more information. Chris@57: */ Chris@57: Chris@43: #include "changeset.h" Chris@106: Chris@106: #include Chris@106: Chris@106: Changeset::Changeset(const LogEntry &e) Chris@106: { Chris@106: foreach (QString key, e.keys()) { Chris@106: if (key == "parents") { Chris@106: QStringList parents = e.value(key).split Chris@106: (" ", QString::SkipEmptyParts); Chris@106: setParents(parents); Chris@106: } else if (key == "timestamp") { Chris@106: setTimestamp(e.value(key).split(" ")[0].toULongLong()); Chris@108: } else if (key == "changeset") { Chris@108: setId(e.value(key)); Chris@106: } else { Chris@106: setProperty(key.toLocal8Bit().data(), e.value(key)); Chris@106: } Chris@106: } Chris@106: } Chris@106: