Main Page   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals  

svn::Client Class Reference

#include <client.hpp>


Public Methods

 Client (Context *context=0)
virtual ~Client ()
const ContextgetContext () const
void setContext (Context *context=NULL)
StatusEntries status (const char *path, const bool descend=false, const bool get_all=true, const bool update=false, const bool no_ignore=false)
Status singleStatus (const char *path)
void checkout (const char *moduleName, const Path &destPath, const Revision &revision, bool recurse)
void notification (Notify *notify)
void remove (const Path &path, bool force)
void remove (const Targets &targets, bool force)
void revert (const Path &path, bool recurse)
void add (const Path &path, bool recurse)
void update (const Path &path, const Revision &revision, bool recurse)
std::string cat (const Path &path, const Revision &revision)
svn_revnum_t commit (const Targets &targets, const char *message, bool recurse)
void copy (const Path &srcPath, const Revision &srcRevision, const Path &destPath)
void move (const Path &srcPath, const Revision &srcRevision, const Path &destPath, bool force)
void mkdir (const Path &path, const char *message)
void mkdir (const Targets &targets, const char *message)
void cleanup (const Path &path)
void resolved (const Path &path, bool recurse)
void doExport (const Path &srcPath, const Path &destPath, const Revision &revision, bool force=false)
void doSwitch (const Path &path, const char *url, const Revision &revision, bool recurse)
void import (const Path &path, const char *url, const char *message, bool recurse)
void merge (const Path &path1, const Revision &revision1, const Path &path2, const Revision &revision2, const Path &localPath, bool force, bool recurse)
const LogEntrieslog (const char *path, const Revision &revisionStart, const Revision &revisionEnd)
std::string diff (const Path &tmpPath, const Path &path, const Revision &revision1, const Revision &revision2, const bool recurse, const bool ignoreAncestry, const bool noDiffDeleted)
DirEntries ls (const char *pathOrUrl, svn_opt_revision_t *revision, bool recurse)


Detailed Description

Subversion client API.


Constructor & Destructor Documentation

svn::Client::Client Context   context = 0
 

Initializes the primary memory pool.

virtual svn::Client::~Client   [virtual]
 


Member Function Documentation

void svn::Client::add const Path   path,
bool    recurse
 

Adds a file to the repository.

Exceptions:
ClientException 

std::string svn::Client::cat const Path   path,
const Revision   revision
 

Retrieves the contents for a specific revision of a path

Parameters:
path  path of file or directory
revision  revision to retrieve
Returns:
contents of the file

void svn::Client::checkout const char *    moduleName,
const Path   destPath,
const Revision   revision,
bool    recurse
 

Executes a revision checkout.

Parameters:
moduleName  name of the module to checkout.
destPath  destination directory for checkout.
revision  the revision number to checkout. If the number is -1 then it will checkout the latest revision.
recurse  whether you want it to checkout files recursively.
Exceptions:
ClientException 

void svn::Client::cleanup const Path   path
 

Recursively cleans up a local directory, finishing any incomplete operations, removing lockfiles, etc.

Parameters:
path  a local directory.
Exceptions:
ClientException 

svn_revnum_t svn::Client::commit const Targets   targets,
const char *    message,
bool    recurse
 

Commits changes to the repository. This usually requires authentication, see Auth.

Returns:
Returns a long representing the revision. It returns a -1 if the revision number is invalid.
Parameters:
targets  files to commit.
message  log message.
recurse  whether the operation should be done recursively.
Exceptions:
ClientException 

void svn::Client::copy const Path   srcPath,
const Revision   srcRevision,
const Path   destPath
 

Copies a versioned file with the history preserved.

Exceptions:
ClientException 

std::string svn::Client::diff const Path   tmpPath,
const Path   path,
const Revision   revision1,
const Revision   revision2,
const bool    recurse,
const bool    ignoreAncestry,
const bool    noDiffDeleted
 

Produce diff output which describes the delta between path/@a revision1 and path/@a revision2. path can be either a working-copy path or a URL.

A ClientException will be thrown if either revision1 or revision2 has an `unspecified' or unrecognized `kind'.

Parameters:
tmpPath  prefix for a temporary directory needed by diff. Filenames will have ".tmp" and similar added to this prefix in order to ensure uniqueness.
path  path of the file.
revision1  one of the revisions to check.
revision2  the other revision.
recurse  whether the operation should be done recursively.
ignoreAncestry  whether the files will be checked for relatedness.
noDiffDeleted  if true, no diff output will be generated on deleted files.
Returns:
delta between the files
Exceptions:
ClientException 

