Example #1
0
 /// <exception cref="System.IO.IOException"></exception>
 private void UpdateFETCH_HEAD(FetchResult result)
 {
     FilePath meta = transport.local.Directory;
     if (meta == null)
     {
         return;
     }
     LockFile Lock = new LockFile(new FilePath(meta, "FETCH_HEAD"), transport.local.FileSystem
         );
     try
     {
         if (Lock.Lock())
         {
             TextWriter w = new OutputStreamWriter(Lock.GetOutputStream());
             try
             {
                 foreach (FetchHeadRecord h in fetchHeadUpdates)
                 {
                     h.Write(w);
                     result.Add(h);
                 }
             }
             finally
             {
                 w.Close();
             }
             Lock.Commit();
         }
     }
     finally
     {
         Lock.Unlock();
     }
 }