コード例 #1
0
        public void RenameDeleteMergeTest2()
        {
            MigrationItemStrings sourceFolder = new MigrationItemStrings(source.Name + "folder/", source.Name + "renamed-folder/", TestEnvironment, true);

            file = new MigrationItemStrings(sourceFolder.Name + "file.txt", sourceFolder.NewName + "file.txt", TestEnvironment, true);
            MigrationItemStrings file2         = new MigrationItemStrings(sourceFolder.Name + "file2.txt", sourceFolder.NewName + "file2.txt", TestEnvironment, true);
            MigrationItemStrings sourceFolder2 = new MigrationItemStrings(source.Name + "folder2/", source.Name + "renamed-folder2/", TestEnvironment, true);

            int changesetId = SourceAdapter.AddFile(file.LocalPath);

            SourceAdapter.AddFile(file2.LocalPath);
            SourceAdapter.AddFolder(sourceFolder2.LocalPath);
            SourceAdapter.BranchItem(source.ServerPath, target.ServerPath);

            PendRenameDelete(sourceFolder, file);
            SourceWorkspace.PendRename(sourceFolder2.LocalPath, sourceFolder2.NewLocalPath);

            CheckinMergeResolve(changesetId);

            if (TestEnvironment.SourceTFSVersion == TFSVersionEnum.TFS2010)
            {
                Run();
                Assert.IsTrue(VerifyContents());
            }
            else
            {
                RunAndValidate();
            }
        }
コード例 #2
0
        public void RenameWithSourceNotMappedTest()
        {
            MigrationItemStrings folder = new MigrationItemStrings("rename-from", "rename-to", TestEnvironment, true);
            MigrationItemStrings file   = new MigrationItemStrings("rename-from/fld/file.txt", "rename-to/fld/file.txt", TestEnvironment, true);

            // Add the child item
            SourceAdapter.AddFile(file.LocalPath);

            MappingPair mapping = new MappingPair(TestEnvironment.FirstSourceServerPath + SrcPathSeparator + "rename-from",
                                                  TestEnvironment.FirstTargetServerPath + TarPathSeparator + "rename-from",
                                                  true); // cloaked

            TestEnvironment.AddMapping(mapping);

            SourceWorkspace.Get(VersionSpec.Latest, GetOptions.Overwrite);
            SourceWorkspace.PendRename(folder.ServerPath, folder.NewServerPath);

            SourceAdapter.EditFile(file.NewLocalPath);

            Run();
            VerifyHistory(3, 0);

            // Resolve "Branch source path not found conflict" using "$/" scope.
            ConflictResolver  conflictManager = new ConflictResolver(Configuration);
            List <RTConflict> conflicts       = conflictManager.GetConflicts();

            Assert.AreEqual(1, conflicts.Count, "There should be only 1 conflict");
            conflictManager.TryResolveConflict(conflicts[0], new VCChangeToAddOnBranchSourceNotMappedAction(), "$/"); // Add on branch source not found

            RunAndValidate(true, true);
        }
コード例 #3
0
        private int AddBranch()
        {
            m_file = new MigrationItemStrings(m_source.Name + "file.txt", m_source.Name + "renamed-file.txt", TestEnvironment, true);

            SourceAdapter.AddFile(m_file.LocalPath);
            return(SourceAdapter.BranchItem(m_source, m_target));
        }
