Exemplo n.º 1
0
 /// <summary>Insert the commit pointer at the front of the queue.</summary>
 /// <remarks>Insert the commit pointer at the front of the queue.</remarks>
 /// <param name="c">the commit to insert into the queue.</param>
 public virtual void Unpop(RevCommit c)
 {
     BlockRevQueue.Block b = head;
     if (b == null)
     {
         b = free.NewBlock();
         b.ResetToMiddle();
         b.Add(c);
         head = b;
         tail = b;
         return;
     }
     else
     {
         if (b.CanUnpop())
         {
             b.Unpop(c);
             return;
         }
     }
     b = free.NewBlock();
     b.ResetToEnd();
     b.Unpop(c);
     b.next = head;
     head   = b;
 }
Exemplo n.º 2
0
 public override void Add(RevCommit c)
 {
     BlockRevQueue.Block b = head;
     if (b == null || !b.CanUnpop())
     {
         b = free.NewBlock();
         b.ResetToEnd();
         b.next = head;
         head   = b;
     }
     b.Unpop(c);
 }