~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/ngit/NGit/NGit.Transport/RemoteRefUpdate.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
109
109
 
110
110
                private readonly Repository localDb;
111
111
 
 
112
                private RefUpdate localUpdate;
 
113
 
112
114
                /// <summary>Construct remote ref update request by providing an update specification.
113
115
                ///     </summary>
114
116
                /// <remarks>
309
311
                        this.forceUpdate = forceUpdate;
310
312
                        if (localName != null && localDb != null)
311
313
                        {
312
 
                                trackingRefUpdate = new TrackingRefUpdate(localDb, localName, remoteName, true, newObjectId
313
 
                                        , "push");
 
314
                                localUpdate = localDb.UpdateRef(localName);
 
315
                                localUpdate.SetForceUpdate(true);
 
316
                                localUpdate.SetRefLogMessage("push", true);
 
317
                                localUpdate.SetNewObjectId(newObjectId);
 
318
                                trackingRefUpdate = new TrackingRefUpdate(true, remoteName, localName, localUpdate
 
319
                                        .GetOldObjectId() != null ? localUpdate.GetOldObjectId() : ObjectId.ZeroId, newObjectId
 
320
                                        );
314
321
                        }
315
322
                        else
316
323
                        {
475
482
                {
476
483
                        if (IsDelete())
477
484
                        {
478
 
                                trackingRefUpdate.Delete(walk);
 
485
                                trackingRefUpdate.SetResult(localUpdate.Delete(walk));
479
486
                        }
480
487
                        else
481
488
                        {
482
 
                                trackingRefUpdate.Update(walk);
 
489
                                trackingRefUpdate.SetResult(localUpdate.Update(walk));
483
490
                        }
484
491
                }
485
492