コード例 #4
0
        private void RenameMergeRenameScenario(bool includeEdit)
        {
            // Add a file
            MigrationItemStrings sourceFolder = new MigrationItemStrings(m_source.Name + "folder/", null, TestEnvironment, true);

            m_file = new MigrationItemStrings(sourceFolder.Name + "file1.txt", null, TestEnvironment, true);
            SourceAdapter.AddFile(m_file.LocalPath);

            // Branch the containing folder
            int changesetId = SourceAdapter.BranchItem(m_source, m_target);

            // Rename the file and check it in
            MigrationItemStrings rename1 = new MigrationItemStrings(sourceFolder.Name + "file1.txt", sourceFolder.Name + "file2.txt", TestEnvironment, true);

            SourceWorkspace.PendRename(rename1.LocalPath, rename1.NewLocalPath);

            // Checkin the rename & pend a merge
            CheckinMergeResolve(changesetId);

            MigrationItemStrings targetFolder = new MigrationItemStrings(m_target.Name + "folder/", null, TestEnvironment, true);
            MigrationItemStrings rename2      = new MigrationItemStrings(targetFolder.Name + "file2.txt", targetFolder.Name + "file3.txt", TestEnvironment, true);

            SourceWorkspace.PendRename(rename2.LocalPath, rename2.NewLocalPath);

            if (includeEdit)
            {
                SourceAdapter.EditFile(rename2.NewLocalPath);
            }

            RunAndValidate();

            VerifyNoExtraMergeCandidates();
        }
コード例 #5
0
        private void PendRenameEdit(MigrationItemStrings file)
        {
            TestUtils.EditRandomFile(file.LocalPath);

            SourceWorkspace.PendEdit(file.LocalPath);
            SourceWorkspace.PendRename(file.LocalPath, file.NewLocalPath);
        }
コード例 #6
0
        public void ThreeWayCyclicRenameTest()
        {
            MigrationItemStrings folder1 = new MigrationItemStrings("folder1/", null, TestEnvironment, true);
            MigrationItemStrings folder2 = new MigrationItemStrings("folder2/", null, TestEnvironment, true);
            MigrationItemStrings folder3 = new MigrationItemStrings("folder3/", null, TestEnvironment, true);
            MigrationItemStrings temp    = new MigrationItemStrings("temp/", null, TestEnvironment, true);

            MigrationItemStrings file1 = new MigrationItemStrings("folder1/file1.txt", null, TestEnvironment, true);
            MigrationItemStrings file2 = new MigrationItemStrings("folder2/file2.txt", null, TestEnvironment, true);
            MigrationItemStrings file3 = new MigrationItemStrings("folder3/file3.txt", null, TestEnvironment, true);

            SourceAdapter.AddFolder(folder1.LocalPath);
            SourceAdapter.AddFolder(folder2.LocalPath);
            SourceAdapter.AddFolder(folder3.LocalPath);
            SourceAdapter.AddFile(file1.LocalPath);
            SourceAdapter.AddFile(file2.LocalPath);
            SourceAdapter.AddFile(file3.LocalPath);

            // Create a cyclic rename of the three folders
            SourceWorkspace.Get(VersionSpec.Latest, GetOptions.Overwrite);
            SourceWorkspace.PendRename(folder3.ServerPath, temp.ServerPath);
            SourceWorkspace.PendRename(folder2.ServerPath, folder3.ServerPath);
            SourceWorkspace.PendRename(folder1.ServerPath, folder2.ServerPath);
            SourceWorkspace.PendRename(temp.ServerPath, folder1.ServerPath);
            SourceWorkspace.CheckIn(SourceWorkspace.GetPendingChanges(), RenameComment);

            RunAndValidate();
        }
コード例 #7
0
        public void RenameCaseTest()
        {
            MigrationItemStrings folder;
            MigrationItemStrings file;

            if ((SourceAdapter.AdapterType == AdapterType.TFS2008VC) ||
                (SourceAdapter.AdapterType == AdapterType.TFS2010VC))
            {
                // change case only
                folder = new MigrationItemStrings("FOLDER", "folder", TestEnvironment, true);
                file   = new MigrationItemStrings("file.txt", "FILE.txt", TestEnvironment, true);
            }
            else
            {
                // non-TFS adapters don't support case-only rename
                folder = new MigrationItemStrings("FOLDER1", "folder2", TestEnvironment, true);
                file   = new MigrationItemStrings("file1.txt", "FILE2.txt", TestEnvironment, true);
            }

            SourceAdapter.AddFolder(folder.LocalPath);
            SourceAdapter.AddFile(file.LocalPath);

            SourceAdapter.RenameItem(folder.LocalPath, folder.NewLocalPath);
            SourceAdapter.RenameItem(file.LocalPath, file.NewLocalPath);

            RunAndValidate();
        }
