def checkout_deploy_branch(deploy_branch, canpush=True):
<EOL>create_deploy_branch(deploy_branch, push=canpush)<EOL>remote_branch = "<STR_LIT>".format(deploy_branch)<EOL>print("<STR_LIT>", remote_branch)<EOL>clear_working_branch()<EOL>if run(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', remote_branch], exit=False) == <NUM_LIT:0>:<EOL><INDENT>extra_args = ['<STR_LIT>', remote_branch]<EOL><DEDENT>else:<EOL><INDENT>extra_args = []<EOL><DEDENT>run(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', DOCTR_WORKING_BRANCH] + extra_args)<EOL>print("<STR_LIT>")<EOL>return canpush<EOL>
Checkout the deploy branch, creating it if it doesn't exist.