Implement command to lock a repo to avoid push.

First implementation attempts by copy the `lock` command
and addapt it.

Already done:
  - adjust the usage text
  - adjust the opts dispatching
  - introduce constants
  - remove unnecessary functions/code
  - rename functions