view mercurial-server-tc/src/jetbrains/buildServer/buildTriggers/vcs/mercurial/MercurialSubrepoUsageStatistics.java @ 965:d0a236443fc9

Merge branch Indore-2017.1.x
author Dmitry Neverov <dmitry.neverov@gmail.com>
date Mon, 15 May 2017 18:19:44 +0200
parents f0327df85b9d
children 7bf4d943d5bb
line wrap: on
line source

/*
 * Copyright 2000-2014 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package jetbrains.buildServer.buildTriggers.vcs.mercurial;

import jetbrains.buildServer.usageStatistics.impl.providers.BaseVCSFeatureUsageStatisticsProvider;
import jetbrains.buildServer.vcs.SVcsRoot;
import jetbrains.buildServer.vcs.VcsManager;
import org.jetbrains.annotations.NotNull;

public class MercurialSubrepoUsageStatistics extends BaseVCSFeatureUsageStatisticsProvider {

  public MercurialSubrepoUsageStatistics(@NotNull VcsManager vcsManager) {
    super(vcsManager);
  }

  @NotNull
  @Override
  protected String getFeatureName() {
    return "subRepoSupport-mercurial";
  }

  @NotNull
  @Override
  protected String getFeatureDisplayName() {
    return "Mercurial VCS roots with subrepo support enabled";
  }

  @Override
  protected boolean hasFeature(@NotNull SVcsRoot root) {
    return Boolean.parseBoolean(root.getProperty(Constants.DETECT_SUBREPO_CHANGES));
  }
}