The /PloneSVNaccessTool Module

PloneSVNaccess
Providing read and write access to subversion.

PloneSVNaccessTool.py
Providing the PloneSVNaccessTool (important!) and SVNFileOrFolder.

Author: Christian Koller 'admin@iecw.net'.

Released under GNU GPL v2 or later.

Module Contents

PloneSVNaccessTool (class) [#]

PloneSVNaccess Tool The tool provides the access to the subversion repository

For more information about this class, see The PloneSVNaccessTool Class.

SVNConnectError(value) (class) [#]

A Simple SVNConnectError Error

For more information about this class, see The SVNConnectError Class.

SVNFile(file_content, mime, info, mimeStr) (class) [#]

Represents a single file incl.

For more information about this class, see The SVNFile Class.

SVNFileOrFolder(mimetypes_registry, **lsreply) (class) [#]

Represents information about a file or folder

For more information about this class, see The SVNFileOrFolder Class.

SVNLogInfo(**logEntry) (class) [#]

A Log Info

For more information about this class, see The SVNLogInfo Class.

The PloneSVNaccessTool Class

PloneSVNaccessTool (class) [#]

PloneSVNaccess Tool
The tool provides the access to the subversion repository

_del_Temp_Folder(tempDir) [#]

Delete local temp folder
Delete everything reachable from the directory named in 'tempDir'.
CAUTION: This is dangerous! For example, if tempDir == '/', it could delete all your disk files.
From: Python Doc

_get_log_message() [#]

_get_log_message will be called when we need a log message

_get_login(realm, username, may_save) [#]

_get_login will be called when we need authentication

commit_svnFile(svn_path, username, password, curSVNFolder, curSVNFile, curMessage, curFile=None, curFileContent=None) [#]

Commit a file to SVN
May raise some SVNConnectError

Returns:
If the reply starts with 'SVNMERGE' the file needs to be merged. The text behind SVNMERGE ist the result of SVN update.
Without SVNMERGE you get a status message.

createCommOwWaJS(curSVNFile, curFileLog) [#]

Create the Java-Script for the commit action.
(Called when the file is binary and the file was changed since the last download)

createDelJSCheck(curSVNFolder, curSVNfile, username) [#]

Create the Java-Script for the delete action

createFolder(username, password, theFolderName, curMessage, theFullPath) [#]

Create Folder in the subversion repository

deleteFileOrFolder(svn_path, username, password, fileOrfolder, curMessage) [#]

Delete File or Folder within SVN

getBreadCrumbs(path) [#]

Returns the name of all svn breadcrumbs

getDiff(svn_path, username, password, curSVNFile, curRevNo, otherRevNo) [#]

Return file Diff

getDir(svn_path, username, password, folder, revNo) [#]

Get the folder listing

getFile(svn_path, username, password, curSVNFile, revNo) [#]

Get the file info

getFolderAsTarOrZip(svn_path, username, password, curSVNFolder, fileFormat, exportType, maxRevNo) [#]

Get a folder as tar or zip

errorType=
0 -> raise all errors,
1 -> reply with False if file is not available with this revision number
checkout and export always uses the maxRevNo = HEAD

getLog(svn_path, username, password, folder, curRevNo, startRevNo=None) [#]

Return Log info

getLogMessage(username) [#]

Get Message for log creates a simple log message

getMaxRevNo(svn_path, username, password) [#]

Return the RevNo of head

getNavigationParent(path) [#]

Return the link to the parent dir

getPloneSVNaccessVersioning(svn_path, fileOrfolder) [#]

Get PloneSVNaccessVersioning
(False or the Versioning number of the last download through this user)

getRevNos(curRevNo, maxRevNo, svn_path, username, password, folderOrFile) [#]

Returns revision numbers of the folder or file
Limited to 15 values

getSingleFile(svn_path, username, password, curSVNFile, revNo, errorType, forDownload) [#]

Get a single file

errorType=
0 -> raise all errors
1 -> reply with False if file is not available with this revision number
forDownload=
True -> set PloneSVNaccessVersioning

setEncoding() [#]

Set encoding to prevent problems with the c library pysvn
Info: pysvn msgNo=257

setPloneSVNaccessVersioning(svn_path, fileOrfolder, revNo) [#]

Set PloneSVNaccessVersioning
(Called when the user downloads a file)

upload_svnFile(username, password, theFullPath, curFile, curMessage) [#]

Upload (import) a file to SVN

The SVNConnectError Class

SVNConnectError(value) (class) [#]

A Simple SVNConnectError Error

The SVNFile Class

SVNFile(file_content, mime, info, mimeStr) (class) [#]

Represents a single file incl. file content

The SVNFileOrFolder Class

SVNFileOrFolder(mimetypes_registry, **lsreply) (class) [#]

Represents information about a file or folder

The SVNLogInfo Class

SVNLogInfo(**logEntry) (class) [#]

A Log Info