Add initial SVN support
[svn-all-fast-export.git] / src / svn.cpp
blob609605635c2683f3ce0167b4a3bdbae1f3d3be21
1 /*
2 * Copyright (C) 2007 Thiago Macieira <thiago@kde.org>
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #include "svn.h"
19 #include "repository.h"
21 typedef QList<Rules::Match> MatchRuleList;
22 typedef QHash<QString, Repository *> RepositoryHash;
24 class SvnPrivate
26 public:
27 SvnPrivate(const QString &pathToRepository);
28 ~SvnPrivate();
29 int youngestRevision();
30 void exportRevision(int revnum);
32 MatchRuleList matchRules;
33 RepositoryHash repositories;
36 void Svn::initialize()
40 Svn::Svn(const QString &pathToRepository)
41 : d(new SvnPrivate(pathToRepository))
45 Svn::~Svn()
47 delete d;
50 void Svn::setMatchRules(const MatchRuleList &matchRules)
52 d->matchRules = matchRules;
55 void Svn::setRepositories(const RepositoryHash &repositories)
57 d->repositories = repositories;
60 int Svn::youngestRevision()
62 return d->youngestRevision();
65 void Svn::exportRevision(int revnum)
67 d->exportRevision(revnum);