コード例 #8
0
        public void TFSHistoryNotFoundConflict()
        {
            MigrationItemStrings branch = new MigrationItemStrings("source/", "target/", TestEnvironment, true);

            MigrationItemStrings file1 = new MigrationItemStrings("source/file1.txt", null, TestEnvironment, true);
            MigrationItemStrings file2 = new MigrationItemStrings("source/file2.txt", null, TestEnvironment, true);

            int firstChangeset     = SourceAdapter.AddFile(file1.LocalPath);
            int editBeforeSnapShot = SourceAdapter.EditFile(file1.LocalPath);

            int snapshotChangesetId = SourceAdapter.AddFile(file2.LocalPath);

            SourceAdapter.BranchItem(branch);

            TestEnvironment.SnapshotBatchSize   = 10;
            TestEnvironment.SnapshotStartPoints = new Dictionary <string, string>();
            TestEnvironment.SnapshotStartPoints.Add(TestEnvironment.SourceEndPoint.TeamProject, snapshotChangesetId.ToString());

            Run();

            // Resolve "Branch source path not found conflict" using "$/" scope.
            ConflictResolver  conflictManager = new ConflictResolver(Configuration);
            List <RTConflict> conflicts       = conflictManager.GetConflicts();

            Assert.AreEqual(1, conflicts.Count, "There should be only 1 conflict");
            conflictManager.TryResolveConflict(conflicts[0], ConflictConstant.TFSHistoryNotFoundSkipAction, string.Format("{0}-{1}", firstChangeset, snapshotChangesetId)); // Add on branch source not found

            Run();
            Assert.IsTrue(VerifyContents());
        }
コード例 #9
0
        protected void BranchCyclicalRenameTest()
        {
            MigrationItemStrings branch = new MigrationItemStrings("source/", "target/", TestEnvironment, true);

            MigrationItemStrings folder1 = new MigrationItemStrings("source/folder1/", null, TestEnvironment, true);
            MigrationItemStrings folder2 = new MigrationItemStrings("source/folder2/", null, TestEnvironment, true);
            MigrationItemStrings temp    = new MigrationItemStrings("source/temp/", null, TestEnvironment, true);

            MigrationItemStrings file1 = new MigrationItemStrings("source/folder1/file1.txt", null, TestEnvironment, true);
            MigrationItemStrings file2 = new MigrationItemStrings("source/folder2/file2.txt", null, TestEnvironment, true);

            SourceAdapter.AddFolder(folder1.LocalPath);
            SourceAdapter.AddFolder(folder2.LocalPath);

            SourceAdapter.AddFile(file1.LocalPath);
            SourceAdapter.AddFile(file2.LocalPath);

            SourceAdapter.EditFile(m_extraFile.LocalPath);

            SourceWorkspace.PendRename(folder1.ServerPath, temp.ServerPath);
            SourceWorkspace.PendRename(folder2.ServerPath, folder1.ServerPath);
            SourceWorkspace.PendRename(temp.ServerPath, folder2.ServerPath);
            SourceWorkspace.CheckIn(SourceWorkspace.GetPendingChanges(), RenameComment);

            SourceAdapter.BranchItem(branch.ServerPath, branch.NewServerPath);

            RunAndValidate();
        }
