changeset 416:9a467ce09cbd

Fix repository properties calculation VcsRoot can contain properties unknown to plugin, so instead of deleting unnecessary properties just fill the important ones.
author Dmitry Neverov <dmitry.neverov@jetbrains.com>
date Tue, 17 Apr 2012 12:11:28 +0400
parents b5577526dc57
children 74487e2c6356
files mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java	Fri Mar 30 15:30:48 2012 +0400
+++ b/mercurial-server/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialVcsSupport.java	Tue Apr 17 12:11:28 2012 +0400
@@ -781,13 +781,9 @@
   @NotNull
   @Override
   public Map<String, String> getVcsRepositoryProperties(@NotNull VcsRoot root) {
-    Map<String, String> properties = new HashMap<String, String>(root.getProperties());
-    properties.remove(Constants.BRANCH_NAME_PROP);
-    properties.remove(Constants.HG_COMMAND_PATH_PROP);
-    properties.remove(Constants.USERNAME);
-    properties.remove(Constants.PASSWORD);
-    properties.remove(Constants.UNCOMPRESSED_TRANSFER);
-    properties.remove(Constants.USER_FOR_TAG);
-    return properties;
+    Map<String, String> rootProperties = root.getProperties();
+    Map<String, String> repositoryProperties = new HashMap<String, String>();
+    repositoryProperties.put(Constants.REPOSITORY_PROP, rootProperties.get(Constants.REPOSITORY_PROP));
+    return repositoryProperties;
   }
 }