public void Version_IsOneOfTheSupportedOnes() { Assert.That( new[] { ClientExecutable.GetVersion() }, Is.SubsetOf(ClientExecutable.SupportedVersions)); }
public void Remove_UncommittedFile_ThrowsMercurialExecutionException() { if (ClientExecutable.GetVersion() < new Version(1, 7, 0, 0)) { Assert.Ignore("This is not reported as a problem in Mercurial <1.7"); } Repo.Init(); File.WriteAllText(Path.Combine(Repo.Path, "test.txt"), "contents"); Repo.Add("test.txt"); Assert.Throws <MercurialExecutionException>(() => Repo.Remove("test.txt")); }
public void Log_ForFileAndWithFollowOption_ShowsCompleteLogForFileIncludingBeforeRename() { if (ClientExecutable.GetVersion() < new Version(1, 7, 0, 0)) { Assert.Ignore("This is not reported accurately in the log in Mercurial <1.7"); } CommitAndRenameFile(); Changeset[] log = Repo.Log( new LogCommand { FollowRenamesAndMoves = true, Path = "test2.txt", }).ToArray(); Assert.That(log.Length, Is.EqualTo(2)); }