Overview

Packages

  • None
  • Vcs

Classes

  • Horde_Vcs
  • Horde_Vcs_Base
  • Horde_Vcs_Cvs
  • Horde_Vcs_Directory_Base
  • Horde_Vcs_Directory_Cvs
  • Horde_Vcs_Directory_Git
  • Horde_Vcs_Directory_Rcs
  • Horde_Vcs_Directory_Svn
  • Horde_Vcs_File_Base
  • Horde_Vcs_File_Cvs
  • Horde_Vcs_File_Git
  • Horde_Vcs_File_Rcs
  • Horde_Vcs_File_Svn
  • Horde_Vcs_Git
  • Horde_Vcs_Log_Base
  • Horde_Vcs_Log_Cvs
  • Horde_Vcs_Log_Git
  • Horde_Vcs_Log_Rcs
  • Horde_Vcs_Log_Svn
  • Horde_Vcs_Patchset
  • Horde_Vcs_Patchset_Base
  • Horde_Vcs_Patchset_Cvs
  • Horde_Vcs_Patchset_Git
  • Horde_Vcs_Patchset_Svn
  • Horde_Vcs_QuickLog_Base
  • Horde_Vcs_QuickLog_Cvs
  • Horde_Vcs_QuickLog_Git
  • Horde_Vcs_QuickLog_Rcs
  • Horde_Vcs_QuickLog_Svn
  • Horde_Vcs_Rcs
  • Horde_Vcs_Svn
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Vcs_Base

Version Control generalized library.

Copyright 2008-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Direct known subclasses

Horde_Vcs_Git, Horde_Vcs_Rcs, Horde_Vcs_Svn

Indirect known subclasses

Horde_Vcs_Cvs
Abstract
Package: Vcs
Located at Horde/Vcs/Base.php
Methods summary
public
# __construct( mixed $params = array() )

Constructor.

Constructor.

public boolean
# hasFeature( mixed $feature )

Does this driver support the given feature?

Does this driver support the given feature?

Returns

boolean
True if driver supports the given feature.
abstract public boolean
# isValidRevision( mixed $rev )

Validation function to ensure that a revision string is of the right form.

Validation function to ensure that a revision string is of the right form.

Parameters

$rev
The purported revision string.

Returns

boolean
True if a valid revision string.
public
# assertValidRevision( mixed $rev )

Throw an exception if the revision number isn't valid.

Throw an exception if the revision number isn't valid.

Parameters

$rev
The revision number.

Throws

Horde_Vcs_Exception
public integer
# cmp( string $rev1, string $rev2 )

Given two revisions, this figures out which one is greater than the the other.

Given two revisions, this figures out which one is greater than the the other.

Parameters

$rev1
Revision string.
$rev2
Second revision string.

Returns

integer

1 if the first is greater, -1 if the second if greater, and 0 if they are equal

public
# isFile( mixed $where )

TODO

TODO

public array
# getRevisionRange( Horde_Vcs_File_Base $file, string $r1, string $r2 )

Create a range of revisions between two revision numbers.

Create a range of revisions between two revision numbers.

Parameters

$file
The desired file.
$r1
The initial revision.
$r2
The ending revision.

Returns

array

The revision range, or empty if there is no straight line path between the revisions.

public string
# diff( Horde_Vcs_File_Base $file, string $rev1, string $rev2, array $opts = array() )

Obtain the differences between two revisions of a file.

Obtain the differences between two revisions of a file.

Parameters

$file
The desired file.
$rev1
<p>Original revision number to compare from.</p>
$rev2
New revision number to compare against.
$opts
<p>The following optional options: - 'human': (boolean) DEFAULT: false - 'num': (integer) DEFAULT: 3 - 'type': (string) DEFAULT: 'unified' - 'ws': (boolean) DEFAULT: true</p>

Returns

string
The diff string.

Throws

Horde_Vcs_Exception
public array
# availableDiffTypes( )

Return the list of available diff types.

Return the list of available diff types.

Returns

array
The list of available diff types for use with get().
public boolean|string
# getPath( string $binary )

Returns the location of the specified binary.

Returns the location of the specified binary.

Parameters

$binary
An external program name.

Returns

boolean|string

The location of the external program or false if it wasn't specified.

public array
# getUsers( mixed $usersfile )

Parse the users file, if present in the sourceroot, and return a hash containing the requisite information, keyed on the username, and with the 'desc', 'name', and 'mail' values inside.

Parse the users file, if present in the sourceroot, and return a hash containing the requisite information, keyed on the username, and with the 'desc', 'name', and 'mail' values inside.

Returns

array
User data.

Throws

Horde_Vcs_Exception
public Horde_Vcs_Directory_Base
# getDirectory( string $where, array $opts = array() )

Returns a directory object.

Returns a directory object.

Parameters

$where
Path to the directory.
$opts
<p>Any additional options (depends on driver): - 'showattic': (boolean) Parse any Attic/ sub-directory contents too. - 'rev': (string) Generate directory list for a certain branch or revision.</p>

Returns

Horde_Vcs_Directory_Base
A directory object.
public resource
# checkout( string $fullname, string $rev )

Function which returns a file pointing to the head of the requested revision of a file.

Function which returns a file pointing to the head of the requested revision of a file.

Parameters

$fullname
<p>Fully qualified pathname of the desired file to checkout.</p>
$rev
Revision number to check out.

Returns

resource
A stream pointer to the head of the checkout.
public
# getFile( mixed $filename, mixed $opts = array() )

TODO

TODO

$opts: 'branch' - (string)

public Horde_Vcs_Patchset
# getPatchset( array $opts = array() )

TODO

TODO

Parameters

$opts
Options: <pre><span class="php-quote">'file'</span> - (string) TODO <span class="php-quote">'range'</span> - (<span class="php-keyword1">array</span>) TODO</pre>

Returns

Horde_Vcs_Patchset
Patchset object.
public
# annotate( mixed $fileob, mixed $rev )

TODO

TODO

public string
# abbrev( string $rev )

Returns an abbreviated form of the revision, for display.

Returns an abbreviated form of the revision, for display.

Parameters

$rev
The revision string.

Returns

string
The abbreviated string.
public
# getDefaultBranch( )
Properties summary
public string $sourceroot

The source root of the repository.

The source root of the repository.

#
API documentation generated by ApiGen