def branch(self):
        if self.configDir:
            branch_file = os.path.join(self.configDir, 'branch')
            try:
                with open(branch_file, 'r', encoding='utf-8') as fh:
                    return u(fh.readline().strip().rsplit('/', 1)[-1])
            except UnicodeDecodeError:  # pragma: nocover
                try:
                    with open(branch_file, 'r', encoding=sys.getfilesystemencoding()) as fh:
                        return u(fh.readline().strip().rsplit('/', 1)[-1])
                except:
                    log.traceback()
            except __HOLE__:  # pragma: nocover
                log.traceback()
        return u('default')
dataset/ETHPy150Open wakatime/komodo-wakatime/components/wakatime/projects/mercurial.py/Mercurial.branch