code: public static long getBranchRevision(String branch, String baseUrl) throws IOException {
          CommandLine cmdLine = new CommandLine(SVN_CMD);
          cmdLine.addArgument(CMD_LOG);
          cmdLine.addArgument(OPT_XML);
          addDefaultArguments(cmdLine, null, null);
          cmdLine.addArgument("-v");
          cmdLine.addArgument("-r0:HEAD");
          cmdLine.addArgument("--stop-on-copy");
          cmdLine.addArgument("--limit");
          cmdLine.addArgument("1");
          cmdLine.addArgument(baseUrl + branch);
  
          try (InputStream inStr = ExecutionHelper.getCommandResult(cmdLine, new File("."), 0, 120000)) {
              String xml = IOUtils.toString(inStr, "UTF-8");
              log.info("XML:\n" + xml);
  
              // read the revision
              Matcher matcher = Pattern.compile("copyfrom-rev=\"([0-9]+)\"").matcher(xml);
              if (!matcher.find()) {
                  throw new IOException("Could not find copyfrom-rev entry in xml: " + xml);
              }
  
              log.info("Found copyfrom-rev: " + matcher.group(1));
              return Long.parseLong(matcher.group(1));
          }
      }
docs: Return the revision from which the branch was branched off.
  
  @param branch The name of the branch including the path to the branch, e.g. branches/4.2.x
  @param baseUrl       The SVN url to connect to
  @return The revision where the branch was branched off from it's parent branch.
  @throws IOException Execution of the SVN sub-process failed or the
  sub-process returned a exit value indicating a failure