pub struct ExternalVcsAdapter { /* private fields */ }Expand description
SourceAdapter that delegates all operations to an external plugin process.
Implementations§
Source§impl ExternalVcsAdapter
impl ExternalVcsAdapter
Sourcepub fn new(
manifest: &VcsPluginManifest,
work_dir: impl Into<PathBuf>,
ta_version: &str,
) -> Result<Self>
pub fn new( manifest: &VcsPluginManifest, work_dir: impl Into<PathBuf>, ta_version: &str, ) -> Result<Self>
Create a new adapter and perform the initial handshake.
Returns SubmitError::ConfigError if the plugin is not found,
the handshake fails, or protocol versions are incompatible.
Sourcepub fn detect_with_plugin(
manifest: &VcsPluginManifest,
project_root: &Path,
ta_version: &str,
) -> bool
pub fn detect_with_plugin( manifest: &VcsPluginManifest, project_root: &Path, ta_version: &str, ) -> bool
Auto-detect using the plugin’s detect method.
Trait Implementations§
Source§impl Debug for ExternalVcsAdapter
impl Debug for ExternalVcsAdapter
Source§impl SourceAdapter for ExternalVcsAdapter
impl SourceAdapter for ExternalVcsAdapter
Source§fn prepare(&self, goal: &GoalRun, config: &SubmitConfig) -> Result<()>
fn prepare(&self, goal: &GoalRun, config: &SubmitConfig) -> Result<()>
Create a working branch/changelist/workspace for this goal Read more
Source§fn commit(
&self,
goal: &GoalRun,
pr: &DraftPackage,
message: &str,
) -> Result<CommitResult>
fn commit( &self, goal: &GoalRun, pr: &DraftPackage, message: &str, ) -> Result<CommitResult>
Commit the approved changes from staging Read more
Source§fn open_review(&self, goal: &GoalRun, pr: &DraftPackage) -> Result<ReviewResult>
fn open_review(&self, goal: &GoalRun, pr: &DraftPackage) -> Result<ReviewResult>
Open a review request Read more
Source§fn sync_upstream(&self) -> Result<SyncResult>
fn sync_upstream(&self) -> Result<SyncResult>
Sync the local workspace with upstream changes. Read more
Source§fn exclude_patterns(&self) -> Vec<String>
fn exclude_patterns(&self) -> Vec<String>
Patterns to exclude from staging copy (VCS metadata dirs, etc.) Read more
Source§fn save_state(&self) -> Result<Option<SavedVcsState>>
fn save_state(&self) -> Result<Option<SavedVcsState>>
Save working state before apply operations. Read more
Source§fn restore_state(&self, state: Option<SavedVcsState>) -> Result<()>
fn restore_state(&self, state: Option<SavedVcsState>) -> Result<()>
Restore working state after apply operations. Read more
Source§fn revision_id(&self) -> Result<String>
fn revision_id(&self) -> Result<String>
Get the current revision identifier for the working directory. Read more
Source§fn check_review(&self, review_id: &str) -> Result<Option<ReviewStatus>>
fn check_review(&self, review_id: &str) -> Result<Option<ReviewStatus>>
Check the status of a review/PR by its review ID (e.g., PR number). Read more
Source§fn merge_review(&self, review_id: &str) -> Result<MergeResult>
fn merge_review(&self, review_id: &str) -> Result<MergeResult>
Merge a review/PR into the target branch and sync the local workspace. Read more
Source§fn protected_submit_targets(&self) -> Vec<String>
fn protected_submit_targets(&self) -> Vec<String>
Protected submit targets for this adapter (§15 VCS Submit Invariant). Read more
Source§fn verify_not_on_protected_target(&self) -> Result<()>
fn verify_not_on_protected_target(&self) -> Result<()>
Assert the post-
prepare() invariant: the adapter must not be
positioned to commit directly to a protected target (§15). Read moreSource§fn stage_env(
&self,
_staging_dir: &Path,
_config: &VcsAgentConfig,
) -> Result<HashMap<String, String>>
fn stage_env( &self, _staging_dir: &Path, _config: &VcsAgentConfig, ) -> Result<HashMap<String, String>>
Produce environment variables to inject into the agent process so it
operates on the staging directory instead of the developer’s real VCS
workspace (v0.13.17.3). Read more
Auto Trait Implementations§
impl Freeze for ExternalVcsAdapter
impl RefUnwindSafe for ExternalVcsAdapter
impl Send for ExternalVcsAdapter
impl Sync for ExternalVcsAdapter
impl Unpin for ExternalVcsAdapter
impl UnsafeUnpin for ExternalVcsAdapter
impl UnwindSafe for ExternalVcsAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more