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);
        }
Пример #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);
        }
Пример #3
0
        public void AddRepositoryToDataBase(ISessionFactory sessionFactory)
        {
            Repository repository = GetRepository();

            FillDataBase(sessionFactory, repository);
        }