def ensure_remote_branch_is_tracked(branch):
if branch == MASTER_BRANCH:<EOL><INDENT>return<EOL><DEDENT>output = subprocess.check_output(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>'])<EOL>for line in output.split('<STR_LIT:\n>'):<EOL><INDENT>if line.strip() == branch:<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>sys.stdout.write(subprocess.check_output(<EOL>['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>' % branch]))<EOL><DEDENT>except subprocess.CalledProcessError:<EOL><INDENT>raise SystemExit(<NUM_LIT:1>)<EOL><DEDENT><DEDENT>
Track the specified remote branch if it is not already tracked.