Package org.eclipse.jgit.lib

Examples of org.eclipse.jgit.lib.ObjectInserter.release()


      ObjectInserter inserter = repo.newObjectInserter();
      try {
        tagId = inserter.insert(tag);
        inserter.flush();
      } finally {
        inserter.release();
      }
      return tagId;
    } catch (IOException e) {
      throw new TeamException(NLS.bind(CoreText.TagOperation_objectIdNotFound,
          tag.getTag(), e.getMessage()), e);
View Full Code Here


      ObjectId blob = inserter.insert(Constants.OBJ_BLOB,
          data.getBytes("UTF-8"));
      entry.setObjectId(blob);
      inserter.flush();
    } finally {
      inserter.release();
    }
    return entry;
  }

  private static String readContents(IndexFileRevision revision)
View Full Code Here

    try {
      ObjectId objectId = inserter.insert(Constants.OBJ_BLOB, fileContents);
      inserter.flush();
      return objectId;
    } finally {
      inserter.release();
    }
  }

  protected ObjectId createFileCorruptShort(Repository repository,
      IProject actProject, String name, String content)
View Full Code Here

            }
          } finally {
            revWalk.release();
          }
        } finally {
          odi.release();
        }
      } finally {
        index.unlock();
      }
    } catch (UnmergedPathException e) {
View Full Code Here

        parser.setObjectChecking(transport.isCheckFetchedObjects());
        parser.setLockMessage(lockMessage);
        packLock = parser.parse(NullProgressMonitor.INSTANCE);
        ins.flush();
      } finally {
        ins.release();
      }
    } catch (IOException err) {
      close();
      throw new TransportException(transport.uri, err.getMessage(), err);
    } catch (RuntimeException err) {
View Full Code Here

      parser.setObjectChecking(transport.isCheckFetchedObjects());
      parser.setLockMessage(lockMessage);
      packLock = parser.parse(monitor);
      ins.flush();
    } finally {
      ins.release();
    }
  }

  /**
   * Notification event delivered just before the pack is received from the
View Full Code Here

        inserter.flush();

        updateStashRef(commitId, builder.getAuthor(),
            builder.getMessage());
      } finally {
        inserter.release();
        cache.unlock();
      }

      // Hard reset to HEAD
      new ResetCommand(repo).setMode(ResetType.HARD).call();
View Full Code Here

        } finally {
          revWalk.release();
        }

      } finally {
        inserter.release();
      }

    } catch (IOException e) {
      throw new JGitInternalException(
          JGitText.get().exceptionCaughtDuringExecutionOfTagCommand,
View Full Code Here

            }
          } finally {
            revWalk.release();
          }
        } finally {
          odi.release();
        }
      } finally {
        index.unlock();
      }
    } catch (UnmergedPathException e) {
View Full Code Here

      parser.setLockMessage(lockMsg);
      parser.setMaxObjectSizeLimit(maxObjectSizeLimit);
      packLock = parser.parse(receiving, resolving);
      ins.flush();
    } finally {
      ins.release();
    }

    if (timeoutIn != null)
      timeoutIn.setTimeout(timeout * 1000);
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.