File indexing completed on 2024-05-12 05:44:26
0001 /*************************************************************************** 0002 * Copyright (C) 2005-2009 by Rajko Albrecht * 0003 * ral@alwins-world.de * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0019 ***************************************************************************/ 0020 #ifndef REVISIONTREE_H 0021 #define REVISIONTREE_H 0022 0023 #include "svnqt/client.h" 0024 #include "svnqt/log_entry.h" 0025 #include "svnqt/revision.h" 0026 0027 #include <qstring.h> 0028 0029 class CContextListener; 0030 class RtreeData; 0031 class RevTreeWidget; 0032 0033 namespace svn 0034 { 0035 class Client; 0036 } 0037 0038 /** 0039 @author Rajko Albrecht <ral@alwins-world.de> 0040 */ 0041 class RevisionTree final 0042 { 0043 public: 0044 Q_DISABLE_COPY(RevisionTree) 0045 RevisionTree(const svn::ClientP &, 0046 CContextListener *aListener, 0047 const QString &reposRoot, 0048 const svn::Revision &startr, 0049 const svn::Revision &endr, 0050 const QString &, 0051 const svn::Revision &baserevision, 0052 QWidget *parent = nullptr); 0053 ~RevisionTree(); 0054 0055 bool isValid() const; 0056 RevTreeWidget *getView(); 0057 0058 protected: 0059 long m_Baserevision; 0060 long m_InitialRevsion; 0061 QString m_Path; 0062 bool m_Valid; 0063 0064 RtreeData *m_Data; 0065 0066 bool topDownScan(); 0067 bool bottomUpScan(long startrev, unsigned recurse, const QString &path, long sRev = -1); 0068 bool isDeleted(long revision, const QString &); 0069 0070 static bool isParent(const QString &_par, const QString &tar); 0071 0072 void fillItem(long revIndex, int pathIndex, const QString &nodeName, const QString &path); 0073 }; 0074 0075 #endif