def _get_remote_branch(self):
        """Return the remote branch assoicated with this repository.

        If the remote branch is not defined, the parent branch of the
        repository is returned.
        """
        remote = getattr(self.options, 'tracking', None)

        if not remote:
            try:
                remote = self._remote_path[0]
            except __HOLE__:
                remote = None

        if not remote:
            die('Could not determine remote branch to use for diff creation. '
                'Specify --tracking-branch to continue.')

        return remote
dataset/ETHPy150Open reviewboard/rbtools/rbtools/clients/mercurial.py/MercurialClient._get_remote_branch