jetbrains.buildServer.vcs
Interface IncludeRulePatchBuilder


public interface IncludeRulePatchBuilder

Handles patch building portions corresponding to Include Rules. For each include rule a single call is made. This object could contain common data that should be shared between all calls (e.g. connection, caches, etc.).

Since:
4.5
See Also:
BuildPatchByIncludeRules

Method Summary
 void buildPatch(PatchBuilder builder, IncludeRule includeRule)
          Performs a portion of the patch building work corresponding to the given include rule.
 void dispose()
          Called after the last include rule is processed by buildPatch(jetbrains.buildServer.vcs.patches.PatchBuilder, IncludeRule).
 

Method Detail

buildPatch

void buildPatch(@NotNull
                PatchBuilder builder,
                @NotNull
                IncludeRule includeRule)
                throws java.io.IOException,
                       VcsException
Performs a portion of the patch building work corresponding to the given include rule.

Parameters:
builder - use this object to construct patch in terms of file operations. Note, that all paths passed to the builder should be relative to the include rule's path.
includeRule - include rule specifies VCS relative path to get sources. Implementation have to use only FileRule.getFrom() to get relative VCS path suffix to checkout.
Throws:
java.io.IOException - if an IO problem occurs
VcsException - if a VCS problem occures
IncrementalPatchImpossibleException - if this exception is thrown during building an incremental patch (fromVersion is not null) BuildPatchByIncludeRules.getPatchBuilder(VcsRoot, String, String) will be called again with fromVersion set to null, i.e. full checkout patch will be requested. This is useful for the situation when the uderlying VCS repository has forgotten the fromVersion for some reason and therefore VCS support is unable to extract the differences.

dispose

void dispose()
             throws VcsException
Called after the last include rule is processed by buildPatch(jetbrains.buildServer.vcs.patches.PatchBuilder, IncludeRule). An implementation can clean resources (close connections, etc.) obtained during patch builder construction.

Throws:
VcsException - if an error occurred during disposing the instance