kdevplatform/vcs
#include <ibasicversioncontrol.h>

Public Types | |
enum | RecursionMode { Recursive, NonRecursive } |
Public Member Functions | |
virtual | ~IBasicVersionControl () |
virtual VcsJob * | add (const QList< QUrl > &localLocations, RecursionMode recursion=IBasicVersionControl::Recursive)=0 |
virtual VcsJob * | annotate (const QUrl &localLocation, const VcsRevision &rev=VcsRevision::createSpecialRevision(VcsRevision::Head))=0 |
virtual VcsJob * | commit (const QString &message, const QList< QUrl > &localLocations, RecursionMode recursion=IBasicVersionControl::Recursive)=0 |
virtual VcsJob * | copy (const QUrl &localLocationSrc, const QUrl &localLocationDstn)=0 |
virtual VcsImportMetadataWidget * | createImportMetadataWidget (QWidget *parent)=0 |
virtual VcsJob * | createWorkingCopy (const VcsLocation &sourceRepository, const QUrl &destinationDirectory, RecursionMode recursion=IBasicVersionControl::Recursive)=0 |
virtual VcsJob * | diff (const QUrl &fileOrDirectory, const VcsRevision &srcRevision, const VcsRevision &dstRevision, IBasicVersionControl::RecursionMode recursion=IBasicVersionControl::Recursive)=0 |
virtual bool | isValidRemoteRepositoryUrl (const QUrl &remoteLocation)=0 |
virtual bool | isVersionControlled (const QUrl &localLocation)=0 |
virtual VcsJob * | log (const QUrl &localLocation, const VcsRevision &rev, unsigned long limit=0)=0 |
virtual VcsJob * | log (const QUrl &localLocation, const VcsRevision &rev=VcsRevision::createSpecialRevision(VcsRevision::Base), const VcsRevision &limit=VcsRevision::createSpecialRevision(VcsRevision::Start))=0 |
virtual VcsJob * | move (const QUrl &localLocationSrc, const QUrl &localLocationDst)=0 |
virtual QString | name () const =0 |
virtual VcsJob * | remove (const QList< QUrl > &localLocations)=0 |
virtual VcsJob * | repositoryLocation (const QUrl &localLocation)=0 |
virtual VcsJob * | resolve (const QList< QUrl > &localLocations, RecursionMode recursion)=0 |
virtual VcsJob * | revert (const QList< QUrl > &localLocations, RecursionMode recursion=IBasicVersionControl::Recursive)=0 |
virtual void | setupCommitMessageEditor (const QUrl &, KTextEdit *edit) const |
virtual VcsJob * | status (const QList< QUrl > &localLocations, RecursionMode recursion=IBasicVersionControl::Recursive)=0 |
virtual VcsJob * | update (const QList< QUrl > &localLocations, const VcsRevision &rev=VcsRevision::createSpecialRevision(VcsRevision::Head), RecursionMode recursion=IBasicVersionControl::Recursive)=0 |
virtual VcsLocationWidget * | vcsLocation (QWidget *parent) const =0 |
Detailed Description
This is the basic interface that all Version Control or Source Code Management plugins need to implement.
None of the methods in this interface are optional.
This only works on a local checkout from the repository, if your plugin should offer functionality that works solely on the server see the IRepositoryVersionControl interface
Definition at line 52 of file ibasicversioncontrol.h.
Member Enumeration Documentation
◆ RecursionMode
Enumerator | |
---|---|
Recursive | run recursively through subdirectories |
NonRecursive | don't run recursively through subdirectories |
Definition at line 56 of file ibasicversioncontrol.h.
Constructor & Destructor Documentation
◆ ~IBasicVersionControl()
|
inlinevirtual |
Definition at line 61 of file ibasicversioncontrol.h.
Member Function Documentation
◆ add()
|
pure virtual |
adds a local unversioned file or directory to the list of versioned files.
- Parameters
-
localLocations a list of files or directories that should be put under version control recursion whether to add directories and their children or only directories themselves
- Returns
- a job that executes the addition
◆ annotate()
|
pure virtual |
Annotate each line of the given local url at the given revision with information about who changed it and when.
The job should return a QList<QVariant> where the QVariant wraps a KDevelop::VcsAnnotationLine. The instance contains all information needed for the caller to construct a KDevelop::VcsAnnotation
- Parameters
-
localLocation local file that should be annotated. rev Revision that should be annotated.
◆ commit()
|
pure virtual |
Checks in the changes of the given file(s)/dir(s) into the repository.
◆ copy()
|
pure virtual |
executes a copy of a file/dir, preserving history if the VCS system allows that, may be implemented by filesystem copy+add
◆ createImportMetadataWidget()
|
pure virtual |
provides a widget that fetches the needed input data from the user to import a project into a version control system.
If this returns 0 the plugin will not be available as an option for import when creating a new project
- Parameters
-
parent the parent widget for the newly created widget
- Returns
- a widget to fetch metadata needed to import a project
Implemented in KDevelop::DistributedVersionControlPlugin.
◆ createWorkingCopy()
|
pure virtual |
Creates a working copy of the latest revision of the repository sourceRepository in the newly created directory destinationDirectory.
In the case of a decentralized VCSs, there is no working copy without repository, therefor checkout() includes the creation of a local copy of the repository.
- Parameters
-
sourceRepository source of the checkout destinationDirectory location of the created working copy (local repository)
◆ diff()
|
pure virtual |
Retrieves a diff between two revisions of a file.
The diff is in unified diff format for text files.
◆ isValidRemoteRepositoryUrl()
|
pure virtual |
Checks whether the given remoteLocation
is a valid remote repository URL.
If the URL is a local filesystem path, the folder will be checked if it contains proper repository content. For non-local filesystem URLs only the URL properties will be checked, no communication to any server is done.
- Parameters
-
remoteLocation the URL used to access a remote repository
- Returns
- true if the given
remoteLocation
seems valid for this version control system
◆ isVersionControlled()
|
pure virtual |
These methods rely on a valid vcs-directory with vcs-metadata in it.
revisions can contain a date in format parseable by QDate, a number, or the special words HEAD and BASE (whose exact meaning depends on the used VCS system) Is the given localLocation
under version control? This checks whether the localLocation
is under control of the versioning system or not. It does not only check whether the localLocation
lies in a version controlled directory
- Returns
- true if the version control system knows the given
localLocation
◆ log() [1/2]
|
pure virtual |
Retrieve the history of a given local url.
The resulting VcsJob will emit the resultsReady signal every time new log events are available. The fetchResults method will return a QList<QVariant> where the QVariant is a KDevelop::VcsEvent.
- Parameters
-
rev List rev
and earlier.limit Restrict to the most recent limit
entries. Note that the limit is advisory and may be ignored.
◆ log() [2/2]
|
pure virtual |
Retrieve the history of a given local url.
The resulting VcsJob will emit the resultsReady signal every time new log events are available. The fetchResults method will return a QList<QVariant> where the QVariant is a KDevelop::VcsEvent.
- Parameters
-
rev List rev
and earlier. The default is BASE.limit Do not show entries earlier than limit
. Note that the limit is advisory and may be ignored. The default is the first revision.
◆ move()
|
pure virtual |
moves src to dst, preserving history if the VCS system allows that, may be implemented by copy+remove
◆ name()
|
pure virtual |
return a user-visible string for the version control plugin Can be used for example when importing a project into a version control system to choose the appropriate system
- Returns
- a translated user-visible name for this version control plugin
◆ remove()
|
pure virtual |
removes a local versioned file or directory from the version control system
- Parameters
-
localLocations the list of files/directories to remove from the VCS
- Returns
- a job that executes the removal
◆ repositoryLocation()
|
pure virtual |
Get the repository location of a local file.
◆ resolve()
|
pure virtual |
check for conflicts in the given file and eventually present a conflict solving dialog to the user
◆ revert()
|
pure virtual |
revert all local changes on the given file, making its content equal to the version in the repository unedit() (if not a no-op) is implied.
◆ setupCommitMessageEditor()
|
virtual |
Optionally apply VCS specific settings to the commit message editor.
Default empty implementation.
Overwrite this to set e.g. a default commit message or to setup highlighting or validation. The default implementation does nothing.
Definition at line 24 of file ibasicversioncontrol.cpp.
◆ status()
|
pure virtual |
◆ update()
|
pure virtual |
fetches the latest changes from the repository, if there are conflicts a merge needs to be executed separately
- Parameters
-
localLocations the local files/dirs that should be updated rev Update to this revision. The operation will fail if rev
is a range.recursion defines whether the directories should be updated recursively
◆ vcsLocation()
|
pure virtual |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Jan 19 2021 23:37:34 by doxygen 1.8.16 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.