Search in sources :

Example 21 with SubmoduleSubscription

use of com.google.gerrit.reviewdb.client.SubmoduleSubscription in project gerrit by GerritCodeReview.

the class GitModules method subscribedTo.

public Collection<SubmoduleSubscription> subscribedTo(Branch.NameKey src) {
    logDebug("Checking for a subscription of " + src);
    Collection<SubmoduleSubscription> ret = new ArrayList<>();
    for (SubmoduleSubscription s : subscriptions) {
        if (s.getSubmodule().equals(src)) {
            logDebug("Found " + s);
            ret.add(s);
        }
    }
    return ret;
}
Also used : ArrayList(java.util.ArrayList) SubmoduleSubscription(com.google.gerrit.reviewdb.client.SubmoduleSubscription)

Aggregations

SubmoduleSubscription (com.google.gerrit.reviewdb.client.SubmoduleSubscription)21 Branch (com.google.gerrit.reviewdb.client.Branch)18 Project (com.google.gerrit.reviewdb.client.Project)17 AbstractDaemonTest (com.google.gerrit.acceptance.AbstractDaemonTest)14 SubmoduleSectionParser (com.google.gerrit.server.util.SubmoduleSectionParser)14 Config (org.eclipse.jgit.lib.Config)14 Test (org.junit.Test)14 OpenRepo (com.google.gerrit.server.git.MergeOpRepoManager.OpenRepo)3 NoSuchProjectException (com.google.gerrit.server.project.NoSuchProjectException)3 IOException (java.io.IOException)3 ObjectId (org.eclipse.jgit.lib.ObjectId)3 ArrayList (java.util.ArrayList)2 DirCache (org.eclipse.jgit.dircache.DirCache)2 DirCacheEditor (org.eclipse.jgit.dircache.DirCacheEditor)2 CommitBuilder (org.eclipse.jgit.lib.CommitBuilder)2 SubscribeSection (com.google.gerrit.common.data.SubscribeSection)1 GerritPersonIdent (com.google.gerrit.server.GerritPersonIdent)1 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 HashSet (java.util.HashSet)1