def _push_new_status_branch(gitContext, review_branch, status, revision_id):
    clone = gitContext.clone
    remote = gitContext.remote

    if revision_id is None:
        revision_id = "none"
    else:
        revision_id = str(revision_id)

    working_branch_name = abdt_naming.makeWorkingBranchName(
        status,
        review_branch.description,
        review_branch.base,
        revision_id)

    working_branch = abdt_naming.makeWorkingBranchFromName(
        working_branch_name)

    working_branch = abdt_gittypes.makeGitWorkingBranch(
        working_branch, gitContext.remote)

    phlgit_push.push_asymmetrical_force(
        clone,
        phlgitu_ref.make_remote(review_branch.branch, remote),
        phlgitu_ref.make_local(working_branch_name),
        remote)

    return working_branch
def makeGitWorkingBranchFromParts(
        status, description, base, review_id, remote):
    """Return a GitReviewBranch based on the supplied parts."""
    working_branch = abdt_naming.makeWorkingBranchName(
        base=base,
        status=status,
        description=description,
        review_id=review_id)
    working_branch = abdt_naming.makeWorkingBranchFromName(working_branch)
    working_branch = makeGitWorkingBranch(working_branch, remote)
    return working_branch
def makeWorkingBranchWithStatus(working_branch, status):
    """Return an abdcmd_default__GitWorkingBranch based on branch and status.

    :working_branch: an abdcmd_default__GitWorkingBranch to base on
    :status: the new string status
    :returns: an abdcmd_default__GitWorkingBranch

    """
    remote = working_branch.remote
    working_branch = abdt_naming.makeWorkingBranchName(
        base=working_branch.base,
        status=status,
        description=working_branch.description,
        review_id=working_branch.id)
    working_branch = abdt_naming.makeWorkingBranchFromName(working_branch)
    working_branch = makeGitWorkingBranch(working_branch, remote)
    return working_branch