コード例 #1
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.\"");
 }
コード例 #2
0
ファイル: ResetHardTests.cs プロジェクト: secti6n/VFSForGit
 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);
 }
コード例 #3
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);
        }
コード例 #4
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");
        }
コード例 #5
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);
        }