wxString GetLockHolder() const
Get information about who currently holds the lock.
HISTORY_LOCK_MANAGER(const wxString &aProjectPath, int aStaleTimeoutSec=0)
Construct a lock manager and attempt to acquire locks.
git_repository * GetRepository()
Get the git repository handle (only valid if IsLocked() returns true).
~HISTORY_LOCK_MANAGER()
Destructor releases all locks and closes git repository.
wxString GetLockError() const
Get error message describing why lock could not be acquired.
git_index * GetIndex()
Get the git index handle (only valid if IsLocked() returns true).
static bool BreakStaleLock(const wxString &aProjectPath)
Forcibly remove a stale lock file.
HISTORY_LOCK_MANAGER(const HISTORY_LOCK_MANAGER &)=delete
std::unique_ptr< LOCKFILE > m_fileLock
static bool IsLockStale(const wxString &aProjectPath, int aStaleTimeoutSec=0)
Check if a lock file exists and is stale (older than timeout).
HISTORY_LOCK_MANAGER & operator=(const HISTORY_LOCK_MANAGER &)=delete
bool IsLocked() const
Check if locks were successfully acquired.