diff mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/VcsRootBuilder.java @ 686:1efd1846f00a

Add an option for using tar archive for building a full patch This is a workaround for the case when java cannot read some file from the repository due to encoding used in a file name.
author Dmitry Neverov <dmitry.neverov@jetbrains.com>
date Tue, 17 Dec 2013 13:38:24 +0100
parents 0b50d7952a7d
children 5ee94ee69b29
line wrap: on
line diff
--- a/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/VcsRootBuilder.java	Tue Dec 10 18:43:13 2013 +0100
+++ b/mercurial-tests/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/VcsRootBuilder.java	Tue Dec 17 13:38:24 2013 +0100
@@ -25,6 +25,8 @@
   private File myCloneRepositoryTo;
   private boolean myDetectSubrepoChanges = false;
   private boolean myTagsAsBranches = false;
+  private boolean myIncludeSubreposInPatch = true;
+  private boolean myUseArchiveForPatch = false;
 
   public static VcsRootBuilder vcsRoot() {
     return new VcsRootBuilder();
@@ -40,6 +42,8 @@
     vcsRoot.addProperty(Constants.USER_FOR_TAG, myUserForTag);
     vcsRoot.addProperty(Constants.UNCOMPRESSED_TRANSFER, String.valueOf(myUncompressed));
     vcsRoot.addProperty(Constants.DETECT_SUBREPO_CHANGES, String.valueOf(myDetectSubrepoChanges));
+    vcsRoot.addProperty(Constants.INCLUDE_SUBREPOS_IN_PATCH, String.valueOf(myIncludeSubreposInPatch));
+    vcsRoot.addProperty(Constants.USE_ARCHIVE_FOR_PATCH, String.valueOf(myUseArchiveForPatch));
     if (myCloneRepositoryTo != null)
       vcsRoot.addProperty(Constants.SERVER_CLONE_PATH_PROP, String.valueOf(myCloneRepositoryTo.getAbsolutePath()));
     vcsRoot.addProperty(Constants.USE_TAGS_AS_BRANCHES, String.valueOf(myTagsAsBranches));
@@ -132,6 +136,18 @@
   }
 
 
+  public VcsRootBuilder withSubreposInPatch(boolean includeSubreposInPatch) {
+    myIncludeSubreposInPatch = includeSubreposInPatch;
+    return this;
+  }
+
+
+  public VcsRootBuilder withArchiveForPatch(boolean useArchiveForPatch) {
+    myUseArchiveForPatch = useArchiveForPatch;
+    return this;
+  }
+
+
   public VcsRootBuilder withTagsEnabled(boolean useTagsAsBranches) {
     myTagsAsBranches = useTagsAsBranches;
     return this;