Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Subversion Functions

Subversion Functions

Introduction

Warning:

This extension is EXPERIMENTAL. The behaviour of this extension -- including the names of its functions and anything else documented about this extension -- may change without notice in a future release of PHP. Use this extension at your own risk.

This extension implements PHP bindings for » Subversion (SVN), a version control system, allowing PHP scripts to communicate with SVN repositories and working copies without direct command line calls to the svn executable.

Requirements

The Subversion binaries are not necessary to use this extension. However, when compiling the extension, libsvn (the Subversion headers) must be available.

Installation

Information for installing this PECL extension may be found in the manual chapter titled Installation of PECL extensions. Additional information such as new releases, downloads, source files, maintainer information, and a CHANGELOG, can be located here: » http://pecl.php.net/package/svn

If ./configure is having trouble finding the SVN files (for example, Subversion was installed with a different prefix directory), use ./configure --with-svn=$USR_PATH to specify the directory where the include/subversion-1/ folder is located.

The DLL for this PECL extension may be downloaded from either the » PHP Downloads page or from » http://pecl4win.php.net/

Warning:

If the extension is compiled against libsvn 1.3, functions that work with working copies will fail when used on working copies created by Subversion 1.4.

Resource Types

Subversion's lower-level svn_fs_* functions make use of resources that reference local file-system repositories. They can probably be created using svn_repos_fs() and svn_fs_revision_root(). (verify?)

This extension has no resource types defined.

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

SVN_REVISON_HEAD (integer)
Magic number (-1) specifying the HEAD revision

Constants usable with svn_auth_set_parameter()

SVN_AUTH_PARAM_DEFAULT_USERNAME (string)
Property for default username to use when performing basic authentication
SVN_AUTH_PARAM_DEFAULT_PASSWORD (string)
Property for default password to use when performing basic authentication
SVN_AUTH_PARAM_NON_INTERACTIVE (string)
SVN_AUTH_PARAM_DONT_STORE_PASSWORDS (string)
SVN_AUTH_PARAM_NO_AUTH_CACHE (string)
SVN_AUTH_PARAM_SSL_SERVER_FAILURES (string)
SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO (string)
SVN_AUTH_PARAM_CONFIG (string)
SVN_AUTH_PARAM_SERVER_GROUP (string)
SVN_AUTH_PARAM_CONFIG_DIR (string)
PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS (string)
Custom property for ignoring SSL cert verification errors

Filesystem constants

SVN_FS_CONFIG_FS_TYPE (string)
Configuration key that determines filesystem type
SVN_FS_TYPE_BDB (string)
Filesystem is Berkeley-DB implementation
SVN_FS_TYPE_FSFS (string)
Filesystem is native-filesystem implementation

Reserved property constants

SVN_PROP_REVISION_DATE (string)
svn:date
SVN_PROP_REVISION_ORIG_DATE (string)
svn:original-date
SVN_PROP_REVISION_AUTHOR (string)
svn:author
SVN_PROP_REVISION_LOG (string)
svn:log

Working copy status constants

svn_wc_status_none (int)
Status does not exist
svn_wc_status_unversioned (int)
Item is not versioned in working copy
svn_wc_status_normal (int)
Item exists, nothing else is happening
svn_wc_status_added (int)
Item is scheduled for addition
svn_wc_status_missing (int)
Item is versioned but missing from the working copy
svn_wc_status_deleted (int)
Item is scheduled for deletion
svn_wc_status_replaced (int)
Item was deleted and then re-added
svn_wc_status_modified (int)
Item (text or properties) was modified
svn_wc_status_merged (int)
Item's local modifications were merged with repository modifications
svn_wc_status_conflicted (int)
Item's local modifications conflicted with repository modifications
svn_wc_status_ignored (int)
Item is unversioned but configured to be ignored
svn_wc_status_obstructed (int)
Unversioned item is in the way of a versioned resource
svn_wc_status_external (int)
Unversioned path that is populated using svn:externals
svn_wc_status_incomplete (int)
Directory does not contain complete entries list

Node type constants

svn_node_none (int)
Absent
svn_node_file (int)
File
svn_node_dir (int)
Directory
svn_node_unknown (int)
Something Subversion cannot identify

Table of Contents

