old_contents: """Repository rule to setup the external MLIR repository."""
  
  _MLIR_REV = "510870483fa9f897db59c59a983c6774fb522197"
  _MLIR_SHA256 = "eda40ec8cfb9de60f6ab7165aa722e8b82d7c83bb6d256ac176e37d3bed5d412"
  
  def _mlir_autoconf_impl(repository_ctx):
      """Implementation of the mlir_configure repository rule."""
      repository_ctx.download_and_extract(
          [
              "http://mirror.tensorflow.org/github.com/tensorflow/mlir/archive/{}.zip".format(_MLIR_REV),
              "https://github.com/tensorflow/mlir/archive/{}.zip".format(_MLIR_REV),
          ],
          sha256 = _MLIR_SHA256,
          stripPrefix = "mlir-{}".format(_MLIR_REV),
      )
  
      # Merge the checked-in BUILD files into the downloaded repo.
      for file in ["BUILD", "tblgen.bzl", "test/BUILD"]:
          repository_ctx.template(file, Label("//third_party/mlir:" + file))
  
  mlir_configure = repository_rule(
      implementation = _mlir_autoconf_impl,
  )
  """Configures the MLIR repository.
  
  Add the following to your WORKSPACE FILE:
  
  ```python
  mlir_configure(name = "local_config_mlir")
  ```
  
  Args:
    name: A unique name for this workspace rule.
  """
  
new_contents: """Repository rule to setup the external MLIR repository."""
  
  _MLIR_REV = "5f2159dab14169f8878d76d42a9367866c1b8d8d"
  _MLIR_SHA256 = "c1d429d53dda2e38fd24ac895b6395965c53d9b6e3a29e20fa86e73005a3a86e"
  
  def _mlir_autoconf_impl(repository_ctx):
      """Implementation of the mlir_configure repository rule."""
      repository_ctx.download_and_extract(
          [
              "http://mirror.tensorflow.org/github.com/tensorflow/mlir/archive/{}.zip".format(_MLIR_REV),
              "https://github.com/tensorflow/mlir/archive/{}.zip".format(_MLIR_REV),
          ],
          sha256 = _MLIR_SHA256,
          stripPrefix = "mlir-{}".format(_MLIR_REV),
      )
  
      # Merge the checked-in BUILD files into the downloaded repo.
      for file in ["BUILD", "tblgen.bzl", "test/BUILD"]:
          repository_ctx.template(file, Label("//third_party/mlir:" + file))
  
  mlir_configure = repository_rule(
      implementation = _mlir_autoconf_impl,
  )
  """Configures the MLIR repository.
  
  Add the following to your WORKSPACE FILE:
  
  ```python
  mlir_configure(name = "local_config_mlir")
  ```
  
  Args:
    name: A unique name for this workspace rule.
  """
  
subject: Update MLIR rev.