• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

vcs

KDevelop::IBasicVersionControl

KDevelop::IBasicVersionControl Class Reference

#include <ibasicversioncontrol.h>

Inheritance diagram for KDevelop::IBasicVersionControl:

Inheritance graph
[legend]

List of all members.


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 49 of file ibasicversioncontrol.h.


Public Types

enum  RecursionMode { Recursive, NonRecursive }

Public Member Functions

virtual VcsJob * add (const KUrl::List &localLocations, RecursionMode recursion=KDevelop::IBasicVersionControl::Recursive)=0
virtual VcsJob * annotate (const KUrl &localLocation, const VcsRevision &rev=VcsRevision::createSpecialRevision(VcsRevision::Head))=0
virtual VcsJob * checkout (const VcsMapping &mapping)=0
virtual VcsJob * commit (const QString &message, const KUrl::List &localLocations, RecursionMode recursion=KDevelop::IBasicVersionControl::Recursive)=0
virtual VcsJob * copy (const KUrl &localLocationSrc, const KUrl &localLocationDstn)=0
virtual VcsImportMetadataWidget * createImportMetadataWidget (QWidget *parent)=0
virtual VcsJob * diff (const VcsLocation &localOrRepoLocationSrc, const VcsLocation &localOrRepoLocationDst, const VcsRevision &srcRevision, const VcsRevision &dstRevision, VcsDiff::Type=KDevelop::VcsDiff::DiffUnified, IBasicVersionControl::RecursionMode recursion=KDevelop::IBasicVersionControl::Recursive)=0
virtual bool isVersionControlled (const KUrl &localLocation)=0
virtual VcsJob * log (const KUrl &localLocation, const VcsRevision &rev, const VcsRevision &limit)=0
virtual VcsJob * log (const KUrl &localLocation, const VcsRevision &rev=VcsRevision::createSpecialRevision(VcsRevision::Head), unsigned long limit=0)=0
virtual VcsJob * merge (const VcsLocation &localOrRepoLocationSrc, const VcsLocation &localOrRepoLocationDst, const VcsRevision &srcRevision, const VcsRevision &dstRevision, const KUrl &localLocation)=0
virtual VcsJob * move (const KUrl &localLocationSrc, const KUrl &localLocationDst)=0
virtual QString name () const =0
virtual VcsJob * remove (const KUrl::List &localLocations)=0
virtual VcsJob * repositoryLocation (const KUrl &localLocation)=0
virtual VcsJob * resolve (const KUrl::List &localLocations, RecursionMode recursion)=0
virtual VcsJob * revert (const KUrl::List &localLocations, RecursionMode recursion=KDevelop::IBasicVersionControl::Recursive)=0
virtual VcsJob * status (const KUrl::List &localLocations, RecursionMode recursion=KDevelop::IBasicVersionControl::Recursive)=0
virtual VcsJob * update (const KUrl::List &localLocations, const VcsRevision &rev=VcsRevision::createSpecialRevision(VcsRevision::Head), RecursionMode recursion=KDevelop::IBasicVersionControl::Recursive)=0

Member Enumeration Documentation

enum KDevelop::IBasicVersionControl::RecursionMode

Enumerator:
Recursive  run recursively through subdirectories
NonRecursive  don't run recursively through subdirectories

Reimplemented in KDevelop::ICentralizedVersionControl.

Definition at line 53 of file ibasicversioncontrol.h.


Member Function Documentation

virtual VcsJob* KDevelop::IBasicVersionControl::add ( const KUrl::List &  localLocations,
RecursionMode  recursion = KDevelop::IBasicVersionControl::Recursive 
) [pure virtual]

adds a local unversioned file or directory to the list of versioned files.