コード例 #10
0
        public void TwoWay_EditEditConflictTakeOtherTest()
        {
            // continuous manual, bi-directional sync
            TestEnvironment.WorkFlowType = new WorkFlowType();
            TestEnvironment.WorkFlowType.DirectionOfFlow = DirectionOfFlow.Bidirectional;
            TestEnvironment.WorkFlowType.Frequency       = Frequency.ContinuousManual;
            TestEnvironment.WorkFlowType.SyncContext     = SyncContext.Disabled;

            // 1. migrate a.txt -> a.txt
            string fileName = "a.txt";
            MigrationItemStrings sourceFile = new MigrationItemStrings(fileName, null, TestEnvironment, true);
            MigrationItemStrings targetFile = new MigrationItemStrings(fileName, null, TestEnvironment, false);

            SourceAdapter.AddFile(sourceFile.LocalPath);
            RunAndValidate();

            // 2. source system: a.txt -> edit
            SourceAdapter.EditFile(sourceFile.LocalPath);

            // 3. target system: a.txt -> edit
            TargetAdapter.EditFile(targetFile.LocalPath);

            // 4. Migration will detect a conflict
            Run();

            // 5. resolve conflicts
            ConflictResolver  conflictResolver = new ConflictResolver(Configuration);
            List <RTConflict> conflicts        = conflictResolver.GetConflicts();

            Assert.AreEqual(1, conflicts.Count, "There should be 1 conflict");
            VCContentConflictType contentConflict = new VCContentConflictType();

            Assert.IsTrue(contentConflict.ReferenceName.Equals(conflicts[0].ConflictTypeReference.Value.ReferenceName), "It should be vc content conflict");
            conflictResolver.TryResolveConflict(conflicts[0], new VCContentConflictTakeOtherChangesAction(), conflicts[0].ScopeHint);

            // sync
            Run(true, true);

            // validation
            // no remaining conflicts
            conflicts = conflictResolver.GetConflicts();
            Assert.AreEqual(0, conflicts.Count, "There should be NO conflict");

            // content should match
            Assert.IsTrue(VerifyContents(), "The latest content should match.");

            // 6. edit a.txt on source system
            SourceAdapter.EditFile(sourceFile.LocalPath);

            // 7. sync
            Run(true, true);

            // validation
            // no remaining conflicts
            conflicts = conflictResolver.GetConflicts();
            Assert.AreEqual(0, conflicts.Count, "There should be NO conflict");

            // content should match
            Assert.IsTrue(VerifyContents(), "The latest content should match.");
        }
コード例 #11
0
        public void MapBranchRootTest()
        {
            MigrationItemStrings branch = new MigrationItemStrings("source" + SourceAdapter.PathSeparator,
                                                                   "target" + SourceAdapter.PathSeparator,
                                                                   TestEnvironment, true);
            MigrationItemStrings file = new MigrationItemStrings(branch.Name + SourceAdapter.PathSeparator + "file.txt",
                                                                 branch.NewName + SourceAdapter.PathSeparator + "file.txt", TestEnvironment, true);

            SourceAdapter.AddFile(file.LocalPath);

            //Remap the migration
            string source = TestEnvironment.FirstSourceServerPath;
            string target = TestEnvironment.FirstTargetServerPath;

            TestEnvironment.Mappings.Clear();
            TestEnvironment.AddMapping(new MappingPair(source + SrcPathSeparator + branch.Name,
                                                       target + TarPathSeparator + branch.Name, false));
            TestEnvironment.AddMapping(new MappingPair(source + SrcPathSeparator + branch.NewName,
                                                       target + TarPathSeparator + branch.NewName, false));
            TestEnvironment.AddMapping(new MappingPair(source + SrcPathSeparator + m_extraFile.Name,
                                                       target + TarPathSeparator + m_extraFile.Name, false));

            int branchChangeset = SourceAdapter.BranchItem(branch.ServerPath, branch.NewServerPath);

            SourceAdapter.EditFile(file.LocalPath);

            SourceAdapter.MergeItem(branch, branchChangeset);

            SourceAdapter.EditFile(m_extraFile.LocalPath);

            RunAndValidate();
        }
