Package com.tek42.perforce.process

Examples of com.tek42.perforce.process.Executor.exec()


   * @return The string output of p4 info
   */
  public String info() throws Exception {
    Executor p4 = getExecFactory().newExecutor();
    String cmd[] = { getExecutable(), "info" };
    p4.exec(cmd);
    StringBuilder sb = new StringBuilder();
    String line;
    while((line = p4.getReader().readLine()) != null) {
      sb.append(line + "\n");
    }
View Full Code Here


        for(String cm : cmds) {
          debugCmd += cm + " ";
        }

        // back to our regularly scheduled programming...
        p4.exec(cmds);
        BufferedReader reader = p4.getReader();

        // Maintain a log of what was sent to p4 on std input
        final StringBuilder log = new StringBuilder();
View Full Code Here

      for(String cm : cmd) {
        debugCmd += cm + " ";
      }

      // Perform execution and IO
      p4.exec(cmd);
      BufferedReader reader = p4.getReader();
      String line = null;
      totalLength = 0;
      lines = new ArrayList<String>(1024);
                        TimedStreamCloser timedStreamCloser=null;
View Full Code Here

        for(String cm : cmd) {
            debugCmd += cm + " ";
        }

        // Perform execution and IO
        p4.exec(cmd);

        try
        {
            BufferedReader reader = p4.getReader();
            p4.getWriter().close();
View Full Code Here

        for(String cm : cmd) {
            debugCmd += cm + " ";
        }

        // Perform execution and IO
        p4.exec(cmd);

        try
        {
            byte[] cbuf = new byte[1024];
            InputStream input = p4.getInputStream();
View Full Code Here

     * @throws IOException if an I/O error prevents this from working
     * @throws PerforceException if the execution of the p4Exe fails
     */
    private String p4Login(String p4Exe) throws IOException, PerforceException {
        Executor login = depot.getExecFactory().newExecutor();
        login.exec(new String[] { p4Exe, "login", "-a", "-p" });

        try {
            // "echo" the password for the p4 process to read
            BufferedWriter writer = login.getWriter();
            try {
View Full Code Here

     */
    private void trustIfSSL() throws PerforceException {
        Executor trust = depot.getExecFactory().newExecutor();
        String p4Port = depot.getPort();
        if(p4Port.toLowerCase().startsWith("ssl:")){
            trust.exec(new String[] { getP4Exe(), "-p", depot.getPort(), "trust", "-y" });
            try{
                trust.getWriter().close();
                BufferedReader reader = trust.getReader();
                String line;
                // The line matching ^[0-9A-F]{32}$ will be the ticket
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.