Parameters:
recursive is only meaningful for directories
localLocations a list of files or directories that should be put under version control
recursion wether to add directories and their childs or only directories themselves
Returns:
a job that executes the addition

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::annotate ( const KUrl &  localLocation,
const VcsRevision &  rev = VcsRevision::createSpecialRevision(VcsRevision::Head) 
) [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

See also:
KDevelop::VcsAnnotation

KDevelop::VcsAnnotationLine

Parameters:
localLocation local file that should be annotated.
rev Revision that should be annotated.

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::checkout ( const VcsMapping &  mapping  )  [pure virtual]

Checks out files or dirs from a repository (in DVCS from any commit) into a local directory hierarchy.

The mapping exactly tells which file in the repository should go to which local file

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::commit ( const QString &  message,
const KUrl::List &  localLocations,
RecursionMode  recursion = KDevelop::IBasicVersionControl::Recursive 
) [pure virtual]

Checks in the changes of the given file(s)/dir(s) into the repository.

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::copy ( const KUrl &  localLocationSrc,
const KUrl &  localLocationDstn 
) [pure virtual]

executes a copy of a file/dir, preserving history if the VCS system allows that, may be implemented by filesystem copy+add

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsImportMetadataWidget* KDevelop::IBasicVersionControl::createImportMetadataWidget ( QWidget *  parent  )  [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.

virtual VcsJob* KDevelop::IBasicVersionControl::diff ( const VcsLocation &  localOrRepoLocationSrc,
const VcsLocation &  localOrRepoLocationDst,
const VcsRevision &  srcRevision,
const VcsRevision &  dstRevision,
VcsDiff::Type  = KDevelop::VcsDiff::DiffUnified,
IBasicVersionControl::RecursionMode  recursion = KDevelop::IBasicVersionControl::Recursive 
) [pure virtual]

Retrieves a diff between the two locations at the given revisions.

The diff is in unified diff format for text files by default

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual bool KDevelop::IBasicVersionControl::isVersionControlled ( const KUrl &  localLocation  )  [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 wether the localLocation is under control of the versioning system or not. It does not only check wether the localLocation lies in a version controlled directory

Returns:
true if the version control system knows the given localLocation

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::log ( const KUrl &  localLocation,
const VcsRevision &  rev,
const VcsRevision &  limit 
) [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 HEAD.
limit Do not show entries earlier than limit. Note that the limit is advisory and may be ignored.

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::log ( const KUrl &  localLocation,
const VcsRevision &  rev = VcsRevision::createSpecialRevision(VcsRevision::Head),
unsigned long  limit = 0 
) [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 HEAD.
limit Restrict to the most recent limit entries. Note that the limit is advisory and may be ignored.

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::merge ( const VcsLocation &  localOrRepoLocationSrc,
const VcsLocation &  localOrRepoLocationDst,
const VcsRevision &  srcRevision,
const VcsRevision &  dstRevision,
const KUrl &  localLocation 
) [pure virtual]

merge/integrate the changes between src and dest into the given local file

Note: This might create conflicts in the file(s) that are changed

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::move ( const KUrl &  localLocationSrc,
const KUrl &  localLocationDst 
) [pure virtual]

moves src to dst, preserving history if the VCS system allows that, may be implemented by copy+remove

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual QString KDevelop::IBasicVersionControl::name (  )  const [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 apropriate system

Returns:
a translated user-visible name for this version control plugin

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::remove ( const KUrl::List &  localLocations  )  [pure virtual]

removes a local versioned file or directory from the version control system

Parameters:
the list of files/directories to remove from the VCS
Returns:
a job that executes the removal

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::repositoryLocation ( const KUrl &  localLocation  )  [pure virtual]

Get the repository location of a local file.

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::resolve ( const KUrl::List &  localLocations,
RecursionMode  recursion 
) [pure virtual]

check for conflicts in the given file and eventually present a conflict solving dialog to the user

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::revert ( const KUrl::List &  localLocations,
RecursionMode  recursion = KDevelop::IBasicVersionControl::Recursive 
) [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.

Implemented in KDevelop::DistributedVersionControlPlugin.

virtual VcsJob* KDevelop::IBasicVersionControl::update ( const KUrl::List &  localLocations,
const VcsRevision &  rev = VcsRevision::createSpecialRevision(VcsRevision::Head),
RecursionMode  recursion = KDevelop::IBasicVersionControl::Recursive 
) [pure virtual]

fetches the latest changes from the repository, if there are conflicts a merge needs to be executed separately

Parameters:
localLocation the local files/dirs that should be updated
rev Update to this revision. The operation will fail if rev is a range.
recursion defines wether the directories should be updated recursively

Implemented in KDevelop::DistributedVersionControlPlugin.


The documentation for this class was generated from the following file:
  • ibasicversioncontrol.h

vcs

Skip menu "vcs"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  •     interfaces
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal