code: def log_iter(self, maxentries=None, template=None, **kwargs):
          
          # op = self.sh((
          #   "hg log %s --template"
          #   % (maxentries and ('-l%d' % maxentries) or '')),
          #   ignore_error=True
          # )
          template = str(template or self.template)
          op = self.log(n=maxentries, template=template, **kwargs)
          if not op:
              return
          print(op)
          for l in itersplit(op, self.lsep):
              l = l.strip()
              if not l:
                  continue
              try:
                  yield self._parselog(l,)
              except Exception:
                  log.error("%s %r" % (str(self), l))
                  raise
          return
docs: Run the repository log command, parse, and yield log tuples
  
          Yields:
              tuple: self._tuple