def bookmarks(self):
        """Get list of bookmarks"""
        cmd = [HG, 'bookmarks']
        output = self._command(cmd).decode(self.encoding, 'replace')
        if output.startswith('no bookmarks set'):
            return []
        results = []
        for line in output.splitlines():
            m = bookmarks_rx.match(line)
            assert m, 'unexpected output: ' + line
            results.append(m.group('name'))
        return results