示例#1
0
        public void testWritePack3()
        {
            _writer.ReuseDeltas = false;
            var forcedOrder = new[]
            {
                ObjectId.FromString("82c6b885ff600be425b4ea96dee75dca255b69e7"),
                ObjectId.FromString("c59759f143fb1fe21c197981df75a7ee00290799"),
                ObjectId.FromString("aabf2ffaec9b497f0950352b3e582d73035c2035"),
                ObjectId.FromString("902d5476fa249b7abc9d84c611577a81381f0327"),
                ObjectId.FromString("5b6e7c66c276e7610d4a73c70ec1a1f7c1003259"),
                ObjectId.FromString("6ff87c4664981e4397625791c8ea3bbb5f2279a3")
            };
            var parser          = new GitSharp.Core.RevWalk.RevWalk(db);
            var forcedOrderRevs = new RevObject[forcedOrder.Length];

            for (int i = 0; i < forcedOrder.Length; i++)
            {
                forcedOrderRevs[i] = parser.parseAny(forcedOrder[i]);
            }

            CreateVerifyOpenPack(forcedOrderRevs.AsEnumerable());

            Assert.AreEqual(forcedOrder.Length, _writer.getObjectsNumber());
            VerifyObjectsOrder(forcedOrder);
            Assert.AreEqual("ed3f96b8327c7c66b0f8f70056129f0769323d86", _writer.computeName().Name);
        }