示例#1
0
        public void BackoutHead_UsesCommitMessage()
        {
            using (var setup = new HgTestSetup())
            {
                var path = setup.Root.GetNewTempFile(true).Path;
                setup.Repository.AddAndCheckinFile(path);
                File.WriteAllText(path, "2");
                setup.Repository.AddAndCheckinFile(path);
                var theMessage = "testing";
                setup.Repository.BackoutHead("1", theMessage);
                setup.AssertLocalNumberOfTip("2");
                setup.AssertHeadOfWorkingDirNumber("2");
                setup.AssertHeadCount(1);

                setup.AssertCommitMessageOfRevision("2", theMessage);
            }
        }
示例#2
0
        public void BackoutHead_UsesCommitMessage()
        {
            using (var setup = new HgTestSetup())
            {
                var path = setup.Root.GetNewTempFile(true).Path;
                setup.Repository.AddAndCheckinFile(path);
                File.WriteAllText(path, "2");
                setup.Repository.AddAndCheckinFile(path);
                var theMessage = "testing";
                setup.Repository.BackoutHead("1", theMessage);
                setup.AssertLocalNumberOfTip("2");
                setup.AssertHeadOfWorkingDirNumber("2");
                setup.AssertHeadCount(1);

                //for debuging a weird TeamCity failure of this
                Assert.AreEqual((int)'t', (int)(setup.Repository.GetRevision("2").Summary.Trim())[0]);
                Assert.AreEqual((int)'t', (int)(setup.Repository.GetRevision("2").Summary)[0]);
                Assert.AreEqual(theMessage, setup.Repository.GetRevision("2").Summary);

                setup.AssertCommitMessageOfRevision("2", theMessage);
            }
        }
示例#3
0
        public void BackoutHead_UsesCommitMessage()
        {
            using (var setup = new HgTestSetup())
            {
                var path = setup.Root.GetNewTempFile(true).Path;
                setup.Repository.AddAndCheckinFile(path);
                File.WriteAllText(path,"2");
                setup.Repository.AddAndCheckinFile(path);
                var theMessage = "testing";
                setup.Repository.BackoutHead("1", theMessage);
                setup.AssertLocalNumberOfTip("2");
                setup.AssertHeadOfWorkingDirNumber("2");
                setup.AssertHeadCount(1);

                setup.AssertCommitMessageOfRevision("2",theMessage);
            }
        }
示例#4
0
        public void BackoutHead_UsesCommitMessage()
        {
            using (var setup = new HgTestSetup())
            {
                var path = setup.Root.GetNewTempFile(true).Path;
                setup.Repository.AddAndCheckinFile(path);
                File.WriteAllText(path,"2");
                setup.Repository.AddAndCheckinFile(path);
                var theMessage = "testing";
                setup.Repository.BackoutHead("1", theMessage);
                setup.AssertLocalNumberOfTip("2");
                setup.AssertHeadOfWorkingDirNumber("2");
                setup.AssertHeadCount(1);

                //for debuging a weird TeamCity failure of this
                Assert.AreEqual((int)'t', (int)(setup.Repository.GetRevision("2").Summary.Trim())[0]);
                Assert.AreEqual((int)'t', (int)(setup.Repository.GetRevision("2").Summary)[0]);
                Assert.AreEqual(theMessage, setup.Repository.GetRevision("2").Summary);

                setup.AssertCommitMessageOfRevision("2",theMessage);
            }
        }