Skip to main content

PerforceAdapter

Struct PerforceAdapter 

Source
pub struct PerforceAdapter { /* private fields */ }
Expand description

Perforce/Helix Core adapter implementing changelist-based workflow.

Status: UNTESTED — needs validation by a Perforce user.

Implementations§

Source§

impl PerforceAdapter

Source

pub fn new(work_dir: impl Into<PathBuf>) -> Self

Source

pub fn detect(project_root: &Path) -> bool

Auto-detect whether this is a Perforce workspace.

Trait Implementations§

Source§

impl SourceAdapter for PerforceAdapter

Source§

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>

Commit the approved changes from staging Read more
Source§

fn push(&self, _goal: &GoalRun) -> Result<PushResult>

Push the committed changes Read more
Source§

fn open_review( &self, goal: &GoalRun, _pr: &DraftPackage, ) -> Result<ReviewResult>

Open a review request Read more
Source§

fn sync_upstream(&self) -> Result<SyncResult>

Sync the local workspace with upstream changes. Read more
Source§

fn name(&self) -> &str

Adapter display name (for CLI output)
Source§

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>>

Save working state before apply operations. Read more
Source§

fn restore_state(&self, state: Option<SavedVcsState>) -> Result<()>

Restore working state after apply operations. Read more
Source§

fn revision_id(&self) -> Result<String>

Get the current revision identifier for the working directory. Read more
Source§

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<()>

Assert the post-prepare() invariant: the adapter must not be positioned to commit directly to a protected target (§15). Read more
Source§

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>

Merge a review/PR into the target branch and sync the local workspace. Read more
Source§

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
Source§

fn current_branch(&self) -> Result<String>

Get the current branch or workspace name. Read more
Source§

fn detect(project_root: &Path) -> bool
where Self: Sized,

Auto-detect whether this adapter applies to the given project root. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more