public void Sync_WeHaveAFileWhichTheyAlsoEditedButHavenotCheckedIn_TheirsIsRenamedToSafetyAndTheyGetOurs() { using (RepositoryWithFilesSetup bob = new RepositoryWithFilesSetup("bob", "test.a9a", "original")) { using (RepositoryWithFilesSetup sally = RepositoryWithFilesSetup.CreateByCloning("sally", bob)) { File.WriteAllText(bob.ProjectFolder.Combine("problem.txt"), "bob's problem"); //notice, we don't alter the include pattern on bob, so this doesn't get checked in // on his side bob.AddAndCheckIn(); sally.ReplaceSomething("sallyWasHere"); File.WriteAllText(sally.ProjectFolder.Combine("problem.txt"), "sally's problem"); sally.ProjectConfiguration.IncludePatterns.Add("problem.txt"); sally.CheckinAndPullAndMerge(bob); sally.AssertNoErrorsReported(); //ok, so the problem is now lurking in bob's repo, but it doesn't hit him until //he does at least an update bob.CheckinAndPullAndMerge(sally); var rescueFiles = Directory.GetFiles(bob.ProjectFolder.Path, "*.ChorusRescuedFile"); Assert.AreEqual(1, rescueFiles.Length); Assert.AreEqual("bob's problem", File.ReadAllText(rescueFiles[0])); sally.AssertFileContents("problem.txt", "sally's problem"); } } }