code: public static boolean sendUpdateMessage(String site2, String repo, String branch, String revision, String comment, String token, String endpoint, String branchPrefix) throws Exception {
      HttpClient client = httpClient();
      
      HttpPost post = new HttpPost(site2 + endpoint);
      addAuthHeader(token, post);
      
      post.addHeader("Content-Type", MediaType.APPLICATION_JSON);
      
      UpdateRequest req = new UpdateRequest();
      
      if(repo != null) {
        req.setRepo(repo);
      }
      
      if(branch != null && isValidBranchName(branch, branchPrefix)) {
        req.setBranch(branch);
      } else if(branch != null) {
        throw new Exception("Branch name must be prefixed with "+branchPrefix+".");
      }
      
      if(revision != null) {
        req.setSha(revision);
      }
      
      req.setComment(comment);
      
      post.setEntity(new StringEntity(new Gson().toJson(req), "UTF-8"));
      
      HttpResponse response = client.execute(post);
      
      if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
        String responseString = EntityUtils.toString(response.getEntity());
        BasicApiResponse resp = new Gson().fromJson(responseString, BasicApiResponse.class);
        if(!"ok".equals(resp.getMessage())) {
          System.err.println("Update message to ["+site2+"] failed. ["+resp.getMessage()+"]");
        } else {
          if(resp.getUuid() != null) {
            HistoryCommand.waitForToken(site2, resp.getUuid(), resp.getTimestamp(), 600000l);
          }
          return true;
        }
      }
      return false;
    }
docs: Sends a update message to a Cadmium site. This method will block until the update is complete.
  
  @param site2 The uri to a Cadmium site.
  @param repo The git repository to tell the site to change to.
  @param branch The branch to switch to.
  @param revision The revision to reset to.
  @param comment The message to record with this event in the history on the Cadmium site.
  @param token The Github API token to authenticate with.
  @param endpoint The endpoint to send the update request to.
  @param branchPrefix The branch prefix for the given update command.
  @return true if successfull or false otherwise.
  @throws Exception