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.
Methods summary
public
|
|
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
|
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
|
|
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
|
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
|
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
|
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
$opts:
'branch' - (string)
|
public
Horde_Vcs_Patchset
|
#
getPatchset( array $opts = array() )
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
|
public
|
|
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
|
|