Package org.eclipse.jgit.dircache

Examples of org.eclipse.jgit.dircache.DirCache.unlock()


          }
        } finally {
          odi.release();
        }
      } finally {
        index.unlock();
      }
    } catch (UnmergedPathException e) {
      throw new UnmergedPathsException(e);
    } catch (IOException e) {
      throw new JGitInternalException(
View Full Code Here


      throw new JGitInternalException(
          JGitText.get().exceptionCaughtDuringExecutionOfAddCommand, e);
    } finally {
      inserter.release();
      if (dc != null)
        dc.unlock();
    }

    return dc;
  }
View Full Code Here

        treeWalk.addTree(stashWorkingIter);

        applyChanges(treeWalk, cache, editor);
      } finally {
        editor.commit();
        cache.unlock();
      }
    } catch (JGitInternalException e) {
      throw e;
    } catch (IOException e) {
      throw new JGitInternalException(JGitText.get().stashApplyFailed, e);
View Full Code Here

      edit.commit();
    } catch (IOException e) {
      throw new RuntimeException(e);
    } finally {
      if (dc != null)
        dc.unlock();
    }
  }

  private void resetIndex(RevCommit commit) throws IOException {
    DirCache dc = repo.lockDirCache();
View Full Code Here

        });
      }

      editor.commit();
    } finally {
      dc.unlock();
      if (walk != null)
        walk.release();
    }
  }
View Full Code Here

      } catch (org.eclipse.jgit.errors.CheckoutConflictException cce) {
        throw new CheckoutConflictException(checkout.getConflicts(),
            cce);
      }
    } finally {
      dc.unlock();
    }
  }

  private void resetMerge() throws IOException {
    repo.writeMergeHeads(null);
View Full Code Here

          status = new CheckoutResult(Status.CONFLICTS,
              dco.getConflicts());
          throw new CheckoutConflictException(dco.getConflicts(), e);
        }
      } finally {
        dc.unlock();
      }
      Ref ref = repo.getRef(name);
      if (ref != null && !ref.getName().startsWith(Constants.R_HEADS))
        ref = null;
      String toName = Repository.shortenRefName(name);
View Full Code Here

      } finally {
        startWalk.release();
        r.release();
      }
    } finally {
      dc.unlock();
      revWalk.release();
    }
    return this;
  }
View Full Code Here

    } catch (IOException e) {
      throw new JGitInternalException(
          JGitText.get().exceptionCaughtDuringExecutionOfRmCommand, e);
    } finally {
      if (dc != null)
        dc.unlock();
    }

    return dc;
  }
View Full Code Here

        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

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.