1
/* KDevPlatform Kross Support
3
* Copyright 2008 Aleix Pol <aleixpol@gmail.com>
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
#ifndef KDEVPLATFORM_KROSSDISTRIBUTEDVERSIONCONTROL_H
22
#define KDEVPLATFORM_KROSSDISTRIBUTEDVERSIONCONTROL_H
27
#include <vcs/vcsjob.h>
28
#include <vcs/interfaces/idistributedversioncontrol.h>
30
namespace Kross { class Action; }
31
namespace KDevelop { class Context; }
34
class KrossDistributedVersionControl : public KDevelop::IDistributedVersionControl
37
explicit KrossDistributedVersionControl(KDevelop::IPlugin* plugin);
38
virtual ~KrossDistributedVersionControl();
41
KDevelop::VcsImportMetadataWidget* createImportMetadataWidget(QWidget* parent);
42
bool isVersionControlled(const KUrl& url);
43
KDevelop::VcsJob* add(const KUrl::List& files, KDevelop::IBasicVersionControl::RecursionMode mode);
44
KDevelop::VcsJob* remove(const KUrl::List& files);
45
KDevelop::VcsJob* copy(const KUrl& file, const KUrl& newfile);
46
KDevelop::VcsJob* move(const KUrl& file, const KUrl& newfile);
47
KDevelop::VcsJob* status(const KUrl::List& files, KDevelop::IBasicVersionControl::RecursionMode mode);
48
KDevelop::VcsJob* revert(const KUrl::List& files, KDevelop::IBasicVersionControl::RecursionMode mode);
49
KDevelop::VcsJob* update( const KUrl::List& localLocations,
50
const KDevelop::VcsRevision& rev,
51
KDevelop::IBasicVersionControl::RecursionMode recursion = KDevelop::IBasicVersionControl::Recursive );
52
KDevelop::VcsJob* commit(const QString& message, const KUrl::List& files, KDevelop::IBasicVersionControl::RecursionMode mode);
53
KDevelop::VcsJob* diff(const KUrl::List& files, KDevelop::VcsRevision& rev, KDevelop::IBasicVersionControl::RecursionMode mode);
54
KDevelop::VcsJob* repositoryLocation(const KUrl::List& files);
55
KDevelop::VcsJob* repositoryLocation( const KUrl& localLocation );
57
KDevelop::VcsJob* diff( const KUrl& fileOrDirectory,
58
const KDevelop::VcsRevision& srcRevision,
59
const KDevelop::VcsRevision& dstRevision,
60
KDevelop::VcsDiff::Type = KDevelop::VcsDiff::DiffUnified,
61
KDevelop::IBasicVersionControl::RecursionMode recursion
62
= KDevelop::IBasicVersionControl::Recursive);
63
KDevelop::VcsJob* log(const KUrl& file, const KDevelop::VcsRevision& rev, long unsigned int limit);
64
KDevelop::VcsJob* log(const KUrl& file, const KDevelop::VcsRevision&, const KDevelop::VcsRevision&);
65
KDevelop::VcsJob* annotate(const KUrl& file, const KDevelop::VcsRevision& rev);
67
KDevelop::VcsJob* merge( const KDevelop::VcsLocation& localOrRepoLocationSrc,
68
const KDevelop::VcsLocation& localOrRepoLocationDst,
69
const KDevelop::VcsRevision& srcRevision,
70
const KDevelop::VcsRevision& dstRevision,
71
const KUrl& localLocation );
72
KDevelop::VcsJob* resolve( const KUrl::List& localLocations, KDevelop::IBasicVersionControl::RecursionMode recursion );
73
KDevelop::VcsJob* createWorkingCopy(const KDevelop::VcsLocation & sourceRepository, const KUrl & destinationDirectory, KDevelop::IBasicVersionControl::RecursionMode recursion = KDevelop::IBasicVersionControl::Recursive );
76
KDevelop::VcsJob* init(const KUrl& location);
77
KDevelop::VcsJob* push(const KUrl& localRepositoryLocation, const KDevelop::VcsLocation& localOrRepoLocationDst);
78
KDevelop::VcsJob* pull(const KDevelop::VcsLocation& localOrRepoLocationSrc, const KUrl& localRepositoryLocation);
79
KDevelop::VcsJob* reset(const KUrl &repository, const QStringList &args, const KUrl::List &files);
81
void setActionDistributed(Kross::Action* anAction);
82
virtual KDevelop::VcsLocationWidget* vcsLocation(QWidget* parent) const;
84
Kross::Action *action;
85
KDevelop::IPlugin* m_plugin;