コード例 #12
0
        public void MergeMovesTest()
        {
            MigrationItemStrings branch = new MigrationItemStrings("source/", "target/", TestEnvironment, true);
            MigrationItemStrings file   = new MigrationItemStrings("source/file.txt", "source/sub/file.txt", TestEnvironment, true);
            MigrationItemStrings file2  = new MigrationItemStrings("source/file2.txt", "source/sub/file2.txt", TestEnvironment, true);

            SourceAdapter.AddFile(file.LocalPath);
            SourceAdapter.AddFile(file2.LocalPath);

            int branchChangeset = SourceAdapter.BranchItem(branch.ServerPath, branch.NewServerPath);

            SourceAdapter.EditFile(file.LocalPath);
            SourceAdapter.EditFile(file.LocalPath);
            SourceAdapter.EditFile(m_extraFile.LocalPath);

            SourceAdapter.RenameItem(file.ServerPath, file.NewServerPath);
            SourceAdapter.RenameItem(file2.ServerPath, file2.NewServerPath);

            SourceWorkspace.Merge(branch.ServerPath, branch.NewServerPath,
                                  VersionSpec.ParseSingleSpec(branchChangeset.ToString(),
                                                              Environment.UserName), VersionSpec.Latest, LockLevel.None, RecursionType.Full, MergeOptions.None);
            ResolveConflicts(Resolution.AcceptTheirs);
            SourceWorkspace.CheckIn(SourceWorkspace.GetPendingChanges(), MergeComment);

            RunAndValidate();
        }
コード例 #13
0
        public void PartialMergeTest()
        {
            MigrationItemStrings branch = new MigrationItemStrings("source/", "target/", TestEnvironment, true);
            MigrationItemStrings file   = new MigrationItemStrings("source/file.txt", "target/file.txt", TestEnvironment, true);
            MigrationItemStrings file2  = new MigrationItemStrings("file2.txt", "target/file2.txt", TestEnvironment, true);

            SourceAdapter.AddFile(file.LocalPath);
            SourceAdapter.AddFile(file2.LocalPath);
            int branchChangeset = SourceAdapter.BranchItem(branch.ServerPath, branch.NewServerPath);

            SourceAdapter.EditFile(file.LocalPath);
            SourceAdapter.EditFile(file.LocalPath);
            SourceAdapter.EditFile(m_extraFile.LocalPath);
            int mergeOne = SourceAdapter.EditFile(file2.LocalPath);

            SourceAdapter.EditFile(file.LocalPath);
            SourceAdapter.EditFile(m_extraFile.LocalPath);
            SourceAdapter.EditFile(file.LocalPath);
            int mergeTwo = SourceAdapter.EditFile(file2.LocalPath);

            SourceAdapter.EditFile(file.LocalPath);
            SourceAdapter.EditFile(file2.LocalPath);
            SourceAdapter.EditFile(m_extraFile.LocalPath);

            SourceAdapter.MergeItem(branch, branchChangeset, mergeOne);
            SourceAdapter.MergeItem(branch, branchChangeset, mergeTwo);
            SourceAdapter.MergeItem(branch, branchChangeset, SourceTfsClient.GetLatestChangesetId());

            RunAndValidate();
        }
コード例 #14
0
        private int AddBranch()
        {
            file = new MigrationItemStrings(source.Name + "file.txt", source.Name + "renamed-file.txt", TestEnvironment, true);

            SourceAdapter.AddFile(file.LocalPath);
            return(SourceAdapter.BranchItem(source.ServerPath, target.ServerPath));
        }
コード例 #15
0
        public void RenameDeleteMergeTest2()
        {
            MigrationItemStrings sourceFolder = new MigrationItemStrings(m_source.Name + "folder/", m_source.Name + "renamed-folder/", TestEnvironment, true);

            m_file = new MigrationItemStrings(sourceFolder.Name + "file.txt", sourceFolder.NewName + "file.txt", TestEnvironment, true);
            MigrationItemStrings file2         = new MigrationItemStrings(sourceFolder.Name + "file2.txt", sourceFolder.NewName + "file2.txt", TestEnvironment, true);
            MigrationItemStrings sourceFolder2 = new MigrationItemStrings(m_source.Name + "folder2/", m_source.Name + "renamed-folder2/", TestEnvironment, true);

            int changesetId = SourceAdapter.AddFile(m_file.LocalPath);

            SourceAdapter.AddFile(file2.LocalPath);
            SourceAdapter.AddFolder(sourceFolder2.LocalPath);
            SourceAdapter.BranchItem(m_source, m_target);

            PendRenameDelete(sourceFolder, m_file);
            SourceWorkspace.PendRename(sourceFolder2.LocalPath, sourceFolder2.NewLocalPath);

            CheckinMergeResolve(changesetId);

            if (TestEnvironment.SourceEndPoint.IsTfsAdapter &&
                TestEnvironment.SourceEndPoint.AdapterType >= AdapterType.TFS2010VC)
            {
                Run();
                Assert.IsTrue(VerifyContents());
            }
            else
            {
                RunAndValidate();
            }
        }
