public static File getApplicationDataPath() { if (ourAppDataPath != null) { return ourAppDataPath; } String envAppData = getEnvironmentVariable("APPDATA"); if (envAppData == null) { ourAppDataPath = new File(new File(System.getProperty("user.home")), "Application Data"); } else { ourAppDataPath = new File(envAppData); } return ourAppDataPath; }
public static String getAdminDirectoryName() { if (ourAdminDirectoryName == null) { String defaultAdminDir = ".svn"; if (getEnvironmentVariable("SVN_ASP_DOT_NET_HACK") != null) { defaultAdminDir = "_svn"; } ourAdminDirectoryName = System.getProperty("svnkit.admindir", System.getProperty("javasvn.admindir", defaultAdminDir)); if (ourAdminDirectoryName == null || "".equals(ourAdminDirectoryName.trim())) { ourAdminDirectoryName = defaultAdminDir; } } return ourAdminDirectoryName; }
public static String getAdminDirectoryName() { if (ourAdminDirectoryName == null) { String defaultAdminDir = ".svn"; if (getEnvironmentVariable("SVN_ASP_DOT_NET_HACK") != null) { defaultAdminDir = "_svn"; } ourAdminDirectoryName = System.getProperty("svnkit.admindir", System.getProperty("javasvn.admindir", defaultAdminDir)); if (ourAdminDirectoryName == null || "".equals(ourAdminDirectoryName.trim())) { ourAdminDirectoryName = defaultAdminDir; } } return ourAdminDirectoryName; }
public static String getAdminDirectoryName() { if (ourAdminDirectoryName == null) { String defaultAdminDir = ".svn"; if (getEnvironmentVariable("SVN_ASP_DOT_NET_HACK") != null){ defaultAdminDir = "_svn"; } ourAdminDirectoryName = System.getProperty("svnkit.admindir", System.getProperty("javasvn.admindir", defaultAdminDir)); if (ourAdminDirectoryName == null || "".equals(ourAdminDirectoryName.trim())) { ourAdminDirectoryName = defaultAdminDir; } } return ourAdminDirectoryName; }
public static String getAdminDirectoryName() { if (ourAdminDirectoryName == null) { String defaultAdminDir = ".svn"; if (getEnvironmentVariable("SVN_ASP_DOT_NET_HACK") != null) { defaultAdminDir = "_svn"; } ourAdminDirectoryName = System.getProperty("svnkit.admindir", System.getProperty("javasvn.admindir", defaultAdminDir)); if (ourAdminDirectoryName == null || "".equals(ourAdminDirectoryName.trim())) { ourAdminDirectoryName = defaultAdminDir; } } return ourAdminDirectoryName; }
public static File getSystemApplicationDataPath() { if (ourSystemAppDataPath != null) { return ourSystemAppDataPath; } // String jnaAppData = SVNJNAUtil.getApplicationDataPath(true); // if (jnaAppData != null) { // ourSystemAppDataPath = new File(jnaAppData); // return ourSystemAppDataPath; // } String envAppData = getEnvironmentVariable("ALLUSERSPROFILE"); if (envAppData == null) { ourSystemAppDataPath = new File(new File("C:/Documents and Settings/All Users"), "Application Data"); } else { ourSystemAppDataPath = new File(envAppData, "Application Data"); } return ourSystemAppDataPath; }
public static File getApplicationDataPath() { if (ourAppDataPath != null) { return ourAppDataPath; } // String jnaAppData = SVNJNAUtil.getApplicationDataPath(false); // if (jnaAppData != null) { // ourAppDataPath = new File(jnaAppData); // return ourAppDataPath; // } String envAppData = getEnvironmentVariable("APPDATA"); if (envAppData == null) { // no appdata for that user, fallback to system one. ourAppDataPath = getSystemApplicationDataPath(); } else { ourAppDataPath = new File(envAppData); } return ourAppDataPath; }
public static File getSystemApplicationDataPath() { if (ourSystemAppDataPath != null) { return ourSystemAppDataPath; } String jnaAppData = SVNJNAUtil.getApplicationDataPath(true); if (jnaAppData != null) { ourSystemAppDataPath = new File(jnaAppData); return ourSystemAppDataPath; } String envAppData = getEnvironmentVariable("ALLUSERSPROFILE"); if (envAppData == null) { ourSystemAppDataPath = new File(new File("C:/Documents and Settings/All Users"), "Application Data"); } else { ourSystemAppDataPath = new File(envAppData, "Application Data"); } return ourSystemAppDataPath; }
public static File getSystemApplicationDataPath() { if (ourSystemAppDataPath != null) { return ourSystemAppDataPath; } String jnaAppData = SVNJNAUtil.getApplicationDataPath(true); if (jnaAppData != null) { ourSystemAppDataPath = new File(jnaAppData); return ourSystemAppDataPath; } String envAppData = getEnvironmentVariable("ALLUSERSPROFILE"); if (envAppData == null) { ourSystemAppDataPath = new File(new File("C:/Documents and Settings/All Users"), "Application Data"); } else { ourSystemAppDataPath = new File(envAppData, "Application Data"); } return ourSystemAppDataPath; }
private static String expandTunnelSpec(String name, String tunnelSpec) throws SVNException { if (tunnelSpec == null || tunnelSpec.trim().length() == 0) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.EXTERNAL_PROGRAM, "No tunnel spec foound for ''{0}''", name); SVNErrorManager.error(err); } tunnelSpec = tunnelSpec.trim(); int spaceIndex = tunnelSpec.indexOf(' '); String firstSegment = spaceIndex > 0 ? tunnelSpec.substring(0, spaceIndex) : tunnelSpec; String lastSegment = spaceIndex > 0 ? tunnelSpec.substring(spaceIndex).trim() : tunnelSpec; if (firstSegment.charAt(0) == '%' && firstSegment.charAt(firstSegment.length() - 1) == '%') { firstSegment = firstSegment.substring(1); firstSegment = firstSegment.substring(0, firstSegment.length() - 1); firstSegment = SVNFileUtil.getEnvironmentVariable(firstSegment); } else if (firstSegment.charAt(0) == '$') { firstSegment = firstSegment.substring(1); firstSegment = SVNFileUtil.getEnvironmentVariable(firstSegment); } else { firstSegment = null; lastSegment = null; } if (firstSegment != null) { // was expanded. tunnelSpec = firstSegment; } else if (lastSegment != null) { // was expanded with no result. tunnelSpec = lastSegment; } return tunnelSpec; }
public static File getApplicationDataPath() { if (ourAppDataPath != null) { return ourAppDataPath; } String jnaAppData = SVNJNAUtil.getApplicationDataPath(false); if (jnaAppData != null) { ourAppDataPath = new File(jnaAppData); return ourAppDataPath; } String envAppData = getEnvironmentVariable("APPDATA"); if (envAppData == null) { // no appdata for that user, fallback to system one. ourAppDataPath = getSystemApplicationDataPath(); } else { ourAppDataPath = new File(envAppData); } return ourAppDataPath; }
private Logger getLogger(SVNLogType logType) { Logger logger = (Logger) myLoggers.get(logType); if (logger == null) { logger = Logger.getLogger(logType.getName()); String testName = SVNFileUtil.getEnvironmentVariable("SVN_CURRENT_TEST"); if (testName != null) { if (myTestHandler == null) { try { myTestHandler = createTestLogger(testName); } catch (IOException e) {} } if (myTestHandler != null) { Handler[] existingHandlers = logger.getHandlers(); for (int i = 0; i < existingHandlers.length; i++) { logger.removeHandler(existingHandlers[i]); } logger.addHandler(myTestHandler); } } myLoggers.put(logType, logger); } return logger; }
firstSegment = firstSegment.substring(1); firstSegment = firstSegment.substring(0, firstSegment.length() - 1); firstSegment = SVNFileUtil.getEnvironmentVariable(firstSegment); } else if (firstSegment.charAt(0) == '$') { firstSegment = firstSegment.substring(1); firstSegment = SVNFileUtil.getEnvironmentVariable(firstSegment); } else { firstSegment = null;
firstSegment = firstSegment.substring(1); firstSegment = firstSegment.substring(0, firstSegment.length() - 1); firstSegment = SVNFileUtil.getEnvironmentVariable(firstSegment); } else if (firstSegment.charAt(0) == '$') { firstSegment = firstSegment.substring(1); firstSegment = SVNFileUtil.getEnvironmentVariable(firstSegment); } else { firstSegment = null;
private static String[] expandTunnelSpec(String name, String tunnelSpec) throws SVNException { if (tunnelSpec == null || tunnelSpec.trim().length() == 0) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.EXTERNAL_PROGRAM, "No tunnel spec foound for ''{0}''", name); SVNErrorManager.error(err, SVNLogType.NETWORK); } tunnelSpec = tunnelSpec.trim(); int spaceIndex = tunnelSpec.indexOf(' '); String firstSegment = spaceIndex > 0 ? tunnelSpec.substring(0, spaceIndex) : tunnelSpec; String lastSegment = spaceIndex > 0 ? tunnelSpec.substring(spaceIndex).trim() : tunnelSpec; if (firstSegment.charAt(0) == '%' && firstSegment.charAt(firstSegment.length() - 1) == '%') { firstSegment = firstSegment.substring(1); firstSegment = firstSegment.substring(0, firstSegment.length() - 1); firstSegment = SVNFileUtil.getEnvironmentVariable(firstSegment); } else if (firstSegment.charAt(0) == '$') { firstSegment = firstSegment.substring(1); firstSegment = SVNFileUtil.getEnvironmentVariable(firstSegment); } else { firstSegment = null; lastSegment = null; } if (firstSegment != null) { // was expanded. tunnelSpec = firstSegment; } else if (lastSegment != null) { // was expanded with no result. tunnelSpec = lastSegment; } return tunnelSpec.split("\\s"); }
private Logger getLogger(SVNLogType logType) { Logger logger = (Logger) myLoggers.get(logType); if (logger == null) { logger = Logger.getLogger(logType.getName()); String testName = SVNFileUtil.getEnvironmentVariable("SVN_CURRENT_TEST"); if (testName != null) { if (myTestHandler == null) { try { myTestHandler = createTestLogger(testName); } catch (IOException e) {} } if (myTestHandler != null) { Handler[] existingHandlers = logger.getHandlers(); for (int i = 0; i < existingHandlers.length; i++) { logger.removeHandler(existingHandlers[i]); } logger.addHandler(myTestHandler); } } myLoggers.put(logType, logger); } return logger; }
public static File getApplicationDataPath() { if (ourAppDataPath != null) { return ourAppDataPath; } String jnaAppData = SVNJNAUtil.getApplicationDataPath(false); if (jnaAppData != null) { ourAppDataPath = new File(jnaAppData); return ourAppDataPath; } String envAppData = getEnvironmentVariable("APPDATA"); if (envAppData == null) { // no appdata for that user, fallback to system one. ourAppDataPath = getSystemApplicationDataPath(); } else { ourAppDataPath = new File(envAppData); } return ourAppDataPath; }
String command = testEnvironment[0]; if (command == null) { command = SVNFileUtil.getEnvironmentVariable("SVN_EDITOR"); if (command == null) { command = env.getOptions().getEditor(); command = SVNFileUtil.getEnvironmentVariable("VISUAL"); command = SVNFileUtil.getEnvironmentVariable("EDITOR");
String command = testEnvironment[0]; if (command == null) { command = SVNFileUtil.getEnvironmentVariable("SVN_EDITOR"); if (command == null) { command = env.getOptions().getEditor(); command = SVNFileUtil.getEnvironmentVariable("VISUAL"); command = SVNFileUtil.getEnvironmentVariable("EDITOR");
String mergeToolCommand = testEnvironment[1]; if (testEnvironment[1] == null) { mergeToolCommand = SVNFileUtil.getEnvironmentVariable("SVN_MERGE"); if (mergeToolCommand == null) { mergeToolCommand = env.getOptions().getMergeTool();