Package org.eclipse.orion.server.git.objects

Examples of org.eclipse.orion.server.git.objects.RemoteBranch


        try {
          db = repositoryForPath(request, new Path(resource.getPath()));
          URI cloneLocation = BaseToCloneConverter.getCloneLocation(resource, BaseToCloneConverter.FILE);
          String branch = db == null ? null : db.getBranch();
          Remote defaultRemote = db == null ? null : new Remote(cloneLocation, db, Constants.DEFAULT_REMOTE_NAME);
          RemoteBranch defaultRemoteBranch = db == null ? null : new RemoteBranch(cloneLocation, db, defaultRemote, branch);
          addGitLinks(request, resource, representation, cloneLocation, db, defaultRemoteBranch, branch);

          JSONArray children = representation.optJSONArray(ProtocolConstants.KEY_CHILDREN);
          if (children != null) {
            for (int i = 0; i < children.length(); i++) {
View Full Code Here


      db = repositoryForPath(request, new Path(location.getPath()));
      if (db != null) {
        URI cloneLocation = BaseToCloneConverter.getCloneLocation(location, BaseToCloneConverter.FILE);
        String branch = db.getBranch();
        Remote defaultRemote = new Remote(cloneLocation, db, Constants.DEFAULT_REMOTE_NAME);
        RemoteBranch defaultRemoteBranch = new RemoteBranch(cloneLocation, db, defaultRemote, branch);
        addGitLinks(request, location, representation, cloneLocation, db, defaultRemoteBranch, branch);
      }
    } finally {
      if (db != null) {
        db.close();
View Full Code Here

      URI cloneLocation = BaseToCloneConverter.getCloneLocation(getURI(request), BaseToCloneConverter.REMOTE_BRANCH);
      Repository db = null;
      try {
        db = FileRepositoryBuilder.create(gitDir);
        Remote remote = new Remote(cloneLocation, db, p.segment(0));
        RemoteBranch remoteBranch = new RemoteBranch(cloneLocation, db, remote, GitUtils.decode(p.segment(1)));
        if (remoteBranch.exists()) {
          JSONObject result = remoteBranch.toJSON();
          OrionServlet.writeJSONResponse(request, response, result, JsonURIUnqualificationStrategy.ALL_NO_GIT);
          return true;
        }
      } finally {
        if (db != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.orion.server.git.objects.RemoteBranch

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.