svn_add — Schedules the addition of an item in a working directory
svn_auth_get_parameter — Retrieves authentication parameter
svn_auth_set_parameter — Sets an authentication parameter
svn_cat — Returns the contents of a file in a repository
svn_checkout — Checks out a working copy from the repository
svn_cleanup — Recursively cleanup a working copy directory, finishing incomplete operations and removing locks
svn_client_version — Returns the version of the SVN client libraries
svn_commit — Sends changes from the local working copy to the repository
svn_diff — Recursively diffs two paths
svn_fs_abort_txn — Abort a transaction, returns true if everything is ok, false othewise
svn_fs_apply_text — Creates and returns a stream that will be used to replace
svn_fs_begin_txn2 — Create a new transaction
svn_fs_change_node_prop — Return true if everything is ok, false otherwise
svn_fs_check_path — Determines what kind of item lives at path in a given repository fsroot
svn_fs_contents_changed — Return true if content is different, false otherwise
svn_fs_copy — Copies a file or a directory, returns true if all is ok, false otherwise
svn_fs_delete — Deletes a file or a directory, return true if all is ok, false otherwise
svn_fs_dir_entries — Enumerates the directory entries under path; returns a hash of dir names to file type
svn_fs_file_contents — Returns a stream to access the contents of a file from a given version of the fs
svn_fs_file_length — Returns the length of a file from a given version of the fs
svn_fs_is_dir — Return true if the path points to a directory, false otherwise
svn_fs_is_file — Return true if the path points to a file, false otherwise
svn_fs_make_dir — Creates a new empty directory, returns true if all is ok, false otherwise
svn_fs_make_file — Creates a new empty file, returns true if all is ok, false otherwise
svn_fs_node_created_rev — Returns the revision in which path under fsroot was created
svn_fs_node_prop — Returns the value of a property for a node
svn_fs_props_changed — Return true if props are different, false otherwise
svn_fs_revision_prop — Fetches the value of a named property
svn_fs_revision_root — Get a handle on a specific version of the repository root
svn_fs_txn_root — Creates and returns a transaction root
svn_fs_youngest_rev — Returns the number of the youngest revision in the filesystem
svn_import — Imports an unversioned path into a repository
svn_log — Returns the commit log messages of a repository URL
svn_ls — Returns list of directory contents in repository URL, optionally at revision number
svn_repos_create — Create a new subversion repository at path
svn_repos_fs_begin_txn_for_commit — Create a new transaction
svn_repos_fs_commit_txn — Commits a transaction and returns the new revision
svn_repos_fs — Gets a handle on the filesystem for a repository
svn_repos_hotcopy — Make a hot-copy of the repos at repospath; copy it to destpath
svn_repos_open — Open a shared lock on a repository.
svn_repos_recover — Run recovery procedures on the repository located at path.
svn_status — Returns the status of working copy files and directories
svn_update — Update working copy

Code Examples / Notes » ref.svn

pierre dot beaumadier

[Editorial note: These constants are defined by the Subversion library itself and may change without notice (although things tend to be quite stable).]
For information, here are the numeric values I got for the constants :
Working copy status constants :
   * svn_wc_status_none => 1
   * svn_wc_status_unversioned => 2
   * svn_wc_status_normal => 3
   * svn_wc_status_added => 4
   * svn_wc_status_missing => 5
   * svn_wc_status_deleted => 6
   * svn_wc_status_replaced => 7
   * svn_wc_status_modified => 8
   * svn_wc_status_merged => 9
   * svn_wc_status_conflicted => 10
   * svn_wc_status_ignored => 11
   * svn_wc_status_obstructed => 12
   * svn_wc_status_external => 13
   * svn_wc_status_incomplete => 14
Node type constants :
   * svn_node_none => 0
   * svn_node_file => 1
   * svn_node_dir => 2
   * svn_node_unknown => 3


apprehensive user

so...this PECL extension hasnt been updated since the first quarter of 2006.  is it dead?

Change Language


