pub struct VcsIntegration {
pub repo_dir: PathBuf,
pub vcs_type: VcsType,
}Expand description
Version control system integration.
Fields§
§repo_dir: PathBufThe base directory of the repository.
vcs_type: VcsTypeThe detected version control system type.
Implementations§
Source§impl VcsIntegration
impl VcsIntegration
Sourcepub fn detect_vcs(repo_dir: &Path) -> VcsType
pub fn detect_vcs(repo_dir: &Path) -> VcsType
Detects the version control system type in the given directory.
Sourcepub fn get_vcs_type(&self) -> VcsType
pub fn get_vcs_type(&self) -> VcsType
Gets the detected version control system type.
Sourcepub fn is_git_repo(&self) -> bool
pub fn is_git_repo(&self) -> bool
Checks if the directory is a git repository.
Sourcepub fn is_svn_repo(&self) -> bool
pub fn is_svn_repo(&self) -> bool
Checks if the directory is an SVN repository.
Sourcepub fn is_hg_repo(&self) -> bool
pub fn is_hg_repo(&self) -> bool
Checks if the directory is a Mercurial repository.
Sourcepub fn get_current_branch(&self) -> Result<String>
pub fn get_current_branch(&self) -> Result<String>
Gets the current branch for the detected VCS.
Sourcepub fn get_git_branch(&self) -> Result<String>
pub fn get_git_branch(&self) -> Result<String>
Gets the current git branch.
Sourcepub fn get_svn_branch(&self) -> Result<String>
pub fn get_svn_branch(&self) -> Result<String>
Gets the current SVN branch.
Sourcepub fn get_hg_branch(&self) -> Result<String>
pub fn get_hg_branch(&self) -> Result<String>
Gets the current Mercurial branch.
Sourcepub fn get_latest_commit(&self) -> Result<String>
pub fn get_latest_commit(&self) -> Result<String>
Gets the latest commit hash for the detected VCS.
Sourcepub fn get_git_commit(&self) -> Result<String>
pub fn get_git_commit(&self) -> Result<String>
Gets the latest git commit hash.
Sourcepub fn get_svn_commit(&self) -> Result<String>
pub fn get_svn_commit(&self) -> Result<String>
Gets the latest SVN revision.
Sourcepub fn get_hg_commit(&self) -> Result<String>
pub fn get_hg_commit(&self) -> Result<String>
Gets the latest Mercurial commit hash.
Sourcepub fn get_status(&self) -> Result<String>
pub fn get_status(&self) -> Result<String>
Gets the status for the detected VCS.
Sourcepub fn get_git_status(&self) -> Result<String>
pub fn get_git_status(&self) -> Result<String>
Gets the git status.
Sourcepub fn get_svn_status(&self) -> Result<String>
pub fn get_svn_status(&self) -> Result<String>
Gets the SVN status.
Sourcepub fn get_hg_status(&self) -> Result<String>
pub fn get_hg_status(&self) -> Result<String>
Gets the Mercurial status.
Sourcepub fn generate_change_summary(&self) -> Result<String>
pub fn generate_change_summary(&self) -> Result<String>
Generates a change summary for the detected VCS.
Sourcepub fn generate_git_change_summary(&self) -> Result<String>
pub fn generate_git_change_summary(&self) -> Result<String>
Generates a change summary from git.
Sourcepub fn generate_svn_change_summary(&self) -> Result<String>
pub fn generate_svn_change_summary(&self) -> Result<String>
Generates a change summary from SVN.
Sourcepub fn generate_hg_change_summary(&self) -> Result<String>
pub fn generate_hg_change_summary(&self) -> Result<String>
Generates a change summary from Mercurial.