def METHOD_NAME(self):
    exit_code, stdout, stderr = execute_command_and_capture_output(
        "svnversion")
    if exit_code != 0 or "Unversioned directory" in stdout or "Uncommitted" in stdout:
        raise PyBuilderException("Cannot determine svn revision: svnversion failed or unversioned directory:\n{0}".
                                 format(stderr))
    return stdout.strip().replace("M", "").replace("S", "").replace("P", "").split(":")[0]