Skip to content

GitLab branches state: exposing with cache and missing marker

This is the bare minimum needed so that downstream users such as HGitaly can leverage it.

The final version should probably become a property on the repo instance, but that will require actually more work, because it's not immediately clear if the standard Mercurial tooling applies well in this quite special case, namely:

  • we don't want any invalidation to occur before the explicit write at the end of transaction, for consistency reasons: the very mission of the state file is to represent the state at the beginning of transaction.
  • we're working under the assumption that all writes to the repository will update the state file. This is true, yet very specific to the Heptapod server environment.

It's fine for read_gitlab_branches to raise FileNotFoundException. Will have to see for other exceptions though.

Merge request reports