コード例 #16
0
 private void EditUndelete(MigrationItemStrings file)
 {
     SourceAdapter.AddFile(file.LocalPath);
     PendUndelete(file);
     TestUtils.EditRandomFile(file.LocalPath);
     SourceWorkspace.PendEdit(file.LocalPath);
 }
コード例 #17
0
        public void RenameMergeTest()
        {
            MigrationItemStrings file1 = new MigrationItemStrings(source.Name + "file1.txt", source.Name + "renamed-file1.txt", TestEnvironment, true);

            SourceAdapter.AddFile(file1.LocalPath);

            MigrationItemStrings file2 = new MigrationItemStrings(source.Name + "file2.txt", source.Name + "renamed-file2.txt", TestEnvironment, true);

            SourceAdapter.AddFile(file2.LocalPath);

            int changesetId = AddBranch();

            SourceAdapter.RenameItem(file.ServerPath, file.NewServerPath, AddComment);
            SourceAdapter.RenameItem(file1.ServerPath, file1.NewServerPath, AddComment);
            SourceAdapter.RenameItem(file2.ServerPath, file2.NewServerPath, AddComment);

            SourceWorkspace.Merge(source.LocalPath, target.LocalPath,
                                  VersionSpec.ParseSingleSpec(changesetId.ToString(), Environment.UserName),
                                  VersionSpec.Latest, LockLevel.None, RecursionType.Full, MergeOptions.ForceMerge);

            Conflict[] conflicts = SourceWorkspace.QueryConflicts(new string[] { "$/" }, true);

            foreach (Conflict conflict in conflicts)
            {
                conflict.Resolution = Resolution.AcceptTheirs;
                SourceWorkspace.ResolveConflict(conflict);
            }

            RunAndValidate();
        }
コード例 #18
0
        public void StartsWithMappingsTest()
        {
            MigrationItemStrings fileOutSideMapping = new MigrationItemStrings("source-integration/file.txt", null, TestEnvironment, true);
            MigrationItemStrings fileUnderMapping   = new MigrationItemStrings("source/file.txt", null, TestEnvironment, true);

            TestUtils.CreateRandomFile(fileOutSideMapping.LocalPath, 10);
            TestUtils.CreateRandomFile(fileUnderMapping.LocalPath, 10);

            string mergeComment = "Migration test merge";

            SourceWorkspace.PendAdd(fileOutSideMapping.LocalPath);
            SourceWorkspace.PendAdd(fileUnderMapping.LocalPath);

            SourceWorkspace.CheckIn(SourceWorkspace.GetPendingChanges(), mergeComment);

            MappingPair mapping = new MappingPair(TestEnvironment.FirstSourceServerPath + SrcPathSeparator + "source",
                                                  TestEnvironment.FirstTargetServerPath + TarPathSeparator + "source",
                                                  false);
            MappingPair mapping2 = new MappingPair(TestEnvironment.FirstSourceServerPath + SrcPathSeparator + "source-integration",
                                                   TestEnvironment.FirstTargetServerPath + TarPathSeparator + "source-integration",
                                                   false);

            TestEnvironment.Mappings.Clear();

            TestEnvironment.AddMapping(mapping);
            TestEnvironment.AddMapping(mapping2);
            RunAndValidate();
        }
