public void upgrade(String path) throws ClientException { try { final SvnOperationFactory of = getSVNWCClient().getOperationsFactory(); final SvnUpgrade upgrade = of.createUpgrade(); upgrade.setSingleTarget(SvnTarget.fromFile(new File(path))); upgrade.run(); } catch (SVNException e) { throwException(e); } } }
/** * Schedules <code>path</code> as being replaced. This method does not * perform any deletion\addition in the filesysem nor does it require a * connection to the repository. It just marks the current <code>path</code> * item as being replaced. * * @param path * working copy path to mark as * @throws SVNException * @since 1.2 */ public void doMarkReplaced(File path) throws SVNException { SvnMarkReplaced mr = getOperationsFactory().createMarkReplaced(); mr.setSingleTarget(SvnTarget.fromFile(path)); mr.run(); }
/** * Recursively removes all DAV-specific <span * class="javakeyword">"svn:wc:"</span> properties from the * <code>directory</code> and beneath. * * <p> * This method does not connect to a repository, it's a local operation * only. Nor does it change any user's versioned data. Changes are made only * in administrative version control files. * * @param directory * working copy path * @throws SVNException * @since 1.2 */ public void doCleanupWCProperties(File directory) throws SVNException { SVNWCClient16 oldClient = new SVNWCClient16(getOperationsFactory().getAuthenticationManager(), getOptions()); oldClient.doCleanupWCProperties(directory); }
/** * Cleans up a working copy. This method is equivalent to a call to * <code>doCleanup(path, false)</code>. * * @param path * a WC path to start a cleanup from * @throws SVNException * if one of the following is true: * <ul> * <li><code>path</code> does not exist * <li><code>path</code>'s parent directory is not under version * control * </ul> * @see #doCleanup(File, boolean) */ public void doCleanup(File path) throws SVNException { SvnCleanup cleanup = getOperationsFactory().createCleanup(); cleanup.setSingleTarget(SvnTarget.fromFile(path)); cleanup.run(); }
/** * Unlocks file items in a repository. * * @param urls * an array of URLs that should be unlocked * @param breakLock * if <span class="javakeyword">true</span> and there are locks * that belong to different users then those locks will be also * unlocked - that is "broken" * @throws SVNException * @see #doUnlock(File[],boolean) */ public void doUnlock(SVNURL[] urls, boolean breakLock) throws SVNException { SvnUnlock unlock = getOperationsFactory().createUnlock(); for (int i = 0; i < urls.length; i++) { unlock.addTarget(SvnTarget.fromURL(urls[i])); } unlock.setBreakLock(breakLock); unlock.run(); }
SvnUpgrade upgrade = getOperationsFactory().createUpgrade(); upgrade.setSingleTarget(SvnTarget.fromFile(directory)); upgrade.setDepth(SVNDepth.INFINITY); upgrade.run(); } else { SVNWCClient16 oldClient = new SVNWCClient16(getOperationsFactory().getAuthenticationManager(), getOptions()); oldClient.doSetWCFormat(directory, format);
SvnUnlock unlock = getOperationsFactory().createUnlock(); for (int i = 0; i < paths.length; i++) { unlock.addTarget(SvnTarget.fromFile(paths[i]));
SvnCleanup cleanup = getOperationsFactory().createCleanup(); cleanup.setSingleTarget(SvnTarget.fromFile(path)); cleanup.setDeleteWCProperties(deleteWCProperties);
/** * Locks file items in a repository so that no other user can commit changes * to them. * * @param urls * an array of URLs to be locked * @param stealLock * if <span class="javakeyword">true</span> then all existing * locks on the specified <code>urls</code> will be "stolen" * @param lockMessage * an optional lock comment * @throws SVNException * @see #doLock(File[],boolean,String) */ public void doLock(SVNURL[] urls, boolean stealLock, String lockMessage) throws SVNException { SvnSetLock lock = getOperationsFactory().createSetLock(); for (int i = 0; i < urls.length; i++) { lock.addTarget(SvnTarget.fromURL(urls[i])); } lock.setStealLock(stealLock); lock.setLockMessage(lockMessage); lock.run(); }
SvnSetLock lock = getOperationsFactory().createSetLock(); for (int i = 0; i < paths.length; i++) { lock.addTarget(SvnTarget.fromFile(paths[i]));
public void doCleanup(File path, boolean deleteWCProperties, boolean breakLocks, boolean vacuumPristines, boolean removeUnversionedItems, boolean removeIgnoredItems, boolean includeExternals) throws SVNException { SvnCleanup cleanup = getOperationsFactory().createCleanup(); cleanup.setSingleTarget(SvnTarget.fromFile(path)); cleanup.setDeleteWCProperties(deleteWCProperties); cleanup.setBreakLocks(breakLocks); cleanup.setVacuumPristines(vacuumPristines); cleanup.setRemoveUnversionedItems(removeUnversionedItems); cleanup.setRemoveIgnoredItems(removeIgnoredItems); cleanup.setIncludeExternals(includeExternals); cleanup.run(); }
SvnGetInfo getInfo = getOperationsFactory().createGetInfo(); getInfo.setSingleTarget(SvnTarget.fromFile(path)); getInfo.setRevision(revision);
SvnGetInfo getInfo = getOperationsFactory().createGetInfo(); getInfo.setSingleTarget(SvnTarget.fromURL(url, pegRevision)); getInfo.setRevision(revision);
SvnScheduleForRemoval remove = getOperationsFactory().createScheduleForRemoval(); remove.setSingleTarget(SvnTarget.fromFile(path)); remove.setForce(force);
SvnRevert revert = getOperationsFactory().createRevert(); for (int i = 0; i < paths.length; i++) { revert.addTarget(SvnTarget.fromFile(paths[i]));
SvnGetProperties getProperties = getOperationsFactory().createGetProperties(); getProperties.setSingleTarget(SvnTarget.fromURL(url, pegRevision)); getProperties.setRevision(revision);
SvnGetProperties getProperties = getOperationsFactory().createGetProperties(); getProperties.setSingleTarget(SvnTarget.fromFile(path, pegRevision)); getProperties.setRevision(revision);
final SvnGetProperties getProperties = getOperationsFactory().createGetProperties(); getProperties.setSingleTarget(SvnTarget.fromURL(url)); getProperties.setRevisionProperties(true);
SvnCat cat = getOperationsFactory().createCat(); if (revision == SVNRevision.UNDEFINED) { if (pegRevision != null && pegRevision.isValid()) {
SvnSetProperty ps = getOperationsFactory().createSetProperty(); ps.setRevisionProperty(true); ps.setSingleTarget(SvnTarget.fromFile(path));