jetbrains.buildServer.vcs
Class VcsSupportUtil

java.lang.Object
  extended by jetbrains.buildServer.vcs.VcsSupportUtil

public class VcsSupportUtil
extends java.lang.Object

Set of useful methods which can be used in the implementation of VcsSupport


Nested Class Summary
static class VcsSupportUtil.DateVersionComparator
          Default implementation to compare date-based versions
static class VcsSupportUtil.IntVersionComparator
          Default implementation to compare integer versions
static class VcsSupportUtil.StringVersionComparator
          Default implementation to compare string versions
 
Method Summary
static void buildPatch(jetbrains.buildServer.vcs.VcsRoot root, java.lang.String fromVersion, java.lang.String toVersion, PatchBuilder builder, jetbrains.buildServer.vcs.CheckoutRules checkoutRules, BuildPatchByIncludeRule patcher)
          Service method, allows to build patch for each root include rule in the specified checkout rules
static java.util.List<jetbrains.buildServer.vcs.ModificationData> collectBuildChanges(jetbrains.buildServer.vcs.VcsRoot root, java.lang.String fromVersion, java.lang.String toVersion, jetbrains.buildServer.vcs.CheckoutRules commonRule, CollectChangesByIncludeRule collecter)
          Util method, can be used if it is easier for VcsSupport collection build changes for each include rule separately.
static void exportFilesFromDisk(PatchBuilder builder, java.io.File file)
          Exports whole directory content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

collectBuildChanges

public static java.util.List<jetbrains.buildServer.vcs.ModificationData> collectBuildChanges(jetbrains.buildServer.vcs.VcsRoot root,
                                                                                             java.lang.String fromVersion,
                                                                                             java.lang.String toVersion,
                                                                                             jetbrains.buildServer.vcs.CheckoutRules commonRule,
                                                                                             CollectChangesByIncludeRule collecter)
                                                                                      throws jetbrains.buildServer.vcs.VcsException
Util method, can be used if it is easier for VcsSupport collection build changes for each include rule separately.

Parameters:
root - vcs root to collect changes for
fromVersion - version to collect changes from (excluding this version)
toVersion - version to collect changes to (including this version)
commonRule - checkout rule to collect changes for
collecter - interface which collects changes for one include rule
Returns:
collected changes
Throws:
VcsException - rethrows exception, thrown by CollectChangesByIncludeRule.collectBuildChanges(VcsRoot, String, String, IncludeRule) implementation object

buildPatch

public static void buildPatch(jetbrains.buildServer.vcs.VcsRoot root,
                              java.lang.String fromVersion,
                              java.lang.String toVersion,
                              PatchBuilder builder,
                              jetbrains.buildServer.vcs.CheckoutRules checkoutRules,
                              BuildPatchByIncludeRule patcher)
                       throws java.io.IOException,
                              jetbrains.buildServer.vcs.VcsException
Service method, allows to build patch for each root include rule in the specified checkout rules

Parameters:
root - vcs root to build patch for
fromVersion - version to build patch from
toVersion - version to build patch to
builder - patch builder
checkoutRules - rules to build patch for (rules how to map repository file names to working ones)
patcher - implementation, builds patch for one specified include rule
Throws:
java.io.IOException - exception occurred while sending patch to patch builder
VcsException - exception occurred while getting patch from verison control

exportFilesFromDisk

public static void exportFilesFromDisk(PatchBuilder builder,
                                       java.io.File file)
                                throws java.io.IOException
Exports whole directory content

Parameters:
builder - patch builder.
file - root directory.
Throws:
java.io.IOException - listing or reading file problem occurred.