docs: def last_commit():
      """Returns the SHA1 of the last commit."""
      try:
          root = subprocess.check_output(
              ['hg', 'parent', '--template={node}'],
              stderr=subprocess.STDOUT).strip()
          # Convert to unicode first
          return root.decode('utf-8')
      except subprocess.CalledProcessError:
          return None