diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/config/CvsRootConfiguration.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/config/CvsRootConfiguration.java index 31f44803accc..74267fcf5f3a 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/config/CvsRootConfiguration.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/config/CvsRootConfiguration.java @@ -82,15 +82,19 @@ public class CvsRootConfiguration extends AbstractConfiguration implements CvsEn } private static String createFieldByFieldCvsRoot(CvsRepository cvsRepository) { - return createStringRepresentationOn(CvsMethod.getValue(cvsRepository.getMethod()), cvsRepository.getUser(), cvsRepository.getHost(), String.valueOf(cvsRepository.getPort()), cvsRepository.getRepository()); - } public static String createStringRepresentationOn(CvsMethod method, String user, String host, String port, String repository) { - if (method == CvsMethod.LOCAL_METHOD) return repository; - + if (method == CvsMethod.LOCAL_METHOD) { + final StringBuilder result = new StringBuilder(); + result.append(SEPARATOR); + result.append(method.getName()); + result.append(SEPARATOR); + result.append(repository); + return result.toString(); + } final StringBuilder result = new StringBuilder(); result.append(SEPARATOR); result.append(method.getName()); @@ -143,11 +147,8 @@ public class CvsRootConfiguration extends AbstractConfiguration implements CvsEn public void testConnection(Project project) throws AuthenticationException, IOException { final IConnection connection = createSettings().createConnection(new ReadWriteStatistics()); final ErrorMessagesProcessor errorProcessor = new ErrorMessagesProcessor(); - final CvsExecutionEnvironment cvsExecutionEnvironment = new CvsExecutionEnvironment(errorProcessor, - CvsExecutionEnvironment.DUMMY_STOPPER, - errorProcessor, - PostCvsActivity.DEAF, - project); + final CvsExecutionEnvironment cvsExecutionEnvironment = + new CvsExecutionEnvironment(errorProcessor, CvsExecutionEnvironment.DUMMY_STOPPER, errorProcessor, PostCvsActivity.DEAF, project); final CvsResult result = new CvsResultEx(); try { ProgressManager.getInstance().runProcessWithProgressSynchronously(new Runnable() {