Ejemplo n.º 1
0
        public Repository GetRepository()
        {
            Repository repository = new Repository()
            {
                Name = GetNameFromPath(DirectoryPath),
                Type = RepositoryType.Svn
            };
            List <Branch> branches = GetBranches(DirectoryPath);

            branches.ForEach(branch => repository.AddBranch(branch));

            return(repository);
        }
Ejemplo n.º 2
0
        public Repository GetRepository()
        {
            Repository repository = new Repository();

            using (GitRepository gitRepositoryInfo = new GitRepository(DirectoryPath))
            {
                List <Branch> branches = GetBranches(DirectoryPath);

                repository.Type = RepositoryType.Git;
                repository.Name = GetNameFromPath(gitRepositoryInfo.Info.Path);
                repository.Url  = DirectoryPath;

                branches.ForEach(branch => repository.AddBranch(branch));
            }
            return(repository);
        }