Mix.SCM.lock_status

You're seeing just the callback lock_status, go back to Mix.SCM module for more information.

Specs

lock_status(opts()) :: :mismatch | :outdated | :ok

This behaviour function checks the status of the lock. In particular, it checks if the revision stored in the lock is the same as the repository it is currently in.

It may return:

  • :mismatch - if the lock doesn't match and we need to simply move to the latest lock

  • :outdated - the repository options are outdated in the lock and we need to trigger a full update

  • :ok - everything is fine

The lock is sent via opts[:lock] but it may not always be available. In such cases, if the SCM requires a lock, it must return :mismatch, otherwise simply :ok.

Note the lock may also belong to another SCM and as such, an structural check is required. A structural mismatch should always return :outdated.