protected SVNAdminClient getAdminClient() { if (mySVNAdminClient == null) { mySVNAdminClient = new SVNAdminClient(SVNWCUtil.createDefaultAuthenticationManager(), SVNWCUtil.createDefaultOptions(true)); } return mySVNAdminClient; }
public static ISVNAuthenticationManager authenticationManager(String username, String password) { return SVNWCUtil.createDefaultAuthenticationManager( SVNWCUtil.getDefaultConfigurationDirectory(), username, password, false /* do not store credentials, not even when configured */); } }
/** * @param versionedDir a versioned directory to check * @param externalIsRoot * @return <span class="javakeyword">true</span> if * <code>versionedDir</code> is versioned and the WC root * (or the root of externals if <code>considerExternalAsRoot</code> * is <span class="javakeyword">true</span>), otherwise <span class="javakeyword">false</span> * @throws SVNException * @deprecated use {@link #isWorkingCopyRoot(File)}} instead */ public static boolean isWorkingCopyRoot(final File versionedDir, boolean externalIsRoot) throws SVNException { if (isWorkingCopyRoot(versionedDir)) { if (!externalIsRoot) { return true; } File root = getWorkingCopyRoot(versionedDir, false); return root.equals(versionedDir); } return false; }
public DefaultSVNAuthenticationManager() { this(SVNWCUtil.getDefaultConfigurationDirectory(), SVNWCUtil.createDefaultOptions(SVNWCUtil.getDefaultConfigurationDirectory(), true).isAuthStorageEnabled(), null, null, null, null); }
/** * Sets run-time global configuration options to this object. * @param options the run-time configuration options */ public void setOptions(ISVNOptions options) { myOptions = options; if (myOptions == null) { myOptions = SVNWCUtil.createDefaultOptions(true); } }
/** * Gets operation's authentication manager. * If not set, creates default authentication manager. * * @return authentication manager */ public ISVNAuthenticationManager getAuthenticationManager() { if (authenticationManager == null) { authenticationManager = SVNWCUtil.createDefaultAuthenticationManager(); } return authenticationManager; }
private static File getDefaultConfigDir() { return SVNWCUtil.getDefaultConfigurationDirectory(); }
versionedDir = versionedDir.getAbsoluteFile(); if (versionedDir == null || (!isVersionedDirectory(versionedDir) && !isVersionedDirectory(versionedDir.getParentFile()))) { if (isWorkingCopyRoot(versionedDir)) { File parentRoot = getWorkingCopyRoot(parent, stopOnExtenrals); if (parentRoot == null) { return getWorkingCopyRoot(parent, stopOnExtenrals);
protected String getWCRootPath() { if (myWCRootPath == null) { try { File root = SVNWCUtil.getWorkingCopyRoot(myAdminInfo.getAnchor().getRoot(), true); if (root != null) { myWCRootPath = root.getAbsolutePath().replace(File.separatorChar, '/'); } } catch (SVNException e) { // ignore. } } return myWCRootPath; }
SVNFileType fileType = SVNFileType.getType(path); if (fileType == SVNFileType.DIRECTORY) { dir = wcAccess.open(SVNWCUtil.isVersionedDirectory(path.getParentFile()) ? path.getParentFile() : path, true, 0); } else { dir = wcAccess.open(path.getParentFile(), true, 0); File wcRoot = SVNWCUtil.getWorkingCopyRoot(dir.getRoot(), true); addDirectory(wcRoot, path, dir, force, includeIgnored, depth, depthIsSticky); } else if (fileType == SVNFileType.FILE || fileType == SVNFileType.SYMLINK) {
if (SVNWCUtil.isVersionedDirectory(userDir)) { final SVNStatusClient statusClient = userClientManager.getStatusClient(); final SVNStatus status = statusClient.doStatus(userDir, false);
/** * @param versionedDir * a versioned directory to check * @param externalIsRoot * @return <span class="javakeyword">true</span> if * <code>versionedDir</code> is versioned and the WC root (or the * root of externals if <code>considerExternalAsRoot</code> is * <span class="javakeyword">true</span>), otherwise <span * class="javakeyword">false</span> * @throws SVNException * @deprecated use {@link #isWorkingCopyRoot(File)}} instead */ public static boolean isWorkingCopyRoot(final File versionedDir, boolean externalIsRoot) throws SVNException { if (isWorkingCopyRoot(versionedDir)) { if (!externalIsRoot) { return true; } File root = SvnOperationFactory.getWorkingCopyRoot(versionedDir, false); return root.equals(versionedDir); } return false; }
private SVNClientManager(ISVNOptions options, ISVNRepositoryPool repositoryPool) { myOptions = options; if (myOptions == null) { myOptions = SVNWCUtil.createDefaultOptions(true); } myRepositoryPool = repositoryPool; }
/** * @deprecated Use {@link #createDefaultAuthenticationManager(File, String, char[], boolean)} method. */ public static ISVNAuthenticationManager createDefaultAuthenticationManager(File configDir, String userName, String password, boolean storeAuth) { return createDefaultAuthenticationManager(configDir, userName, password, null, null, storeAuth); }
public DefaultSVNHostOptionsProvider(File configDirectory) { myConfigDirectory = configDirectory == null ? SVNWCUtil.getDefaultConfigurationDirectory() : configDirectory; }
versionedDir = versionedDir.getAbsoluteFile(); if (versionedDir == null || (!isVersionedDirectory(versionedDir) && (versionedDir.getParentFile() == null || !isVersionedDirectory(versionedDir.getParentFile())))) { if (isWorkingCopyRoot(versionedDir)) { File parentRoot = getWorkingCopyRoot(parent, stopOnExtenrals); if (parentRoot == null) { return getWorkingCopyRoot(parent, stopOnExtenrals);
protected String getWCRootPath() { if (myWCRootPath == null) { try { File root = SVNWCUtil.getWorkingCopyRoot(myAdminInfo.getAnchor().getRoot(), true); if (root != null) { myWCRootPath = root.getAbsolutePath().replace(File.separatorChar, '/'); } } catch (SVNException e) { // ignore. } } return myWCRootPath; }
SVNFileType fileType = SVNFileType.getType(path); if (fileType == SVNFileType.DIRECTORY) { dir = wcAccess.open(SVNWCUtil.isVersionedDirectory(path.getParentFile()) ? path.getParentFile() : path, true, 0); } else { File wcRoot = SVNWCUtil.getWorkingCopyRoot(dir.getRoot(), true); addDirectory(wcRoot, path, dir, force, includeIgnored, depth, depthIsSticky); } else if (fileType == SVNFileType.FILE || fileType == SVNFileType.SYMLINK) {
if (SVNWCUtil.isVersionedDirectory(userDir)) { final SVNStatusClient statusClient = userClientManager.getStatusClient(); final SVNStatus status = statusClient.doStatus(userDir, false);
SVNErrorManager.error(err, SVNLogType.WC); if (isMove && SVNWCUtil.isWorkingCopyRoot(source)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.UNSUPPORTED_FEATURE, "Cannot move ''{0}'' as it is the root of the working copy", source);