#include <client.hpp>
Public Member Functions | |
Client (Context *context=0) | |
virtual | ~Client () |
const Context * | getContext () 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, const bool ignore_externals=false) throw (ClientException) |
Status | singleStatus (const char *path) throw (ClientException) |
svn_revnum_t | checkout (const char *moduleName, const Path &destPath, const Revision &revision, bool recurse, bool ignore_externals=false, const Revision &peg_revision=Revision()) throw (ClientException) |
void | relocate (const Path &path, const char *from_url, const char *to_url, bool recurse) throw (ClientException) |
void | remove (const Path &path, bool force) throw (ClientException) |
void | remove (const Targets &targets, bool force) throw (ClientException) |
void | lock (const Targets &targets, bool force, const char *comment) throw (ClientException) |
void | unlock (const Targets &targets, bool force) throw (ClientException) |
void | revert (const Targets &targets, bool recurse) throw (ClientException) |
void | add (const Path &path, bool recurse) throw (ClientException) |
svn_revnum_t | update (const Path &path, const Revision &revision, bool recurse) throw (ClientException) |
void | update2 (const Targets &targets, const Revision &revision, bool recurse, bool ignore_externals) throw (ClientException) |
std::string | cat (const Path &path, const Revision &revision, const Revision &peg_revision=Revision()) throw (ClientException) |
void | get (Path &dstPath, const Path &path, const Revision &revision, const Revision &peg_revision=Revision()) throw (ClientException) |
AnnotatedFile * | annotate (const Path &path, const Revision &revisionStart, const Revision &revisionEnd) throw (ClientException) |
svn_revnum_t | commit (const Targets &targets, const char *message, bool recurse, bool keep_locks=false) throw (ClientException) |
void | copy (const Path &srcPath, const Revision &srcRevision, const Path &destPath) throw (ClientException) |
void | move (const Path &srcPath, const Revision &srcRevision, const Path &destPath, bool force) throw (ClientException) |
void | mkdir (const Path &path, const char *message="") throw (ClientException) |
void | mkdir (const Targets &targets, const char *message="") throw (ClientException) |
void | cleanup (const Path &path) throw (ClientException) |
void | resolved (const Path &path, bool recurse) throw (ClientException) |
svn_revnum_t | doExport (const Path &srcPath, const Path &destPath, const Revision &revision, bool force=false) throw (ClientException) |
void | doExport2 (const Path &from_path, const Path &to_path, const Revision &revision, bool overwrite=false, const Revision &peg_revision=Revision(), bool ignore_externals=false, bool recurse=true, const char *native_eol=NULL) throw (ClientException) |
svn_revnum_t | doSwitch (const Path &path, const char *url, const Revision &revision, bool recurse) throw (ClientException) |
void | import (const Path &path, const char *url, const char *message, bool recurse) throw (ClientException) |
void | merge (const Path &path1, const Revision &revision1, const Path &path2, const Revision &revision2, const Path &localPath, bool force, bool recurse, bool notice_ancestry=false, bool dry_run=false) throw (ClientException) |
Entry | info (const char *path) |
const LogEntries * | log (const char *path, const Revision &revisionStart, const Revision &revisionEnd, bool discoverChangedPaths=false, bool strictNodeHistory=true) throw (ClientException) |
std::string | diff (const Path &tmpPath, const Path &path, const Revision &revision1, const Revision &revision2, const bool recurse, const bool ignoreAncestry, const bool noDiffDeleted) throw (ClientException) |
DirEntries | ls (const char *pathOrUrl, svn_opt_revision_t *revision, bool recurse) throw (ClientException) |
DirEntries | list (const char *pathOrUrl, svn_opt_revision_t *revision, bool recurse) throw (ClientException) |
PathPropertiesMapList | proplist (const Path &path, const Revision &revision, bool recurse=false) |
PathPropertiesMapList | propget (const char *propName, const Path &path, const Revision &revision, bool recurse=false) |
void | propset (const char *propName, const char *propValue, const Path &path, const Revision &revision, bool recurse=false, bool skip_checks=true) |
void | propdel (const char *propName, const Path &path, const Revision &revision, bool recurse=false) |
std::pair< svn_revnum_t, PropertiesMap > | revproplist (const Path &path, const Revision &revision) |
std::pair< svn_revnum_t, std::string > | revpropget (const char *propName, const Path &path, const Revision &revision) |
svn_revnum_t | revpropset (const char *propName, const char *propValue, const Path &path, const Revision &revision, bool force=false) |
svn_revnum_t | revpropdel (const char *propName, const Path &path, const Revision &revision, bool force=false) |
svn::Client::Client | ( | Context * | context = 0 |
) |
Initializes the primary memory pool.
virtual svn::Client::~Client | ( | ) | [virtual] |
void svn::Client::add | ( | const Path & | path, | |
bool | recurse | |||
) | throw (ClientException) |
Adds a file to the repository.
ClientException |
AnnotatedFile* svn::Client::annotate | ( | const Path & | path, | |
const Revision & | revisionStart, | |||
const Revision & | revisionEnd | |||
) | throw (ClientException) |
Retrieves the contents for a specific revision of a path
path | path of file or directory | |
revisionStart | revision to retrieve | |
revisionEnd | revision to retrieve |
std::string svn::Client::cat | ( | const Path & | path, | |
const Revision & | revision, | |||
const Revision & | peg_revision = Revision() | |||
) | throw (ClientException) |
Retrieves the contents for a specific revision of a path
path | path of file or directory | |
revision | revision to retrieve | |
peg_revision | peg revision to retrieve, by default is the latest one |
svn_revnum_t svn::Client::checkout | ( | const char * | moduleName, | |
const Path & | destPath, | |||
const Revision & | revision, | |||
bool | recurse, | |||
bool | ignore_externals = false , |
|||
const Revision & | peg_revision = Revision() | |||
) | throw (ClientException) |
Executes a revision checkout.
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. | |
ignore_externals | whether you want get external resources too. | |
peg_revision | peg revision to checkout, by default current. |
ClientException |
void svn::Client::cleanup | ( | const Path & | path | ) | throw (ClientException) |
Recursively cleans up a local directory, finishing any incomplete operations, removing lockfiles, etc.
path | a local directory. |
ClientException |
svn_revnum_t svn::Client::commit | ( | const Targets & | targets, | |
const char * | message, | |||
bool | recurse, | |||
bool | keep_locks = false | |||
) | throw (ClientException) |
Commits changes to the repository. This usually requires authentication, see Auth.
targets | files to commit. | |
message | log message. | |
recurse | whether the operation should be done recursively. | |
keep_locks | whether to preserve locks or to release them after commit |
ClientException |
void svn::Client::copy | ( | const Path & | srcPath, | |
const Revision & | srcRevision, | |||
const Path & | destPath | |||
) | throw (ClientException) |
Copies a versioned file with the history preserved.
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 | |||
) | throw (ClientException) |
Produce diff output which describes the delta between path/revision1 and path/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'.
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. |
ClientException |
svn_revnum_t svn::Client::doExport | ( | const Path & | srcPath, | |
const Path & | destPath, | |||
const Revision & | revision, | |||
bool | force = false | |||
) | throw (ClientException) |
Exports the contents of either a subversion repository into a 'clean' directory (meaning a directory with no administrative directories).
ClientException |
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::doExport2 | ( | const Path & | from_path, | |
const Path & | to_path, | |||
const Revision & | revision, | |||
bool | overwrite = false , |
|||
const Revision & | peg_revision = Revision() , |
|||
bool | ignore_externals = false , |
|||
bool | recurse = true , |
|||
const char * | native_eol = NULL | |||
) | throw (ClientException) |
Export into file or directory TO_PATH from local or remote FROM_PATH
from_path | path to import | |
to_path | where to import | |
revision | revision of files in source repository or working copy | |
peg_revision | ||
overwrite | overwrite existing files in to_path | |
ignore_externals | whether to ignore external sources in from_path | |
recurse | ||
native_eol | which EOL to use when exporting, usually different for different OSs |
ClientException |
svn_revnum_t svn::Client::doSwitch | ( | const Path & | path, | |
const char * | url, | |||
const Revision & | revision, | |||
bool | recurse | |||
) | throw (ClientException) |
Update local copy to mirror a new url. This excapsulates the svn_client_switch() client method.
ClientException |
void svn::Client::get | ( | Path & | dstPath, | |
const Path & | path, | |||
const Revision & | revision, | |||
const Revision & | peg_revision = Revision() | |||
) | throw (ClientException) |
Retrieves the contents for a specific revision of a path and saves it to the destination file dstPath.
If dstPath is empty (""), then this path will be constructed from the temporary directory on this system and the filename in path. dstPath will still have the file extension from path and uniqueness of the temporary filename will be ensured.
dstPath | Filename in which the contents of the file file will be safed. | |
path | path or url | |
revision | ||
peg_revision | peg revision to retrieve, by default is the latest one |
void svn::Client::import | ( | const Path & | path, | |
const char * | url, | |||
const char * | message, | |||
bool | recurse | |||
) | throw (ClientException) |
Import file or directory PATH into repository directory URL at head. This usually requires authentication, see Auth.
path | path to import | |
url | ||
message | log message. | |
recurse |
ClientException |
Entry svn::Client::info | ( | const char * | path | ) |
DirEntries svn::Client::list | ( | const char * | pathOrUrl, | |
svn_opt_revision_t * | revision, | |||
bool | recurse | |||
) | throw (ClientException) |
lists entries in pathOrUrl no matter whether local or repository
pathOrUrl | ||
revision | ||
recurse |
void svn::Client::lock | ( | const Targets & | targets, | |
bool | force, | |||
const char * | comment | |||
) | throw (ClientException) |
Sets files to lock.
targets | targets to lock | |
force | force setting/stealing lock | |
comment | writing comment about lock setting is neccessary |
ClientException |
const LogEntries* svn::Client::log | ( | const char * | path, | |
const Revision & | revisionStart, | |||
const Revision & | revisionEnd, | |||
bool | discoverChangedPaths = false , |
|||
bool | strictNodeHistory = true | |||
) | throw (ClientException) |
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
path | ||
revisionStart | ||
revisionEnd | ||
discoverChangedPaths | ||
strictNodeHistory |
DirEntries svn::Client::ls | ( | const char * | pathOrUrl, | |
svn_opt_revision_t * | revision, | |||
bool | recurse | |||
) | throw (ClientException) |
lists entries in pathOrUrl no matter whether local or repository
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, | |||
bool | notice_ancestry = false , |
|||
bool | dry_run = false | |||
) | throw (ClientException) |
Merge changes from two paths into a new local path.
ClientException |
void svn::Client::mkdir | ( | const Targets & | targets, | |
const char * | message = "" | |||
) | throw (ClientException) |
void svn::Client::mkdir | ( | const Path & | path, | |
const char * | message = "" | |||
) | throw (ClientException) |
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.
path | ||
message | log message. |
ClientException |
void svn::Client::move | ( | const Path & | srcPath, | |
const Revision & | srcRevision, | |||
const Path & | destPath, | |||
bool | force | |||
) | throw (ClientException) |
Moves or renames a file.
ClientException |
void svn::Client::propdel | ( | const char * | propName, | |
const Path & | path, | |||
const Revision & | revision, | |||
bool | recurse = false | |||
) |
delete property in path no matter whether local or repository
propName | ||
path | ||
revision | ||
recurse |
PathPropertiesMapList svn::Client::propget | ( | const char * | propName, | |
const Path & | path, | |||
const Revision & | revision, | |||
bool | recurse = false | |||
) |
lists one property in path no matter whether local or repository
propName | ||
path | ||
revision | ||
recurse |
PathPropertiesMapList svn::Client::proplist | ( | const Path & | path, | |
const Revision & | revision, | |||
bool | recurse = false | |||
) |
lists properties in path no matter whether local or repository
path | ||
revision | ||
recurse |
void svn::Client::propset | ( | const char * | propName, | |
const char * | propValue, | |||
const Path & | path, | |||
const Revision & | revision, | |||
bool | recurse = false , |
|||
bool | skip_checks = true | |||
) |
This method is deprecated, please use Property.set set property in path no matter whether local or repository
path | ||
revision | ||
propName | ||
propValue | ||
recurse | ||
skip_checks |
void svn::Client::relocate | ( | const Path & | path, | |
const char * | from_url, | |||
const char * | to_url, | |||
bool | recurse | |||
) | throw (ClientException) |
relocate wc from to to
ClientException |
void svn::Client::remove | ( | const Targets & | targets, | |
bool | force | |||
) | throw (ClientException) |
Sets files for deletion.
targets | targets to delete | |
force | force if files are locally modified |
ClientException |
void svn::Client::remove | ( | const Path & | path, | |
bool | force | |||
) | throw (ClientException) |
Sets a single file for deletion.
ClientException |
void svn::Client::resolved | ( | const Path & | path, | |
bool | recurse | |||
) | throw (ClientException) |
Removes the 'conflicted' state on a file.
ClientException |
void svn::Client::revert | ( | const Targets & | targets, | |
bool | recurse | |||
) | throw (ClientException) |
Reverts a couple of files to a pristiner state.
ClientException |
svn_revnum_t svn::Client::revpropdel | ( | const char * | propName, | |
const Path & | path, | |||
const Revision & | revision, | |||
bool | force = false | |||
) |
delete revision property in path no matter whether local or repository
propName | ||
path | ||
revision | ||
force |
std::pair<svn_revnum_t,std::string> svn::Client::revpropget | ( | const char * | propName, | |
const Path & | path, | |||
const Revision & | revision | |||
) |
lists one revision property in path no matter whether local or repository
propName | ||
path | ||
revision |
std::pair<svn_revnum_t,PropertiesMap> svn::Client::revproplist | ( | const Path & | path, | |
const Revision & | revision | |||
) |
lists revision properties in path no matter whether local or repository
path | ||
revision |
svn_revnum_t svn::Client::revpropset | ( | const char * | propName, | |
const char * | propValue, | |||
const Path & | path, | |||
const Revision & | revision, | |||
bool | force = false | |||
) |
set revision property in path no matter whether local or repository
propName | ||
propValue | ||
path | ||
revision | ||
force |
void svn::Client::setContext | ( | Context * | context = NULL |
) |
sets the client context you have to make sure the old context is de-allocated
context | new context to use |
Status svn::Client::singleStatus | ( | const char * | path | ) | throw (ClientException) |
Returns the status of a single file in the path.
Throws an exception if an error occurs
path | File to gather status. |
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 , |
|||
const bool | ignore_externals = false | |||
) | throw (ClientException) |
Enumerates all files/dirs at a given path.
Throws an exception if an error occurs
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. | |
ignore_externals | Disregard external files. |
void svn::Client::unlock | ( | const Targets & | targets, | |
bool | force | |||
) | throw (ClientException) |
Sets files to unlock.
targets | targets to unlock | |
force | force unlock even if lock belongs to another user |
ClientException |
svn_revnum_t svn::Client::update | ( | const Path & | path, | |
const Revision & | revision, | |||
bool | recurse | |||
) | throw (ClientException) |
Updates the file or directory.
path | target file. | |
revision | the revision number to checkout. Revision::HEAD will checkout the latest revision. | |
recurse | recursively update. |
ClientException |
void svn::Client::update2 | ( | const Targets & | targets, | |
const Revision & | revision, | |||
bool | recurse, | |||
bool | ignore_externals | |||
) | throw (ClientException) |
Updates the file or directory.
targets | target files. | |
revision | the revision number to checkout. Revision::HEAD will checkout the latest revision. | |
recurse | recursively update. | |
ignore_externals | don't affect external destinations. |
ClientException |