Beispiel #1
0
 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;
     }
 }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
        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);
            }
        }
Beispiel #4
0
        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;
            }
        }