public void Pull_FromOtherWithRevisionSpecification_OnlyPullsInRelevantChanges() { WriteTextFileAndCommit(Repo1, "test1.txt", "initial contents", "initial commit", true); WriteTextFileAndCommit(Repo1, "test1.txt", "changed contents", "2nd commit", false); WriteTextFileAndCommit(Repo1, "test1.txt", "changed contents again", "3rd commit", false); Repo2.Pull( Repo1.Path, new PullCommand { Revisions = { RevSpec.Single(1), }, }); Changeset[] pulledChangesets = Repo2.Log().OrderBy(c => c.RevisionNumber).ToArray(); Changeset[] originalChangesets = Repo1.Log( new LogCommand { Revisions = { RevSpec.Range(0, 1), }, }).OrderBy(c => c.RevisionNumber).ToArray(); CollectionAssert.AreEqual(pulledChangesets, originalChangesets); }
public void Pull_FromOther_PullsInAllChanges() { WriteTextFileAndCommit(Repo1, "test1.txt", "initial contents", "initial commit", true); WriteTextFileAndCommit(Repo1, "test1.txt", "changed contents", "2nd commit", false); Repo2.Pull(Repo1.Path); CollectionAssert.AreEqual(Repo2.Log(), Repo1.Log()); }
public void Bundle_PulledIntoEmptyRepository_ProducesCloneOfSource() { string bundleFileName = GetTempFileName(); Repo1.Init(); WriteTextFileAndCommit(Repo1, "test1.txt", "dummy", "dummy", true); Repo2.Init(); Repo1.Bundle(bundleFileName, Repo2.Path); Repo2.Pull(bundleFileName); CollectionAssert.AreEqual(Repo1.Log(new LogCommand().WithIncludePathActions()), Repo2.Log(new LogCommand().WithIncludePathActions())); }