diff mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/BaseMercurialTestCase.java @ 57:99e757f2527b

branches support
author Pavel.Sher
date Sun, 26 Oct 2008 16:23:50 +0300
parents 1490e2981799
children 5d9c34cb543a
line wrap: on
line diff
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/BaseMercurialTestCase.java	Fri Oct 24 13:38:59 2008 +0400
+++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/BaseMercurialTestCase.java	Sun Oct 26 16:23:50 2008 +0300
@@ -4,6 +4,7 @@
 import jetbrains.buildServer.TempFiles;
 import jetbrains.buildServer.vcs.impl.VcsRootImpl;
 import jetbrains.buildServer.vcs.patches.PatchTestCase;
+import org.jetbrains.annotations.NotNull;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeMethod;
 
@@ -43,6 +44,12 @@
     return vcsRoot;
   }
 
+  protected VcsRootImpl createVcsRoot(@NotNull String branchName) throws IOException {
+    VcsRootImpl vcsRoot = createVcsRoot();
+    vcsRoot.addProperty(Constants.BRANCH_NAME_PROP, branchName);
+    return vcsRoot;
+  }
+
   private String getRepositoryPath() {
     return new File("mercurial-tests/testData/rep1").getAbsolutePath();
   }