void svn::Client::doExport const Path   srcPath,
const Path   destPath,
const Revision   revision,
bool    force = false
 

Exports the contents of either a subversion repository into a 'clean' directory (meaning a directory with no administrative directories).

Exceptions:
ClientException 
Parameters:
srcPath  source path
destPath  a destination path that must not already exist.
revision  revision to use for the export
force  force export

void svn::Client::doSwitch const Path   path,
const char *    url,
const Revision   revision,
bool    recurse
 

Update local copy to mirror a new url. This excapsulates the svn_client_switch() client method.

Exceptions:
ClientException 

const Context* svn::Client::getContext   const
 

Returns:
returns the Client context

void svn::Client::import const Path   path,
const char *    url,
const char *    message,
bool    recurse
 

Import file or directory PATH into repository directory URL at head. This usually requires authentication, see Auth.

Parameters:
path  path to import
url 
message  log message.
recurse 
Exceptions:
ClientException 

const LogEntries* svn::Client::log const char *    path,
const Revision   revisionStart,
const Revision   revisionEnd
 

Retrieve log information for the given path Loads the log messages result set. The first entry is the youngest revision.

You can use the constants Revision::START and Revision::HEAD

Parameters:
path 
revisionStart 
revisionEnd 
Returns:
a vector with log entries

DirEntries svn::Client::ls const char *    pathOrUrl,
svn_opt_revision_t *    revision,
bool    recurse
 

lists entries in pathOrUrl no matter whether local or repository

Parameters:
pathOrUrl 
revision 
recurse 

void svn::Client::merge const Path   path1,
const Revision   revision1,
const Path   path2,
const Revision   revision2,
const Path   localPath,
bool    force,
bool    recurse
 

Merge changes from two paths into a new local path.

Exceptions:
ClientException 

void svn::Client::mkdir const Targets   targets,
const char *    message
 

Create multiple directories.

See also:
mkdir (const Path&, const char*)
Parameters:
path  new directory
message 

void svn::Client::mkdir const Path   path,
const char *    message
 

Creates a directory directly in a repository or creates a directory on disk and schedules it for addition. If path is a URL then authentication is usually required, see Auth.

Parameters:
message  log message.
Exceptions:
ClientException 

void svn::Client::move const Path   srcPath,
const Revision   srcRevision,
const Path   destPath,
bool    force
 

Moves or renames a file.

Exceptions:
ClientException 

void svn::Client::notification Notify   notify
 

Sets the notification function and baton that the C library uses to send processing information back to the calling program. This must be called before calling the other methods in this class.

Parameters:
notify  function that the SVN library should call when checking out each file.

void svn::Client::remove const Targets   targets,
bool    force
 

Sets files for deletion.

Parameters:
targets  targets to delete
force  force if files are locally modified
Exceptions:
ClientException 

void svn::Client::remove const Path   path,
bool    force
 

Sets a single file for deletion.

Exceptions:
ClientException 

void svn::Client::resolved const Path   path,
bool    recurse
 

Removes the 'conflicted' state on a file.

Exceptions:
ClientException 

void svn::Client::revert const Path   path,
bool    recurse
 

Reverts a file to a pristine state.

Exceptions:
ClientException 

void svn::Client::setContext Context   context = NULL
 

sets the client context you have to make sure the old context is de-allocated

Parameters:
context  new context to use

Status svn::Client::singleStatus const char *    path
 

Returns the status of a single file in the path.

Throws an exception if an error occurs

Parameters:
path  File to gather status.
Returns:
a Status with Statis.isVersioned = FALSE

StatusEntries svn::Client::status const char *    path,
const bool    descend = false,
const bool    get_all = true,
const bool    update = false,
const bool    no_ignore = false
 

Enumerates all files/dirs at a given path.

Throws an exception if an error occurs

Parameters:
path  Path to explore.
descend  Recurse into subdirectories if existant.
get_all  Return all entries, not just the interesting ones.
update  Query the repository for updates.
no_ignore  Disregard default and svn:ignore property ignores.
Returns:
vector with Status entries.

void svn::Client::update const Path   path,
const Revision   revision,
bool    recurse
 

Updates the file or directory.

Parameters:
path  target file.
revision  the revision number to checkout. Revision::HEAD will checkout the latest revision.
recurse  recursively update.
Exceptions:
ClientException 


The documentation for this class was generated from the following file:
Generated on Thu Aug 28 13:22:38 2003 for SvnCpp by doxygen1.2.15