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.\""); }
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); }
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); }
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"); }
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); }