Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Plugins 在TeamCity VCS插件中实现功能分支_Plugins_Version Control_Teamcity_Plasticscm_Feature Branch - Fatal编程技术网

Plugins 在TeamCity VCS插件中实现功能分支

Plugins 在TeamCity VCS插件中实现功能分支,plugins,version-control,teamcity,plasticscm,feature-branch,Plugins,Version Control,Teamcity,Plasticscm,Feature Branch,我目前正在塑料SCM VCS插件中添加对功能分支的支持。我认为我已经准备好了一切(显然我错了),但TeamCity检测到所有新变更集都属于所有分支。这使得插件无法使用,因为默认分支中的新提交将触发所有活动分支中的构建 我有一个plasticsvcsupport类扩展servervcsupport。这是plasticvcsupport.getCollectChangesPolicy()方法: @NotNull public CollectChangesPolicy getCollectChange

我目前正在塑料SCM VCS插件中添加对功能分支的支持。我认为我已经准备好了一切(显然我错了),但TeamCity检测到所有新变更集都属于所有分支。这使得插件无法使用,因为默认分支中的新提交将触发所有活动分支中的构建

我有一个
plasticsvcsupport
类扩展
servervcsupport
。这是
plasticvcsupport.getCollectChangesPolicy()
方法:

@NotNull
public CollectChangesPolicy getCollectChangesPolicy() {
    return new PlasticCollectChangesPolicy(this, currentSettings, settingsLock);
}
这是对
PlasticCollectChangesPolicy
类的概述:公共类PlasticCollectChangesPolicy在存储库之间实现CollectChanges{

    @NotNull
    public RepositoryStateData getCurrentState(VcsRoot root) throws VcsException {
        /* ... */
        BranchInfo[] branches = QueryCommands.GetBranches(wi);

        return RepositoryStateData.createVersionState(
                mSettings.getSelectorBranch(), getBranchHeads(branches));
        /* ... */
    }

    @NotNull
    public List<ModificationData> collectChanges(
            @NotNull VcsRoot fromRoot,
            @NotNull RepositoryStateData fromState,
            @NotNull VcsRoot toRoot,
            @NotNull RepositoryStateData toState,
            @NotNull CheckoutRules checkoutRules) throws VcsException {
        return collectChanges(fromRoot, fromState, toState, checkoutRules);
    }

    public List<ModificationData> collectChanges(
            @NotNull VcsRoot vcsRoot,
            @NotNull RepositoryStateData fromState,
            @NotNull RepositoryStateData toState,
            @NotNull CheckoutRules checkoutRules) throws VcsException {
        /* ... */

        for (String branch : fromState.getBranchRevisions().keySet()){
            result.addAll(getDifferencesBetweenVersions(
                    vcsRoot,
                    wkInfo,
                    branch,
                    fromState.getBranchRevisions().get(branch),
                    toState.getBranchRevisions().get(branch)));
        }
        /* ... */

        return result;
    }
}
任何形式的帮助都将不胜感激:-)


谢谢!

请确保包括覆盖:

public boolean isDAGBasedVcs() {return true;}

是的!就是这样!我完全忽略了那个方法:-(谢谢!
public boolean isDAGBasedVcs() {return true;}