Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNAdmin.java view on Meta::CPAN
throws ClientException
{
try
{
aSVNAdmin.setRevProp(new File(path),
rev == null ? null : rev.toApache(),
"svn:log", message,
!bypassHooks, !bypassHooks);
}
catch (org.apache.subversion.javahl.SubversionException ex)
{
throw ClientException.fromException(ex);
}
}
/**
* Change the value of the revision property <code>propName</code>
* to <code>propValue</code>. By default, does not run
* pre-/post-revprop-change hook scripts.
*
* @param path The path to the repository.
* @param rev The revision for which to change a property value.
* @param propName The name of the property to change.
* @param propValue The new value to set for the property.
* @param usePreRevPropChangeHook Whether to run the
* <i>pre-revprop-change</i> hook script.
* @param usePostRevPropChangeHook Whether to run the
* <i>post-revprop-change</i> hook script.
* @throws SubversionException If a problem occurs.
* @since 1.5.0
*/
public void setRevProp(String path, Revision rev, String propName,
String propValue, boolean usePreRevPropChangeHook,
boolean usePostRevPropChangeHook)
throws SubversionException
{
try
{
aSVNAdmin.setRevProp(new File(path),
rev == null ? null : rev.toApache(),
propName, propValue,
usePreRevPropChangeHook,
usePostRevPropChangeHook);
}
catch (org.apache.subversion.javahl.SubversionException ex)
{
throw new SubversionException(ex);
}
}
/**
* Verify the repository at <code>path</code> between revisions
* <code>start</code> and <code>end</code>.
*
* @param path the path to the repository
* @param messageOut the receiver of all messages
* @param start the first revision
* @param end the last revision
* @throws ClientException If an error occurred.
*/
public void verify(String path, OutputInterface messageOut,
Revision start, Revision end)
throws ClientException
{
try
{
aSVNAdmin.verify(new File(path),
start == null ? null : start.toApache(),
end == null ? null : end.toApache(),
new ReposNotifyHandler(messageOut));
}
catch (org.apache.subversion.javahl.ClientException ex)
{
throw new ClientException(ex);
}
}
/**
* list all locks in the repository
* @param path the path to the repository
* @throws ClientException throw in case of problem
* @since 1.2
*/
public Lock[] lslocks(String path)
throws ClientException
{
try
{
Set<org.apache.subversion.javahl.types.Lock> aLocks =
aSVNAdmin.lslocks(
new File(path),
Depth.toADepth(
Depth.infinity));
Lock[] locks = new Lock[aLocks.size()];
int i = 0;
for (org.apache.subversion.javahl.types.Lock lock : aLocks)
{
locks[i] = new Lock(lock);
i++;
}
return locks;
}
catch (org.apache.subversion.javahl.ClientException ex)
{
throw new ClientException(ex);
}
}
/**
* remove multiple locks from the repository
* @param path the path to the repository
* @param locks the name of the locked items
* @throws ClientException throw in case of problem
* @since 1.2
*/
public void rmlocks(String path, String [] locks)
throws ClientException
{
try
{
aSVNAdmin.rmlocks(new File(path), locks);
}
catch (org.apache.subversion.javahl.ClientException ex)
{
throw new ClientException(ex);
src/subversion/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNAdmin.java view on Meta::CPAN
public void close() throws IOException
{
outputer.close();
}
}
private class InputWrapper extends InputStream
{
private InputInterface inputer;
InputWrapper(InputInterface inputer)
{
this.inputer = inputer;
}
public int read() throws IOException
{
byte[] b = new byte[1];
if (inputer.read(b) > 0)
return b[0];
else
return -1;
}
public int read(byte[] b) throws IOException
{
return inputer.read(b);
}
public void close() throws IOException
{
inputer.close();
}
}
private class ReposNotifyHandler
implements org.apache.subversion.javahl.callback.ReposNotifyCallback
{
private OutputInterface outputer;
public ReposNotifyHandler(OutputInterface outputer)
{
this.outputer = outputer;
}
public void onNotify(org.apache.subversion.javahl.ReposNotifyInformation
info)
{
String val;
switch (info.getAction())
{
case warning:
val = info.getWarning();
break;
case dump_rev_end:
val = "* Dumped revision " + info.getRevision() + ".\n";
break;
case verify_rev_end:
val = "* Verified revision " + info.getRevision() + ".\n";
break;
case load_txn_committed:
if (info.getOldRevision() == Revision.SVN_INVALID_REVNUM)
val = "\n------- Committed revision " +
info.getNewRevision() + " >>>\n\n";
else
val = "\n------- Committed new rev " +
info.getNewRevision() +
" (loaded from original rev " +
info.getOldRevision() +
") >>>\n\n";
break;
case load_node_start:
switch (info.getNodeAction())
{
case change:
val = " * editing path : " + info.getPath() +
" ...";
break;
case deleted:
val = " * deleting path : " + info.getPath() +
" ...";
break;
case add:
val = " * adding path : " + info.getPath() +
" ...";
break;
case replace:
val = " * replacing path : " + info.getPath() +
" ...";
break;
default:
val = null;
}
break;
case load_node_done:
val = " done.\n";
break;
case load_copied_node:
val = "COPIED...";
break;
case load_txn_start:
val = "<<< Started new transaction, based on " +
"original revision " + info.getOldRevision() + "\n";
break;
case load_normalized_mergeinfo:
val = " removing '\\r' from svn:mergeinfo ...";
break;
( run in 0.525 second using v1.01-cache-2.11-cpan-ceb78f64989 )