|
KiCad PCB EDA Suite
|
Simple local history manager built on libgit2. More...
#include <local_history.h>
Classes | |
| struct | SAVER_ENTRY |
Public Member Functions | |
| LOCAL_HISTORY () | |
| ~LOCAL_HISTORY () | |
| bool | Init (const wxString &aProjectPath) |
| Initialize the local history repository for the given project path. | |
| bool | CommitSnapshot (const std::vector< wxString > &aFiles, const wxString &aTitle) |
| Commit the given files to the local history repository. | |
| bool | CommitFullProjectSnapshot (const wxString &aProjectPath, const wxString &aTitle) |
| Commit a snapshot of the entire project directory (excluding the .history directory and ignored transient files) to the local history repository. | |
| void | RegisterSaver (const void *aSaverObject, const std::function< void(const wxString &, std::vector< HISTORY_FILE_DATA > &)> &aSaver, const std::weak_ptr< void > &aLifetime={}) |
| Register a saver callback invoked during autosave history commits. | |
| void | UnregisterSaver (const void *aSaverObject) |
| Unregister a previously registered saver callback. | |
| void | ClearAllSavers () |
| Clear all registered savers. | |
| bool | RunRegisteredSaversAndCommit (const wxString &aProjectPath, const wxString &aTitle, const wxString &aTagFileType=wxEmptyString) |
| Run all registered savers and, if any staged changes differ from HEAD, create a commit. | |
| bool | RunRegisteredSaversAsAutosaveFiles (const wxString &aProjectPath) |
| Run all registered savers and write their output to autosave files instead of committing to the local history repository. | |
| std::vector< std::pair< wxString, wxString > > | FindStaleAutosaveFiles (const wxString &aProjectPath, const std::vector< wxString > &aExtensions) const |
Enumerate autosave files newer than their corresponding source files for the project at aProjectPath, restricted to sources whose extension is in aExtensions. | |
| void | RemoveAutosaveFiles (const wxString &aProjectPath) const |
Remove every autosave file under the project at aProjectPath regardless of which source it shadowed. | |
| void | RemoveAutosaveFiles (const wxString &aProjectPath, const std::vector< wxString > &aSourcePaths) const |
Remove only the autosave files corresponding to aSourcePaths. | |
| void | NoteFileChange (const wxString &aFile) |
| Record that a file has been modified and should be included in the next snapshot. | |
| bool | CommitPending () |
| Commit any pending modified files to the history repository. | |
| bool | HistoryExists (const wxString &aProjectPath) |
| Return true if history exists for the project. | |
| bool | TagSave (const wxString &aProjectPath, const wxString &aFileType) |
| Tag a manual save in the local history repository. | |
| bool | CommitDuplicateOfLastSave (const wxString &aProjectPath, const wxString &aFileType, const wxString &aMessage) |
| Create a new commit duplicating the tree pointed to by Last_Save_<fileType> and move the Last_Save_<fileType> tag to the new commit (used when user discards changes). | |
| bool | EnforceSizeLimit (const wxString &aProjectPath, size_t aMaxBytes, PROGRESS_REPORTER *aReporter=nullptr) |
| Enforce total size limit by rebuilding trimmed history keeping newest commits whose cumulative unique blob sizes fit within limit. | |
| bool | HeadNewerThanLastSave (const wxString &aProjectPath) |
| Return true if the autosave data is newer than the last manual save. | |
| wxString | GetHeadHash (const wxString &aProjectPath) |
| Return the current head commit hash. | |
| bool | RestoreCommit (const wxString &aProjectPath, const wxString &aHash, wxWindow *aParent=nullptr, bool aConfirm=true) |
| Restore the project files to the state recorded by the given commit hash. | |
| std::vector< LOCAL_HISTORY_SNAPSHOT_INFO > | GetSnapshots (const wxString &aProjectPath) |
| Snapshots (commits) for the project, newest first. | |
| bool | ExtractAllFilesAtCommit (const wxString &aProjectPath, const wxString &aHash, const wxString &aDestDir, const std::vector< wxString > &aExtensions={}) |
| Write files recorded at aHash into aDestDir, recreating the project's relative folder structure. | |
| wxString | TreeFingerprint (const wxString &aProjectPath, const wxString &aHash, const wxString &aExtension) |
| Fingerprint of all files ending in aExtension recorded by commit aHash (sorted path:blob pairs). | |
| void | ShowRestoreDialog (const wxString &aProjectPath, wxWindow *aParent) |
| Show a dialog allowing the user to choose a snapshot to restore. | |
| void | WaitForPendingSave () |
| Block until any pending background save completes. | |
Static Public Member Functions | |
| static std::vector< std::pair< wxString, wxString > > | CollectAutosaveFilePairs (const wxString &aAutosaveRoot, const wxString &aProjectPath, BACKUP_LOCATION aLocation) |
Enumerate every (autosave, source) pair found under aAutosaveRoot for the project at aProjectPath, honoring aLocation for name resolution. | |
Private Member Functions | |
| std::vector< LOCAL_HISTORY_SNAPSHOT_INFO > | LoadSnapshots (const wxString &aProjectPath) |
| bool | commitInBackground (const wxString &aProjectPath, const wxString &aTitle, const std::vector< HISTORY_FILE_DATA > &aFileData, bool aIsManualSave) |
| Execute file writes and git commit on a background thread. | |
| void | pruneExpiredSavers () |
| Drop tracked savers whose owning document has been freed, before any saver runs. | |
Private Attributes | |
| std::set< wxString > | m_pendingFiles |
| std::map< const void *, SAVER_ENTRY > | m_savers |
| std::atomic< bool > | m_saveInProgress { false } |
| std::future< bool > | m_pendingFuture |
Simple local history manager built on libgit2.
Stores history for project files in a hidden .history git repository within the project directory.
Definition at line 71 of file local_history.h.
| LOCAL_HISTORY::LOCAL_HISTORY | ( | ) |
Definition at line 231 of file local_history.cpp.
| LOCAL_HISTORY::~LOCAL_HISTORY | ( | ) |
Definition at line 235 of file local_history.cpp.
References WaitForPendingSave().
| void LOCAL_HISTORY::ClearAllSavers | ( | ) |
Clear all registered savers.
Definition at line 307 of file local_history.cpp.
References m_savers, traceAutoSave, and WaitForPendingSave().
Referenced by KIWAY::ProjectChanged().
|
static |
Enumerate every (autosave, source) pair found under aAutosaveRoot for the project at aProjectPath, honoring aLocation for name resolution.
The walk terminates on symlink cycles and refuses to follow links out of aAutosaveRoot, so a project directory that contains a root-escape symlink (e.g. a Wine prefix's dosdevices/z: -> /) cannot send it walking the whole filesystem. Exposed as a static entry point so the traversal can be exercised without the settings singleton.
Each entry has: first - autosave file path second - corresponding source path under the project directory
Definition at line 510 of file local_history.cpp.
References AUTOSAVE_PREFIX, DIR_LOOP_GUARD::IsRooted(), name, PROJECT_DIR, DIR_LOOP_GUARD::ShouldDescend(), and sourceForAutosaveFile().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and findAutosaveFilePairs().
| bool LOCAL_HISTORY::CommitDuplicateOfLastSave | ( | const wxString & | aProjectPath, |
| const wxString & | aFileType, | ||
| const wxString & | aMessage ) |
Create a new commit duplicating the tree pointed to by Last_Save_<fileType> and move the Last_Save_<fileType> tag to the new commit (used when user discards changes).
Definition at line 1426 of file local_history.cpp.
References HISTORY_LOCK_MANAGER::GetRepository(), HISTORY_LOCK_MANAGER::IsLocked(), isProjectDirectory(), localHistoryEnabled(), and traceAutoSave.
Referenced by PCB_EDIT_FRAME::canCloseWindow(), and SCH_EDIT_FRAME::canCloseWindow().
| bool LOCAL_HISTORY::CommitFullProjectSnapshot | ( | const wxString & | aProjectPath, |
| const wxString & | aTitle ) |
Commit a snapshot of the entire project directory (excluding the .history directory and ignored transient files) to the local history repository.
This does not modify any document dirty flags; it purely mirrors on-disk state for history purposes.
Definition at line 1288 of file local_history.cpp.
References collectProjectFiles(), commitSnapshotForProject(), Init(), isProjectDirectory(), and localHistoryEnabled().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), KICAD_MANAGER_FRAME::CloseProject(), and KICAD_MANAGER_FRAME::LoadProject().
|
private |
Execute file writes and git commit on a background thread.
Definition at line 678 of file local_history.cpp.
References PATHS::EnsurePathExists(), HISTORY_LOCK_MANAGER::GetIndex(), HISTORY_LOCK_MANAGER::GetLockError(), HISTORY_LOCK_MANAGER::GetRepository(), historyPath(), index, HISTORY_LOCK_MANAGER::IsLocked(), joinHistoryDestination(), KICAD_FORMAT::Prettify(), and traceAutoSave.
| bool LOCAL_HISTORY::CommitPending | ( | ) |
Commit any pending modified files to the history repository.
Definition at line 943 of file local_history.cpp.
References CommitSnapshot(), and m_pendingFiles.
| bool LOCAL_HISTORY::CommitSnapshot | ( | const std::vector< wxString > & | aFiles, |
| const wxString & | aTitle ) |
Commit the given files to the local history repository.
Definition at line 1192 of file local_history.cpp.
References commitSnapshotForProject(), Init(), isProjectDirectory(), and localHistoryEnabled().
Referenced by CommitPending().
| bool LOCAL_HISTORY::EnforceSizeLimit | ( | const wxString & | aProjectPath, |
| size_t | aMaxBytes, | ||
| PROGRESS_REPORTER * | aReporter = nullptr ) |
Enforce total size limit by rebuilding trimmed history keeping newest commits whose cumulative unique blob sizes fit within limit.
Definition at line 1681 of file local_history.cpp.
References _, PROGRESS_REPORTER::AdvancePhase(), compactRepository(), copyTreeObjects(), dirSizeRecursive(), HISTORY_LOCK_MANAGER::GetRepository(), historyPath(), HISTORY_LOCK_MANAGER::IsLocked(), name, HISTORY_LOCK_MANAGER::ReleaseRepository(), PROGRESS_REPORTER::Report(), PROGRESS_REPORTER::SetCurrentProgress(), and traceAutoSave.
Referenced by KICAD_MANAGER_FRAME::CloseProject().
| bool LOCAL_HISTORY::ExtractAllFilesAtCommit | ( | const wxString & | aProjectPath, |
| const wxString & | aHash, | ||
| const wxString & | aDestDir, | ||
| const std::vector< wxString > & | aExtensions = {} ) |
Write files recorded at aHash into aDestDir, recreating the project's relative folder structure.
Used to reconstruct a multi-file document (e.g. a schematic hierarchy) at a commit. When aExtensions is non-empty only files ending in one of them are written, so a compare can skip large unrelated files (3D models, gerbers, the other editor's document).
Definition at line 2618 of file local_history.cpp.
References historyPath(), and name.
Referenced by BOARD_INSPECTION_TOOL::CompareBoardWithHistory(), and SCH_INSPECTION_TOOL::CompareSchematicWithHistory().
| std::vector< std::pair< wxString, wxString > > LOCAL_HISTORY::FindStaleAutosaveFiles | ( | const wxString & | aProjectPath, |
| const std::vector< wxString > & | aExtensions ) const |
Enumerate autosave files newer than their corresponding source files for the project at aProjectPath, restricted to sources whose extension is in aExtensions.
Used by editors at startup to detect crash-recovery candidates for files they own.
Each entry in the returned vector has: first - autosave file path second - corresponding source path under the project directory
Definition at line 582 of file local_history.cpp.
References filesContentEqual(), and findAutosaveFilePairs().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and EDA_BASE_FRAME::CheckForAutosaveFiles().
| wxString LOCAL_HISTORY::GetHeadHash | ( | const wxString & | aProjectPath | ) |
Return the current head commit hash.
Definition at line 2022 of file local_history.cpp.
References historyPath().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and KICAD_MANAGER_FRAME::LoadProject().
| std::vector< LOCAL_HISTORY_SNAPSHOT_INFO > LOCAL_HISTORY::GetSnapshots | ( | const wxString & | aProjectPath | ) |
Snapshots (commits) for the project, newest first.
Definition at line 2545 of file local_history.cpp.
References LoadSnapshots().
Referenced by BOARD_INSPECTION_TOOL::CompareBoardWithHistory(), and SCH_INSPECTION_TOOL::CompareSchematicWithHistory().
| bool LOCAL_HISTORY::HeadNewerThanLastSave | ( | const wxString & | aProjectPath | ) |
Return true if the autosave data is newer than the last manual save.
Definition at line 1371 of file local_history.cpp.
References historyPath().
| bool LOCAL_HISTORY::HistoryExists | ( | const wxString & | aProjectPath | ) |
Return true if history exists for the project.
Definition at line 1303 of file local_history.cpp.
References historyPath().
Referenced by KICAD_MANAGER_FRAME::doReCreateMenuBar(), and ShowRestoreDialog().
| bool LOCAL_HISTORY::Init | ( | const wxString & | aProjectPath | ) |
Initialize the local history repository for the given project path.
Definition at line 951 of file local_history.cpp.
References PATHS::EnsurePathExists(), historyPath(), isProjectDirectory(), and localHistoryEnabled().
Referenced by BOOST_AUTO_TEST_CASE(), CommitFullProjectSnapshot(), CommitSnapshot(), EDA_BASE_FRAME::CommonSettingsChanged(), and RunRegisteredSaversAndCommit().
|
private |
Definition at line 2474 of file local_history.cpp.
References historyPath(), and info.
Referenced by GetSnapshots(), and ShowRestoreDialog().
| void LOCAL_HISTORY::NoteFileChange | ( | const wxString & | aFile | ) |
Record that a file has been modified and should be included in the next snapshot.
Definition at line 240 of file local_history.cpp.
References localHistoryEnabled(), and m_pendingFiles.
Referenced by PCB_EDIT_FRAME::OnModify(), and SCH_EDIT_FRAME::OnModify().
|
private |
Drop tracked savers whose owning document has been freed, before any saver runs.
Definition at line 275 of file local_history.cpp.
References m_savers.
Referenced by RunRegisteredSaversAndCommit(), and RunRegisteredSaversAsAutosaveFiles().
| void LOCAL_HISTORY::RegisterSaver | ( | const void * | aSaverObject, |
| const std::function< void(const wxString &, std::vector< HISTORY_FILE_DATA > &)> & | aSaver, | ||
| const std::weak_ptr< void > & | aLifetime = {} ) |
Register a saver callback invoked during autosave history commits.
The callback receives the project path and should populate aFileData with serialized content or source paths for inclusion.
| aSaverObject | Unique object pointer identifier for this saver (to prevent duplicate registration) |
| aSaver | The saver callback function |
| aLifetime | Optional liveness token owned by the serialized document. When supplied, an expired token makes the saver-runner skip and drop the saver instead of invoking a callback that would dereference a freed document. The autosave timer is shared across editor frames, so a saver can outlive the document it captures unless its lifetime is tracked here. |
Definition at line 251 of file local_history.cpp.
References LOCAL_HISTORY::SAVER_ENTRY::lifetime, m_savers, LOCAL_HISTORY::SAVER_ENTRY::saver, traceAutoSave, and LOCAL_HISTORY::SAVER_ENTRY::tracked.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), KICAD_MANAGER_FRAME::ProjectChanged(), PCB_EDIT_FRAME::ProjectChanged(), and SCH_EDIT_FRAME::ProjectChanged().
| void LOCAL_HISTORY::RemoveAutosaveFiles | ( | const wxString & | aProjectPath | ) | const |
Remove every autosave file under the project at aProjectPath regardless of which source it shadowed.
Used by the project manager to sweep autosaves on project close so nothing is left to prompt on next launch. Manual-save callers should prefer the source-scoped overload below to avoid wiping autosaves for files this save did not actually persist.
Definition at line 627 of file local_history.cpp.
References findAutosaveFilePairs().
Referenced by PCB_EDIT_FRAME::doCloseWindow(), SCH_EDIT_FRAME::doCloseWindow(), PCB_EDIT_FRAME::SavePcbFile(), and SCH_EDIT_FRAME::SaveProject().
| void LOCAL_HISTORY::RemoveAutosaveFiles | ( | const wxString & | aProjectPath, |
| const std::vector< wxString > & | aSourcePaths ) const |
Remove only the autosave files corresponding to aSourcePaths.
Called after a successful manual save so we drop autosaves the save just superseded without touching unsaved siblings (e.g. a PCB save must not erase a dirty schematic sheet's autosave when both editors are open).
Definition at line 640 of file local_history.cpp.
References findAutosaveFilePairs().
| bool LOCAL_HISTORY::RestoreCommit | ( | const wxString & | aProjectPath, |
| const wxString & | aHash, | ||
| wxWindow * | aParent = nullptr, | ||
| bool | aConfirm = true ) |
Restore the project files to the state recorded by the given commit hash.
When aConfirm is true a yes/no prompt is shown before any file is overwritten, callers that have already asked the user (the startup recovery prompt) pass false to avoid a double prompt.
Definition at line 2261 of file local_history.cpp.
References _, collectProjectFiles(), commitSnapshotWithLock(), Error, HISTORY_LOCK_MANAGER::GetIndex(), HISTORY_LOCK_MANAGER::GetRepository(), historyPath(), HISTORY_LOCK_MANAGER::IsLocked(), KICAD_MESSAGE_DIALOG, NoChanges, tagSaveAtHead(), and traceAutoSave.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), KICAD_MANAGER_FRAME::LoadProject(), and ShowRestoreDialog().
| bool LOCAL_HISTORY::RunRegisteredSaversAndCommit | ( | const wxString & | aProjectPath, |
| const wxString & | aTitle, | ||
| const wxString & | aTagFileType = wxEmptyString ) |
Run all registered savers and, if any staged changes differ from HEAD, create a commit.
When aTagFileType is non-empty the new commit is tagged Save_<type>_N (manual save); empty leaves the commit untagged (autosave).
Definition at line 315 of file local_history.cpp.
References Init(), isProjectDirectory(), localHistoryEnabled(), m_saveInProgress, m_savers, pruneExpiredSavers(), traceAutoSave, and WaitForPendingSave().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), EDA_BASE_FRAME::doAutoSave(), PCB_EDIT_FRAME::SavePcbFile(), and SCH_EDIT_FRAME::SaveProject().
| bool LOCAL_HISTORY::RunRegisteredSaversAsAutosaveFiles | ( | const wxString & | aProjectPath | ) |
Run all registered savers and write their output to autosave files instead of committing to the local history repository.
Used when BACKUP_FORMAT::ZIP is selected so the user still has crash recovery without a git store.
Output location follows BACKUP_LOCATION: PROJECT_DIR -> "<projectpath>/<reldir>/_autosave-<basename>" USER_DIR -> "<user_root>/<reldir>/<basename>" (mirroring the project tree)
Files are written via KIPLATFORM::IO::AtomicWriteFile so a crash mid-write cannot leave a half-written autosave on disk.
Definition at line 409 of file local_history.cpp.
References KIPLATFORM::IO::AtomicWriteFile(), PATHS::EnsurePathExists(), SETTINGS_MANAGER::GetAutosaveRootForProject(), SETTINGS_MANAGER::GetCommonSettings(), SETTINGS_MANAGER::GetProjectForPath(), PGM_BASE::GetSettingsManager(), COMMON_SETTINGS::AUTO_BACKUP::location, location, COMMON_SETTINGS::m_Backup, m_savers, Pgm(), KICAD_FORMAT::Prettify(), pruneExpiredSavers(), resolveAutosaveDestination(), and traceAutoSave.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and EDA_BASE_FRAME::doAutoSave().
| void LOCAL_HISTORY::ShowRestoreDialog | ( | const wxString & | aProjectPath, |
| wxWindow * | aParent ) |
Show a dialog allowing the user to choose a snapshot to restore.
Definition at line 2453 of file local_history.cpp.
References DIALOG_RESTORE_LOCAL_HISTORY::GetSelectedHash(), HistoryExists(), LoadSnapshots(), RestoreCommit(), and DIALOG_SHIM::ShowModal().
Referenced by KICAD_MANAGER_FRAME::RestoreLocalHistory().
| bool LOCAL_HISTORY::TagSave | ( | const wxString & | aProjectPath, |
| const wxString & | aFileType ) |
Tag a manual save in the local history repository.
Definition at line 1352 of file local_history.cpp.
References HISTORY_LOCK_MANAGER::GetRepository(), HISTORY_LOCK_MANAGER::IsLocked(), isProjectDirectory(), localHistoryEnabled(), tagSaveAtHead(), and traceAutoSave.
Referenced by BOOST_AUTO_TEST_CASE(), KICAD_MANAGER_FRAME::CloseProject(), and KICAD_MANAGER_FRAME::LoadProject().
| wxString LOCAL_HISTORY::TreeFingerprint | ( | const wxString & | aProjectPath, |
| const wxString & | aHash, | ||
| const wxString & | aExtension ) |
Fingerprint of all files ending in aExtension recorded by commit aHash (sorted path:blob pairs).
Empty when the commit has no such file. Two commits with equal fingerprints hold identical content for that type, so callers can collapse consecutive duplicates into one revision.
Definition at line 2551 of file local_history.cpp.
References historyPath(), name, and path.
Referenced by BOARD_INSPECTION_TOOL::CompareBoardWithHistory(), and SCH_INSPECTION_TOOL::CompareSchematicWithHistory().
| void LOCAL_HISTORY::UnregisterSaver | ( | const void * | aSaverObject | ) |
Unregister a previously registered saver callback.
| aSaverObject | The object pointer that was used to register the saver |
Definition at line 292 of file local_history.cpp.
References m_savers, traceAutoSave, and WaitForPendingSave().
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), KICAD_MANAGER_FRAME::CloseProject(), PCB_EDIT_FRAME::doCloseWindow(), SCH_EDIT_FRAME::doCloseWindow(), PCB_EDIT_FRAME::SetBoard(), SCH_EDIT_FRAME::SetSchematic(), PCB_EDIT_FRAME::~PCB_EDIT_FRAME(), and SCH_EDIT_FRAME::~SCH_EDIT_FRAME().
| void LOCAL_HISTORY::WaitForPendingSave | ( | ) |
Block until any pending background save completes.
Call before reading repo state (HeadNewerThanLastSave / GetHeadHash) at close time so an in-flight autosave can't leave the close path with a stale view of HEAD.
Definition at line 933 of file local_history.cpp.
References m_pendingFuture, and traceAutoSave.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), ClearAllSavers(), KICAD_MANAGER_FRAME::CloseProject(), RunRegisteredSaversAndCommit(), UnregisterSaver(), and ~LOCAL_HISTORY().
|
private |
Definition at line 257 of file local_history.h.
Referenced by CommitPending(), and NoteFileChange().
|
private |
Definition at line 261 of file local_history.h.
Referenced by WaitForPendingSave().
|
private |
Definition at line 260 of file local_history.h.
Referenced by RunRegisteredSaversAndCommit().
|
private |
Definition at line 258 of file local_history.h.
Referenced by ClearAllSavers(), pruneExpiredSavers(), RegisterSaver(), RunRegisteredSaversAndCommit(), RunRegisteredSaversAsAutosaveFiles(), and UnregisterSaver().