Exemple #1
0
		/// <exception cref="System.IO.IOException"></exception>
		private bool WantSatisfied(RevObject want)
		{
			if (want.Has(SATISFIED))
			{
				return true;
			}
			walk.ResetRetain(SAVE);
			walk.MarkStart((RevCommit)want);
			if (oldestTime != 0)
			{
				walk.SetRevFilter(CommitTimeRevFilter.After(oldestTime * 1000L));
			}
			for (; ; )
			{
				RevCommit c = walk.Next();
				if (c == null)
				{
					break;
				}
				if (c.Has(PEER_HAS))
				{
					AddCommonBase(c);
					want.Add(SATISFIED);
					return true;
				}
			}
			return false;
		}
Exemple #2
0
		private void AddCommonBase(RevObject o)
		{
			if (!o.Has(COMMON))
			{
				o.Add(COMMON);
				commonBase.AddItem(o);
				okToGiveUp = null;
			}
		}
		/// <exception cref="System.IO.IOException"></exception>
		private void AdvertiseAnyOnce(RevObject obj, string refName)
		{
			if (!obj.Has(ADVERTISED))
			{
				AdvertiseAny(obj, refName);
			}
		}
		private void Needs(RevObject obj)
		{
			if (obj.Has(COMPLETE))
			{
				return;
			}
			if (!obj.Has(IN_WORK_QUEUE))
			{
				obj.Add(IN_WORK_QUEUE);
				workQueue.AddItem(obj);
			}
		}
		/// <exception cref="System.IO.IOException"></exception>
		private bool WantSatisfied(RevObject want)
		{
			if (want.Has(SATISFIED))
			{
				return true;
			}
			if (!(want is RevCommit))
			{
				want.Add(SATISFIED);
				return true;
			}
			walk.ResetRetain(SAVE);
			walk.MarkStart((RevCommit)want);
			for (; ; )
			{
				RevCommit c = walk.Next();
				if (c == null)
				{
					break;
				}
				if (c.Has(PEER_HAS))
				{
					AddCommonBase(c);
					want.Add(SATISFIED);
					return true;
				}
			}
			return false;
		}