File indexing completed on 2024-04-28 05:42:11

0001 /***************************************************************************
0002  *   Copyright (C) 2006-2009 by Rajko Albrecht                             *
0003  *   ral@alwins-world.de                                                   *
0004  *                                                                         *
0005  * This program is free software; you can redistribute it and/or           *
0006  * modify it under the terms of the GNU Lesser General Public              *
0007  * License as published by the Free Software Foundation; either            *
0008  * version 2.1 of the License, or (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 GNU       *
0013  * Lesser General Public License for more details.                         *
0014  *                                                                         *
0015  * You should have received a copy of the GNU Lesser General Public        *
0016  * License along with this program (in the file LGPL.txt); if not,         *
0017  * write to the Free Software Foundation, Inc., 51 Franklin St,            *
0018  * Fifth Floor, Boston, MA  02110-1301  USA                                *
0019  *                                                                         *
0020  * This software consists of voluntary contributions made by many          *
0021  * individuals.  For exact contribution history, see the revision          *
0022  * history and logs, available at https://commits.kde.org/kdesvn.          *
0023  ***************************************************************************/
0024 #include "client.h"
0025 #include "client_parameter.h"
0026 #include "context.h"
0027 #include "datetime.h"
0028 #include "repository.h"
0029 
0030 int main(int, char **)
0031 {
0032     svn::repository::Repository rep(0L);
0033 
0034     svn::ContextP m_CurrentContext(new svn::Context);
0035     svn::ClientP m_Svnclient = svn::Client::getobject(m_CurrentContext);
0036     bool gotit = true;
0037     svn::LogEntriesMap m_OldHistory;
0038     svn::LogParameter params;
0039     svn::Paths s;
0040     s.append(svn::Path(QLatin1String("svn://anonsvn.kde.org/home/kde/")));
0041 
0042     try {
0043         m_Svnclient->log(params.targets(svn::Targets(s))
0044                              .revisionRange(svn::Revision::HEAD, 20)
0045                              .peg(svn::Revision::UNDEFINED)
0046                              .discoverChangedPathes(true)
0047                              .strictNodeHistory(false)
0048                              .limit(0),
0049                          m_OldHistory);
0050     } catch (const svn::ClientException &ce) {
0051         gotit = false;
0052     }
0053     return gotit ? 0 : 1;
0054 }