Esempio n. 1
0
		internal virtual void Add(FetchHeadRecord r)
		{
			if (!r.notForMerge)
			{
				forMerge.AddItem(r);
			}
		}
Esempio n. 2
0
        private void RemoveFetchHeadRecord(ObjectId want)
        {
            Iterator <FetchHeadRecord> i = fetchHeadUpdates.Iterator();

            while (i.HasNext())
            {
                FetchHeadRecord fh = i.Next();
                if (fh.newValue.Equals(want))
                {
                    i.Remove();
                }
            }
        }
Esempio n. 3
0
        /// <exception cref="NGit.Errors.TransportException"></exception>
        private void Want(Ref src, RefSpec spec)
        {
            ObjectId newId = src.GetObjectId();

            if (spec.GetDestination() != null)
            {
                TrackingRefUpdate tru = CreateUpdate(spec, newId);
                if (newId.Equals(tru.GetOldObjectId()))
                {
                    return;
                }
                localUpdates.AddItem(tru);
            }
            askFor.Put(newId, src);
            FetchHeadRecord fhr = new FetchHeadRecord();

            fhr.newValue    = newId;
            fhr.notForMerge = spec.GetDestination() != null;
            fhr.sourceName  = src.GetName();
            fhr.sourceURI   = transport.GetURI();
            fetchHeadUpdates.AddItem(fhr);
        }
Esempio n. 4
0
 /// <exception cref="NGit.Errors.TransportException"></exception>
 private void Want(Ref src, RefSpec spec)
 {
     ObjectId newId = src.GetObjectId();
     if (spec.GetDestination() != null)
     {
         try
         {
             TrackingRefUpdate tru = CreateUpdate(spec, newId);
             if (newId.Equals(tru.GetOldObjectId()))
             {
                 return;
             }
             localUpdates.AddItem(tru);
         }
         catch (IOException err)
         {
             // Bad symbolic ref? That is the most likely cause.
             //
             throw new TransportException(MessageFormat.Format(JGitText.Get().cannotResolveLocalTrackingRefForUpdating
                 , spec.GetDestination()), err);
         }
     }
     askFor.Put(newId, src);
     FetchHeadRecord fhr = new FetchHeadRecord();
     fhr.newValue = newId;
     fhr.notForMerge = spec.GetDestination() != null;
     fhr.sourceName = src.GetName();
     fhr.sourceURI = transport.GetURI();
     fetchHeadUpdates.AddItem(fhr);
 }
Esempio n. 5
0
		/// <exception cref="NGit.Errors.TransportException"></exception>
		private void Want(Ref src, RefSpec spec)
		{
			ObjectId newId = src.GetObjectId();
			if (spec.GetDestination() != null)
			{
				TrackingRefUpdate tru = CreateUpdate(spec, newId);
				if (newId.Equals(tru.GetOldObjectId()))
				{
					return;
				}
				localUpdates.AddItem(tru);
			}
			askFor.Put(newId, src);
			FetchHeadRecord fhr = new FetchHeadRecord();
			fhr.newValue = newId;
			fhr.notForMerge = spec.GetDestination() != null;
			fhr.sourceName = src.GetName();
			fhr.sourceURI = transport.GetURI();
			fetchHeadUpdates.AddItem(fhr);
		}