Package com.google.gerrit.reviewdb.client.Project

Examples of com.google.gerrit.reviewdb.client.Project.NameKey


        }
      }
      if (projectName != null) {
        if (filePath == null)
          filePath = "";
        NameKey projName = NameKey.parse(projectName);
       
        ProjectControl control;
        try {
          control = projControlFactory.controlFor(projName);
          if (!control.isVisible()) {
View Full Code Here


        } else {
          filePath = java.net.URLDecoder.decode(filePath, "UTF-8");
        }
      }
      if (projectName != null) {
        NameKey projName = NameKey.parse(projectName);
        ProjectControl control;
        try {
          control = projControlFactory.controlFor(projName);
          if (!control.isVisible()) {
            log.debug("Project not visible!");
            resp.sendError(HttpServletResponse.SC_UNAUTHORIZED, "You need to be logged in to see private projects");
            return;
          }
        } catch (NoSuchProjectException e1) {
          resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "No such project exists.");
        }
      }
      if (projectName == null || refName == null || filePath == null) {
        resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "You need to provide a projectName, refName and filePath.");
        return;
      } else {
        NameKey projName = NameKey.parse(projectName);
        Repository repo = repoManager.openRepository(projName);
        Ref head = repo.getRef(refName);
        RevWalk walk = new RevWalk(repo);
        RevCommit commit = walk.parseCommit(head.getObjectId());
        RevTree tree = commit.getTree();
View Full Code Here

TOP

Related Classes of com.google.gerrit.reviewdb.client.Project.NameKey

Copyright © 2018 www.massapicom. 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.