diff mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java @ 67:e6971dc6b17c

always use url with credentials if username/password are specified
author Pavel.Sher
date Thu, 23 Jul 2009 11:42:23 +0400
parents b328c6b6526d
children 4c15e7de1f9d
line wrap: on
line diff
--- a/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java	Thu Jul 09 21:23:09 2009 +0400
+++ b/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java	Thu Jul 23 11:42:23 2009 +0400
@@ -239,7 +239,7 @@
     StringBuilder res = new StringBuilder();
     res.append(quoteIfNeeded(settings.getHgCommandPath()));
     res.append(" identify ");
-    res.append(quoteIfNeeded(settings.getRepository()));
+    res.append(quoteIfNeeded(settings.getRepositoryUrl()));
     res.append('\n').append(id.execute());
     return res.toString();
   }
@@ -339,7 +339,7 @@
     throws IOException, VcsException {
     CloneCommand cl = new CloneCommand(settings);
     // clone from the local repository
-    cl.setRepositoryPath(settings.getLocalRepositoryDir().getAbsolutePath());
+    cl.setRepository(settings.getLocalRepositoryDir().getAbsolutePath());
     cl.setToId(toVer.getId());
     cl.setUpdateWorkingDir(false);
     File tempDir = FileUtil.createTempDirectory("mercurial", toVer.getId());
@@ -522,7 +522,7 @@
       createClonedRepositoryParentDir(parentDir);
 
       // take last part of repository path
-      String repPath = settings.getRepository();
+      String repPath = settings.getRepositoryUrl();
       String[] splitted = repPath.split("[/\\\\]");
       if (splitted.length > 0) {
         repPath = splitted[splitted.length-1];