예제 #1
0
 protected void CreateEnlistment(string commitish = null)
 {
     this.Enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(GVFSTestConfig.PathToGVFS, commitish: commitish);
     GitProcess.Invoke(this.Enlistment.RepoRoot, "config advice.statusUoption false");
     this.ControlGitRepo = ControlGitRepo.Create(commitish);
     this.ControlGitRepo.Initialize();
 }
예제 #2
0
 private void SetupFolderDeleteTest()
 {
     ControlGitRepo.Fetch("FunctionalTests/20170202_RenameTestMergeTarget");
     this.ValidateGitCommand("checkout FunctionalTests/20170202_RenameTestMergeTarget");
     this.DeleteFile("Test_EPF_GitCommandsTestOnlyFileFolder", "file.txt");
     this.ValidateGitCommand("add .");
     this.RunGitCommand("commit -m\"Delete only file.\"");
 }
예제 #3
0
 private void ValidateGitCommand(ControlGitRepo controlGitRepo, string command, params object[] args)
 {
     GitHelpers.ValidateGitCommand(
         this.Enlistment,
         controlGitRepo,
         command,
         args);
 }
예제 #4
0
 public void VerifyResetHardDeletesEmptyFolders()
 {
     ControlGitRepo.Fetch("FunctionalTests/20170202_RenameTestMergeTarget");
     this.ValidateGitCommand("checkout FunctionalTests/20170202_RenameTestMergeTarget");
     this.ValidateGitCommand("reset --hard HEAD~1");
     this.ShouldNotExistOnDisk("Test_EPF_GitCommandsTestOnlyFileFolder");
     this.Enlistment.RepoRoot.ShouldBeADirectory(this.FileSystem)
     .WithDeepStructure(this.FileSystem, this.ControlGitRepo.RootPath);
 }
예제 #5
0
        public override void CreateEnlistment()
        {
            base.CreateEnlistment();
            GitProcess.Invoke(this.Enlistment.RepoRoot, "config advice.statusUoption false");
            GitProcess.Invoke(this.Enlistment.RepoRoot, "config core.abbrev 12");

            this.ControlGitRepo = ControlGitRepo.Create();
            this.ControlGitRepo.Initialize();
        }
예제 #6
0
        protected virtual void CreateEnlistment()
        {
            string pathToGvfs = Path.Combine(TestContext.CurrentContext.TestDirectory, Properties.Settings.Default.PathToGVFS);

            this.Enlistment = GVFSFunctionalTestEnlistment.CloneAndMount(pathToGvfs);
            GitProcess.Invoke(this.Enlistment.RepoRoot, "config advice.statusUoption false");
            this.ControlGitRepo = ControlGitRepo.Create();
            this.ControlGitRepo.Initialize();
        }
예제 #7
0
        public void RenameOnlyFileInFolder()
        {
            ControlGitRepo.Fetch("FunctionalTests/20170202_RenameTestMergeTarget");
            ControlGitRepo.Fetch("FunctionalTests/20170202_RenameTestMergeSource");

            this.ValidateGitCommand("checkout FunctionalTests/20170202_RenameTestMergeTarget");
            this.FileSystem.ReadAllText(this.Enlistment.GetVirtualPathTo("Test_EPF_GitCommandsTestOnlyFileFolder\\file.txt"));
            this.ValidateGitCommand("merge origin/FunctionalTests/20170202_RenameTestMergeSource");
        }
예제 #8
0
 protected void CreateEnlistment(string commitish = null)
 {
     this.Enlistment = ScalarFunctionalTestEnlistment.Clone(
         ScalarTestConfig.PathToScalar,
         commitish: commitish,
         fullClone: this.validateWorkingTree != Settings.ValidateWorkingTreeMode.SparseMode);
     GitProcess.Invoke(this.Enlistment.RepoRoot, "config advice.statusUoption false");
     this.ControlGitRepo = ControlGitRepo.Create(commitish);
     this.ControlGitRepo.Initialize();
 }
예제 #9
0
        public void RebaseSmallOneFileConflict()
        {
            // 5d299512450f4029d7a1fe8d67e833b84247d393 is the tip of FunctionalTests/RebaseTestsSource_20170130
            string sourceCommit = "5d299512450f4029d7a1fe8d67e833b84247d393";

            // Target commit 99fc72275f950b0052c8548bbcf83a851f2b4467 is part of the history of
            // FunctionalTests/20170130
            string targetCommit = "99fc72275f950b0052c8548bbcf83a851f2b4467";

            ControlGitRepo controlGitRepo = ControlGitRepo.Create();

            controlGitRepo.Initialize();
            controlGitRepo.Fetch(sourceCommit);
            controlGitRepo.Fetch(targetCommit);

            this.ValidateGitCommand(controlGitRepo, "checkout {0}", sourceCommit);
            this.ValidateGitCommand(controlGitRepo, "rebase {0}", targetCommit);
        }
예제 #10
0
        public void RebaseSmallNoConflicts()
        {
            // 5d299512450f4029d7a1fe8d67e833b84247d393 is the tip of FunctionalTests/RebaseTestsSource_20170130
            string sourceCommit = "5d299512450f4029d7a1fe8d67e833b84247d393";

            // Target commit 47fabb534c35af40156db6e8365165cb04f9dd75 is part of the history of
            // FunctionalTests/20170130
            string targetCommit = "47fabb534c35af40156db6e8365165cb04f9dd75";

            ControlGitRepo controlGitRepo = ControlGitRepo.Create();

            controlGitRepo.Initialize();
            controlGitRepo.Fetch(sourceCommit);
            controlGitRepo.Fetch(targetCommit);

            this.ValidateGitCommand(controlGitRepo, "checkout {0}", sourceCommit);
            this.ValidateGitCommand(controlGitRepo, "rebase {0}", targetCommit);
        }