code: def bookmarks(self):
          
          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
docs: Get list of bookmarks