public HgCommandResult executeInCurrentThread() throws HgCommandException {
    if (StringUtil.isEmptyOrSpaces(branchName)) {
      throw new HgCommandException("branch name is empty");
    }
    return new HgCommandExecutor(project).executeInCurrentThread(repo, "branch", Collections.singletonList(branchName));
  }
public HgCommandResult executeInCurrentThread()