def get_tracking_branch(self):
try:<EOL><INDENT>remote_uri = self.git("<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>")[<NUM_LIT:0>]<EOL>return remote_uri.split('<STR_LIT:/>', <NUM_LIT:1>)<EOL><DEDENT>except Exception as e:<EOL><INDENT>errmsg = str(e).lower()<EOL>if ("<STR_LIT>" not in errmsg<EOL>and "<STR_LIT>" not in errmsg):<EOL><INDENT>raise e<EOL><DEDENT><DEDENT>return (None, None)<EOL>
Returns (remote, branch) tuple, or None,None if there is no remote.