Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/javahl/native/SVNClient.cpp view on Meta::CPAN
&receiver, ctx,
subPool.getPool()), );
}
void SVNClient::streamFileContent(const char *path, Revision &revision,
Revision &pegRevision,
OutputStream &outputStream)
{
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
Path intPath(path, subPool);
SVN_JNI_ERR(intPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
return;
SVN_JNI_ERR(svn_client_cat2(outputStream.getStream(subPool),
intPath.c_str(), pegRevision.revision(),
revision.revision(), ctx, subPool.getPool()),
);
}
jbyteArray SVNClient::revProperty(const char *path,
const char *name, Revision &rev)
{
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", NULL);
SVN_JNI_NULL_PTR_EX(name, "name", NULL);
Path intPath(path, subPool);
SVN_JNI_ERR(intPath.error_occurred(), NULL);
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
return NULL;
const char *URL;
svn_string_t *propval;
svn_revnum_t set_rev;
SVN_JNI_ERR(svn_client_url_from_path2(&URL, intPath.c_str(), ctx,
subPool.getPool(),
subPool.getPool()),
NULL);
if (URL == NULL)
{
SVN_JNI_ERR(svn_error_create(SVN_ERR_UNVERSIONED_RESOURCE, NULL,
_("Either a URL or versioned item is required.")),
NULL);
}
SVN_JNI_ERR(svn_client_revprop_get(name, &propval, URL,
rev.revision(), &set_rev, ctx,
subPool.getPool()),
NULL);
if (propval == NULL)
return NULL;
return JNIUtil::makeJByteArray(propval);
}
void SVNClient::relocate(const char *from, const char *to, const char *path,
bool ignoreExternals)
{
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
SVN_JNI_NULL_PTR_EX(from, "from", );
SVN_JNI_NULL_PTR_EX(to, "to", );
Path intPath(path, subPool);
SVN_JNI_ERR(intPath.error_occurred(), );
Path intFrom(from, subPool);
SVN_JNI_ERR(intFrom.error_occurred(), );
Path intTo(to, subPool);
SVN_JNI_ERR(intTo.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
return;
SVN_JNI_ERR(svn_client_relocate2(intPath.c_str(), intFrom.c_str(),
intTo.c_str(), ignoreExternals, ctx,
subPool.getPool()), );
}
void SVNClient::blame(const char *path, Revision &pegRevision,
Revision &revisionStart, Revision &revisionEnd,
bool ignoreMimeType, bool includeMergedRevisions,
BlameCallback *callback)
{
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
Path intPath(path, subPool);
SVN_JNI_ERR(intPath.error_occurred(), );
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
if (ctx == NULL)
return;
SVN_JNI_ERR(svn_client_blame5(
intPath.c_str(), pegRevision.revision(), revisionStart.revision(),
revisionEnd.revision(),
svn_diff_file_options_create(subPool.getPool()), ignoreMimeType,
includeMergedRevisions, BlameCallback::callback, callback, ctx,
subPool.getPool()),
);
}
void SVNClient::addToChangelist(Targets &srcPaths, const char *changelist,
svn_depth_t depth, StringArray &changelists)
{
SVN::Pool subPool(pool);
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
const apr_array_header_t *srcs = srcPaths.array(subPool);
SVN_JNI_ERR(srcPaths.error_occurred(), );
SVN_JNI_ERR(svn_client_add_to_changelist(srcs, changelist, depth,
changelists.array(subPool),
ctx, subPool.getPool()), );
}
void SVNClient::removeFromChangelists(Targets &srcPaths, svn_depth_t depth,
StringArray &changelists)
{
SVN::Pool subPool(pool);
svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
const apr_array_header_t *srcs = srcPaths.array(subPool);
SVN_JNI_ERR(srcPaths.error_occurred(), );
SVN_JNI_ERR(svn_client_remove_from_changelists(srcs, depth,
changelists.array(subPool),
ctx, subPool.getPool()), );
}
void SVNClient::getChangelists(const char *rootPath,
StringArray &changelists,
svn_depth_t depth,
ChangelistCallback *callback)
{
( run in 1.134 second using v1.01-cache-2.11-cpan-5511b514fd6 )