コード例 #1
0
        public void GenerateSpecificVersion(RepositoryUrl repositoryUrl, string commit)
        {
            var pathResolver = new PathResolver(repositoryUrl.Url, commit);

            var repositoryFolder = pathResolver.GetRepositoryPath();
            var repository = new Repository(repositoryFolder + "/.git");
            repository.Checkout(commit);

            var commitFolder = pathResolver.GetVersionPath();
            Directory.CreateDirectory(commitFolder);

            DirectoryCopy(repositoryFolder, commitFolder, true);

            repository.Checkout(repository.Branches["master"]);
        }
コード例 #2
0
ファイル: Solution.cs プロジェクト: pauloortins/CodeBlamer
        public Solution(RepositoryUrl repositoryUrl, string commit)
        {
            _repositoryUrl = repositoryUrl;
            _commit = commit;
            _pathResolver = new PathResolver(repositoryUrl.Url, commit);

            _metricServices = new List<MetricService>()
                {
                    new PowerMetricsService(_pathResolver)
                };

            var solutionFiles = GetVersionPath().SearchFor("*.sln");
            SolutionPath = solutionFiles[0].FullName;
            Projects = GetProjects();
        }
コード例 #3
0
 public PowerMetricsService(PathResolver pathResolver)
     : base(pathResolver)
 {
 }
コード例 #4
0
 private IQueryable<Commit> GetCommits(RepositoryUrl repositoryUrl)
 {
     var pathResolver = new PathResolver(repositoryUrl.Url);
     var repository = new Repository(pathResolver.GetRepositoryPath());
     return repository.Commits.OrderByDescending(x => x.Author.When.UtcDateTime).AsQueryable();
 }
コード例 #5
0
 private void CloneProject(RepositoryUrl repositoryUrl)
 {
     var pathResolver = new PathResolver(repositoryUrl.Url);
     Repository.Clone(repositoryUrl.Url, pathResolver.GetRepositoryPath());
 }
コード例 #6
0
 protected MetricService(PathResolver pathResolver)
 {
     PathResolver = pathResolver;
 }
コード例 #7
0
 public FxCopService(PathResolver pathResolver)
     : base(pathResolver)
 {
 }
コード例 #8
0
 public StyleCopService(PathResolver pathResolver)
     : base(pathResolver)
 {
 }