Package org.eclipse.jgit.treewalk

Examples of org.eclipse.jgit.treewalk.TreeWalk.release()


        } finally {
          if (idx > 0)
            rootTree.next(idx);
        }
      } finally {
        configWalk.release();
      }
    }
    return this;
  }
View Full Code Here


        URI nextLocation = new URI(diffLocation.getScheme(), diffLocation.getUserInfo(), diffLocation.getHost(), diffLocation.getPort(),
            diffLocation.getPath(), "pageSize=" + pageSize + "&page=" + (page + 1), diffLocation.getFragment());
        result.put(ProtocolConstants.KEY_NEXT_LOCATION, nextLocation);
      }
    } finally {
      tw.release();
    }
    return result;
  }

  protected JSONArray toJSON(Map<String, Ref> revTags) throws JSONException, URISyntaxException, CoreException, IOException {
View Full Code Here

      builder.commit();
    } finally {
      dc.unlock();
      if (walk != null)
        walk.release();
    }
  }

  private void resetUntracked(RevTree tree) throws CheckoutConflictException, IOException {
    TreeWalk walk = null;
View Full Code Here

        checkoutPath(entry, reader);
      }
    } finally {
      if (walk != null)
        walk.release();
    }
  }

  private void checkoutPath(DirCacheEntry entry, ObjectReader reader) {
    try {
View Full Code Here

            resp.setHeader("ETag", "\"" + tree.getId().getName() + "\"");
            log.debug(response);
            out.write(response);
          }
          walk.release();
          treeWalk.release();
        }
      }
    } finally {
      out.close();
    }
View Full Code Here

        resp.setHeader("Cache-Control", "no-cache");
        resp.setHeader("ETag", "\"" + tree.getId().getName() + "\"");
        resp.setContentType("application/octet-stream");
        loader.copyTo(out);
        walk.release();
        treeWalk.release();
      }
    } finally {
      out.close();
    }
  }
View Full Code Here

          "An error occured when requesting commit info.", e));
    } finally {
      if (walk != null)
        walk.release();
      if (treeWalk != null)
        treeWalk.release();
    }
  }

  private boolean getFileContents(HttpServletRequest request, HttpServletResponse response, Repository repo, TreeWalk treeWalk, RevTree tree) {
    ObjectStream stream = null;
View Full Code Here

            List<ScmFile> listedFiles = new ArrayList<ScmFile>();
            while ( walk.next() )
            {
                listedFiles.add( new ScmFile( walk.getPathString(), ScmFileStatus.CHECKED_OUT ) );
            }
            walk.release();

            getLogger().debug( "current branch: " + git.getRepository().getBranch() );

            return new CheckOutScmResult( "checkout via JGit", listedFiles );
        }
View Full Code Here

        }
      return ret;
    } finally {
      if (revWalk != null)
        revWalk.dispose();
      treeWalk.release();
    }
  }

  private PackFile writePack(Set<? extends ObjectId> want,
      Set<? extends ObjectId> have, Set<ObjectId> tagTargets,
View Full Code Here

    treeWalk.addTree(id);

    treeWalk.setFilter(TreeFilter.ANY_DIFF);

    boolean needsCommit = treeWalk.next();
    treeWalk.release();

    if (needsCommit) {
      CommitCommand commit = new Git(repo).commit();
      commit.setMessage(readFile(rebaseDir, MESSAGE));
      commit.setAuthor(parseAuthor());
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.