コード例 #1
0
ファイル: GitRepository.cs プロジェクト: sillsdev/chack
 public static GitRepository CreateNewByCloning(GitRepository sourceRepo, string parentDirOfNewRepository, string newPersonName)
 {
     string repositoryPath = Path.Combine(parentDirOfNewRepository, newPersonName );
     using (new ConsoleProgress("Creating {0} from {1}", newPersonName, sourceRepo.UserName))
     {
         Execute("clone", null, sourceRepo.PathWithQuotes + " " + SurroundWithQuotes(repositoryPath));
         SetupPerson(repositoryPath, newPersonName);
         GitRepository repository = new GitRepository(repositoryPath, newPersonName);
         repository.AddFake();
         return repository;
     }
 }
コード例 #2
0
ファイル: GitRepository.cs プロジェクト: sillsdev/chack
        public static GitRepository CreateNewDirectoryAndRepository(string parentDirOfNewRepository, string userName)
        {
            //   string repositoryPath = MakeDirectoryForUser(parentDirOfNewRepository, userName);
            string repositoryPath = Path.Combine(parentDirOfNewRepository, userName);

            using (new ConsoleProgress("Creating {0} from scratch", userName))
            {
                Execute("init", null, SurroundWithQuotes(repositoryPath));
                SetupPerson(repositoryPath, userName);

                GitRepository repo = new GitRepository(repositoryPath, userName);
                repo.AddFake();
                return repo;
            }
        }
コード例 #3
0
ファイル: GitRepository.cs プロジェクト: sillsdev/chack
 protected void PullFromRepository(GitRepository otherRepository)
 {
     using (new ConsoleProgress("{0} pulling from {1}", _userName,otherRepository.UserName))
     {
         Execute("pull", _pathToRepository, otherRepository.PathWithQuotes);
     }
 }