Open an existing repository in read-only mode. This method opens the repository without acquiring a write lock on the database, allowing concurrent read access from multiple processes. It's suitable for read-only operations like `status`, `diff`, `log`, and `change`. Use this method when you only need to query the repository state and don't need to make any modifications. This is especially usef
(path: P)
| 831 | /// Merging a legacy layout needs one writable open, exactly like a redb |
| 832 | /// format upgrade; afterwards the database is reopened read-only. |
| 833 | pub fn open_readonly<P: AsRef<Path>>(path: P) -> Result<Self, RepositoryError> { |
| 834 | Self::wait_for_database(DEFAULT_DATABASE_WAIT, || { |
| 835 | Self::open_readonly_mode(path.as_ref(), false, false) |
| 836 | }) |
| 837 | } |
| 838 | |
| 839 | /// Open read-only for operation-log diagnosis without performing recovery. |
| 840 | /// |