|
|
| MockRepositoryManager (std::shared_ptr< svcs::services::ISubject > bus) |
|
| MockRepositoryManager (std::shared_ptr< svcs::services::ISubject > bus, const std::string &path) |
|
bool | isInitialized () const |
|
std::filesystem::path | getRepositoryPath () const |
|
void | setupTestObjects () |
| | RepositoryManager (std::shared_ptr< ISubject > bus) |
| | Constructs a RepositoryManager.
|
| void | updateHead (const std::string &commit_hash) const |
| | Updates HEAD reference.
|
| bool | initializeRepository (const std::string &path, bool force=false) |
| | Initializes a new SVCS repository in the specified path.
|
| bool | isRepositoryInitialized (const std::string &path=".") |
| | Checks if a SVCS repository is initialized in the given path or its parents.
|
| void | updateBranchReference (const std::string &branchName, const std::string &commitHash) const |
| | Updates branch reference file with commit hash.
|
| std::filesystem::path | getRepositoryPath () const |
| | Returns the determined root path of the currently active repository.
|
| bool | addFileToStaging (const std::string &filePath) |
| | Attempts to add a file to the staging area (index).
|
| std::string | getHeadCommit () const |
| | Retrieves the hash of the current HEAD commit in the repository.
|
| std::string | createCommit (const std::string &message) |
| | Creates a commit from the currently staged files.
|
| void | updateCommitReferences (const std::string &removedCommitHash, const std::string &newParentHash) const |
| | Updates commit references when a commit is removed.
|
| bool | revertCommit (const std::string &commit_hash) |
| | Reverts the repository state to a previous commit.
|
| std::optional< CommitInfo > | getCommitByHash (const std::string &commit_hash) const |
| | Retrieves the CommitInfo structure for a given commit hash.
|
| std::string | getParentCommitHash (const std::string &commit_hash) const |
| | Retrieves the hash of the parent commit for a given commit.
|
| bool | restoreFilesFromCommit (const CommitInfo &commit) const |
| | Restores the working directory files to the state recorded in a specific commit.
|
| bool | clearStagingArea () |
| | Clears the contents of the staging area (index).
|
| bool | saveStagedChanges (const std::string &message) |
| | Creates a commit from staged changes. (Convenience method often used by the SaveCommand).
|
| std::vector< std::string > | getStagedFiles () |
| | Retrieves a list of all files currently marked as staged (indexed).
|
| std::vector< CommitInfo > | getCommitHistory () const |
| | Retrieves the complete commit history for the current branch.
|
| std::vector< CommitInfo > | getBranchHistory (const std::string &branch_name) const |
| | Retrieves the commit history for a specific branch.
|
| std::string | getCurrentBranch () const |
| | Gets the current branch name.
|
| bool | removeRepository (const std::filesystem::path &path) const |
| | Attempts to recursively remove the entire SVCS repository structure (e.g., the .svcs directory) and its contents.
|
| bool | branchExists (const std::string &branch_name) const |
| | Checks if a branch exists.
|
| std::string | getBranchHead (const std::string &branch_name) const |
| | Gets the head commit of a branch.
|
| std::string | getFileContentAtCommit (const std::string &commit_hash, const std::string &file_path) const |
| | Gets the content of a file at a specific commit.
|
| std::vector< std::string > | getCommitFiles (const std::string &commit_hash) const |
| | Gets all files changed in a commit.
|
| void | setMergeState (const std::string &branch_name, const std::string &commit_hash) const |
| | Sets merge state (for conflict resolution).
|
|
void | clearMergeState () const |
| | Clears merge state (after merge completion/abort).
|
| bool | isMergeInProgress () const |
| | Checks if a merge is in progress.
|
| std::string | getMergeBranch () const |
| | Gets the branch being merged.
|