コード例 #19
0
        public void BasicSnapshotTest()
        {
            MigrationItemStrings branch = new MigrationItemStrings("source/", "target/", TestEnvironment, true);

            MigrationItemStrings[] addFiles = new MigrationItemStrings[20];

            // Add files
            // Create a tree structure so that we can test path compression logic.
            int snapshotChangesetId = 0;

            for (int i = 0; i < 20; i++)
            {
                addFiles[i] = new MigrationItemStrings(string.Format("source/addFile{0}.txt", i), null, TestEnvironment, true);
                if (i == 15)
                {
                    snapshotChangesetId = SourceAdapter.AddFile(addFiles[i].LocalPath);
                }
                else
                {
                    SourceAdapter.AddFile(addFiles[i].LocalPath);
                }
            }
            TestEnvironment.SnapshotStartPoints = new Dictionary <string, string>();
            TestEnvironment.SnapshotStartPoints.Add(TestEnvironment.SourceTeamProject, snapshotChangesetId.ToString());
            TestEnvironment.SnapshotBatchSize = 3;

            Run();

            VerifySnapshotMigration(snapshotChangesetId);

            Assert.IsTrue(VerifyContents());
        }
コード例 #20
0
        public void AddTest()
        {
            MigrationItemStrings file = new MigrationItemStrings("file.txt", "FILE.txt", TestEnvironment, true);

            SourceAdapter.AddFile(file.LocalPath);

            RunAndValidate();
        }
コード例 #21
0
        public int MergeItem(MigrationItemStrings branch, int mergeFrom, int mergeTo)
        {
            m_workspace.Merge(branch.ServerPath, branch.NewServerPath,
                              VersionSpec.ParseSingleSpec(mergeFrom.ToString(), Environment.UserName),
                              VersionSpec.ParseSingleSpec(mergeTo.ToString(), Environment.UserName), LockLevel.None, RecursionType.Full, MergeOptions.None);

            return(m_workspace.CheckIn(m_workspace.GetPendingChanges(), MergeComment));
        }
コード例 #22
0
        public override void Cleanup()
        {
            source = null;
            target = null;
            file   = null;

            base.Cleanup();
        }
コード例 #23
0
        public void EditUndeleteTest()
        {
            file = new MigrationItemStrings("file.txt", null, TestEnvironment, true);

            EditUndelete(file);

            RunAndValidate();
        }
コード例 #24
0
        public override void Initialize()
        {
            base.Initialize();

            source = new MigrationItemStrings("source" + SrcPathSeparator, null, TestEnvironment, true);
            target = new MigrationItemStrings("target" + SrcPathSeparator, null, TestEnvironment, true);
            file   = new MigrationItemStrings("file.txt", null, TestEnvironment, true);
        }
コード例 #25
0
        public override void Cleanup()
        {
            m_source = null;
            m_target = null;
            m_file   = null;

            base.Cleanup();
        }
コード例 #26
0
        public void BranchEmptyFolderTest()
        {
            MigrationItemStrings folder = new MigrationItemStrings("source/folder", "target/folder", TestEnvironment, true);

            SourceAdapter.AddFolder(folder.LocalPath);
            SourceAdapter.BranchItem(folder);

            RunAndValidate();
        }
コード例 #27
0
        public void RenameUndeleteTest()
        {
            file = new MigrationItemStrings("file.txt", "newFile.txt", TestEnvironment, true);

            SourceAdapter.AddFile(file.LocalPath);
            PendUndeleteRename(file);

            RunAndValidate();
        }
コード例 #28
0
        protected void BranchEmptyFolderScenario()
        {
            MigrationItemStrings folder = new MigrationItemStrings("source/folder", "target/folder", TestEnvironment, true);

            SourceAdapter.AddFolder(folder.LocalPath);
            SourceAdapter.BranchItem(folder.ServerPath, folder.NewServerPath);

            RunAndValidate();
        }
コード例 #29
0
        public void RenameEditUndeleteTest()
        {
            file = new MigrationItemStrings("file.txt", "newFile.txt", TestEnvironment, true);

            EditUndelete(file);
            SourceWorkspace.PendRename(file.LocalPath, file.NewLocalPath);

            RunAndValidate();
        }
コード例 #30
0
        protected void BranchFileScenario()
        {
            MigrationItemStrings file = new MigrationItemStrings("source/file.txt", "target/file.txt", TestEnvironment, true);

            SourceAdapter.AddFile(file.LocalPath);
            SourceAdapter.BranchItem(file.ServerPath, file.NewServerPath);

            RunAndValidate();
        }