Follow Navioo On Twitter
.NET Functions
Apache-specific Functions
Alternative PHP Cache
Advanced PHP debugger
Array Functions
Aspell functions [deprecated]
BBCode Functions
BCMath Arbitrary Precision Mathematics Functions
PHP bytecode Compiler
Bzip2 Compression Functions
Calendar Functions
CCVS API Functions [deprecated]
Class/Object Functions
Classkit Functions
ClibPDF Functions [deprecated]
COM and .Net (Windows)
Crack Functions
Character Type Functions
CURL
Cybercash Payment Functions
Credit Mutuel CyberMUT functions
Cyrus IMAP administration Functions
Date and Time Functions
DB++ Functions
Database (dbm-style) Abstraction Layer Functions
dBase Functions
DBM Functions [deprecated]
dbx Functions
Direct IO Functions
Directory Functions
DOM Functions
DOM XML Functions
enchant Functions
Error Handling and Logging Functions
Exif Functions
Expect Functions
File Alteration Monitor Functions
Forms Data Format Functions
Fileinfo Functions
filePro Functions
Filesystem Functions
Filter Functions
Firebird/InterBase Functions
Firebird/Interbase Functions (PDO_FIREBIRD)
FriBiDi Functions
FrontBase Functions
FTP Functions
Function Handling Functions
GeoIP Functions
Gettext Functions
GMP Functions
gnupg Functions
Net_Gopher
Haru PDF Functions
hash Functions
HTTP
Hyperwave Functions
Hyperwave API Functions
i18n Functions
IBM Functions (PDO_IBM)
IBM DB2
iconv Functions
ID3 Functions
IIS Administration Functions
Image Functions
Imagick Image Library
IMAP
Informix Functions
Informix Functions (PDO_INFORMIX)
Ingres II Functions
IRC Gateway Functions
PHP / Java Integration
JSON Functions
KADM5
LDAP Functions
libxml Functions
Lotus Notes Functions
LZF Functions
Mail Functions
Mailparse Functions
Mathematical Functions
MaxDB PHP Extension
MCAL Functions
Mcrypt Encryption Functions
MCVE (Monetra) Payment Functions
Memcache Functions
Mhash Functions
Mimetype Functions
Ming functions for Flash
Miscellaneous Functions
mnoGoSearch Functions
Microsoft SQL Server Functions
Microsoft SQL Server and Sybase Functions (PDO_DBLIB)
Mohawk Software Session Handler Functions
mSQL Functions
Multibyte String Functions
muscat Functions
MySQL Functions
MySQL Functions (PDO_MYSQL)
MySQL Improved Extension
Ncurses Terminal Screen Control Functions
Network Functions
Newt Functions
NSAPI-specific Functions
Object Aggregation/Composition Functions
Object property and method call overloading
Oracle Functions
ODBC Functions (Unified)
ODBC and DB2 Functions (PDO_ODBC)
oggvorbis
OpenAL Audio Bindings
OpenSSL Functions
Oracle Functions [deprecated]
Oracle Functions (PDO_OCI)
Output Control Functions
Ovrimos SQL Functions
Paradox File Access
Parsekit Functions
Process Control Functions
Regular Expression Functions (Perl-Compatible)
PDF Functions
PDO Functions
Phar archive stream and classes
PHP Options&Information
POSIX Functions
Regular Expression Functions (POSIX Extended)
PostgreSQL Functions
PostgreSQL Functions (PDO_PGSQL)
Printer Functions
Program Execution Functions
PostScript document creation
Pspell Functions
qtdom Functions
Radius
Rar Functions
GNU Readline
GNU Recode Functions
RPM Header Reading Functions
runkit Functions
SAM - Simple Asynchronous Messaging
Satellite CORBA client extension [deprecated]
SCA Functions
SDO Functions
SDO XML Data Access Service Functions
SDO Relational Data Access Service Functions
Semaphore
SESAM Database Functions
PostgreSQL Session Save Handler
Session Handling Functions
Shared Memory Functions
SimpleXML functions
SNMP Functions
SOAP Functions
Socket Functions
Standard PHP Library (SPL) Functions
SQLite Functions
SQLite Functions (PDO_SQLITE)
Secure Shell2 Functions
Statistics Functions
Stream Functions
String Functions
Subversion Functions
Shockwave Flash Functions
Swish Functions
Sybase Functions
TCP Wrappers Functions
Tidy Functions
Tokenizer Functions
Unicode Functions
URL Functions
Variable Handling Functions
Verisign Payflow Pro Functions
vpopmail Functions
W32api Functions
WDDX Functions
win32ps Functions
win32service Functions
xattr Functions
xdiff Functions
XML Parser Functions
XML-RPC Functions
XMLReader functions
XMLWriter Functions
XSL functions
XSLT Functions
YAZ Functions
YP/NIS Functions
Zip File Functions
Zlib Compression Functions
eXTReMe Tracker