public class VcsPluginUtil
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
VcsPluginUtil.IncludeRuleHandler |
| Constructor and Description |
|---|
VcsPluginUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
buildPatch(VcsRoot root,
java.lang.String fromVersion,
java.lang.String toVersion,
PatchBuilder builder,
CheckoutRules checkoutRules,
BuildPatchByIncludeRules patcher)
Service method, allows to build patch for each root include rule in the specified checkout rules
|
static java.util.List<ModificationData> |
collectBuildChanges(VcsRoot root,
java.lang.String fromVersion,
java.lang.String toVersion,
CheckoutRules commonRule,
CollectChangesByIncludeRules collector)
Util method, can be used with CollectChangesByIncludeRules to collect all changes for a set of CheckoutRules
|
static java.util.List<ModificationData> |
collectBuildChanges(VcsRoot root,
java.lang.String fromVersion,
java.lang.String toVersion,
CheckoutRules commonRule,
CollectSingleStateChangesByIncludeRules collector)
Util method, can be used with CollectSingleStateChangesByIncludeRules to collect all changes for a set of CheckoutRules
|
static java.lang.String |
getRepositoryVersion(VcsRepositoryState state)
Service method, which allows to obtain String representation of VcsRepositoryState for VCSs, having only one branch
|
static void |
processIncludeRules(CheckoutRules rules,
VcsPluginUtil.IncludeRuleHandler processor)
Process each include rule from checkout rules.
|
static ModificationData |
processRelativePaths(ModificationData change,
IncludeRule includeRule) |
static java.lang.String |
removeFromAddTo(java.lang.String path,
IncludeRule includeRule)
In path, replaces includeRule.getFrom with includeRule.getTo
|
static boolean |
shouldDebugVcsCallsFor(java.lang.String fullPath)
This is an auxiliary method which allows to check for deep debugging of VCS calls.
|
public static java.util.List<ModificationData> collectBuildChanges(@NotNull VcsRoot root, @NotNull java.lang.String fromVersion, @Nullable java.lang.String toVersion, @NotNull CheckoutRules commonRule, @NotNull CollectChangesByIncludeRules collector) throws VcsException
root - vcs root to collect changes forfromVersion - version to collect changes from (excluding this version)toVersion - version to collect changes to (including this version)commonRule - checkout rule to collect changes forcollector - interface which collects changes for include rulesVcsIncludeRulesException - rethrows exception, thrown by CollectChangesByIncludeRules implementation object,
and contains failing IncludeRules from passed CheckoutRules objectVcsExceptionpublic static java.util.List<ModificationData> collectBuildChanges(@NotNull VcsRoot root, @NotNull java.lang.String fromVersion, @Nullable java.lang.String toVersion, @NotNull CheckoutRules commonRule, @NotNull CollectSingleStateChangesByIncludeRules collector) throws VcsException
root - vcs root to collect changes forfromVersion - version to collect changes from (excluding this version)toVersion - version to collect changes to (including this version)commonRule - checkout rule to collect changes forcollector - interface which collects changes for include rulesVcsIncludeRulesException - rethrows exception, thrown by CollectSingleStateChangesByIncludeRules implementation object,
and contains failing IncludeRules from passed CheckoutRules objectVcsExceptionpublic static void processIncludeRules(CheckoutRules rules, VcsPluginUtil.IncludeRuleHandler processor) throws VcsIncludeRulesException
VcsIncludeRulesException - combined exception with errors for each failing include rule@NotNull public static ModificationData processRelativePaths(@NotNull ModificationData change, @NotNull IncludeRule includeRule)
@Nullable
public static java.lang.String removeFromAddTo(@NotNull
java.lang.String path,
@NotNull
IncludeRule includeRule)
path - path for replacementincludeRule - include rulepublic static void buildPatch(@NotNull
VcsRoot root,
@Nullable
java.lang.String fromVersion,
@NotNull
java.lang.String toVersion,
@NotNull
PatchBuilder builder,
@NotNull
CheckoutRules checkoutRules,
@NotNull
BuildPatchByIncludeRules patcher)
throws java.io.IOException,
VcsException
root - vcs root to build patch forfromVersion - version to build patch fromtoVersion - version to build patch tobuilder - patch buildercheckoutRules - rules to build patch for (rules how to map repository file names to working ones)patcher - implementation, builds patch for one specified include rulejava.io.IOException - exception occurred while sending patch to patch builderVcsException - exception occurred while getting patch from version control@NotNull
public static java.lang.String getRepositoryVersion(@NotNull
VcsRepositoryState state)
state - repository state to convertjava.lang.IllegalArgumentException - if provided state either contains information for multiple branches or is emptypublic static boolean shouldDebugVcsCallsFor(@NotNull
java.lang.String fullPath)
VcsPersonalSupport to get suitable configurations.fullPath - path to be considered