File indexing completed on 2024-05-19 04:40:05
0001 /* 0002 SPDX-FileCopyrightText: 2007 Andreas Pakulat <apaku@gmx.de> 0003 SPDX-FileCopyrightText: 2008 Evgeniy Ivanov <powerfox@kde.ru> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef KDEVPLATFORM_IDISTRIBUTEDVERSIONCONTROL_H 0009 #define KDEVPLATFORM_IDISTRIBUTEDVERSIONCONTROL_H 0010 0011 #include "ibasicversioncontrol.h" 0012 0013 namespace KDevelop 0014 { 0015 0016 class VcsJob; 0017 class VcsLocation; 0018 0019 /** 0020 * This interface has methods to support distributed version control systems 0021 * like git or svk. 0022 */ 0023 class IDistributedVersionControl : public KDevelop::IBasicVersionControl 0024 { 0025 public: 0026 0027 ~IDistributedVersionControl() override = default; 0028 0029 /** 0030 * Create a new repository inside the given local directory. 0031 */ 0032 virtual VcsJob* init(const QUrl& localRepositoryRoot) = 0; 0033 0034 /** 0035 * Export the locally committed revisions to another repository. 0036 * 0037 * @param localRepositoryLocation Any location inside the local repository. 0038 * @param localOrRepoLocationDst The repository which will receive the pushed revisions. 0039 */ 0040 virtual VcsJob* push(const QUrl& localRepositoryLocation, 0041 const VcsLocation& localOrRepoLocationDst) = 0; 0042 0043 /** 0044 * Import revisions from another repository the local one, but don't yet 0045 * merge them into the working copy. 0046 * 0047 * @param localOrRepoLocationSrc The repository which contains the revisions 0048 * to be pulled. 0049 * @param localRepositoryLocation Any location inside the local repository. 0050 */ 0051 virtual VcsJob* pull(const VcsLocation& localOrRepoLocationSrc, 0052 const QUrl& localRepositoryLocation) = 0; 0053 }; 0054 0055 } 0056 0057 Q_DECLARE_INTERFACE( KDevelop::IDistributedVersionControl, "org.kdevelop.IDistributedVersionControl" ) 0058 0059 #endif 0060