Skip to main content

JjAt

Struct JjAt 

Source
pub struct JjAt<'a, R: ProcessRunner = JobRunner> { /* private fields */ }
Expand description

A Jj client with a working directory bound, so calls drop the leading dir argument — jj.at(dir).status() is jj.status(dir). Construct one with Jj::at (or, through the facade, vcs_core::Repo::jj_at). Cheap to copy: it only borrows the client and the path.

Implementations§

Source§

impl<'a, R: ProcessRunner> JjAt<'a, R>

Source

pub async fn run(&self, args: &[String]) -> Result<String>

Bound form of Jj’s run.

Source

pub async fn run_raw(&self, args: &[String]) -> Result<ProcessResult<String>>

Bound form of Jj’s run_raw.

Source

pub async fn run_args(&self, args: &[&str]) -> Result<String>

Bound form of Jj’s run_args.

Source

pub async fn run_raw_args(&self, args: &[&str]) -> Result<ProcessResult<String>>

Bound form of Jj’s run_raw_args.

Source

pub async fn version(&self) -> Result<String>

Bound form of Jj’s version.

Source

pub async fn capabilities(&self) -> Result<JjCapabilities>

Bound form of Jj’s capabilities.

Source

pub async fn git_clone( &self, url: &str, dest: &Path, colocate: bool, ) -> Result<()>

Bound form of Jj’s git_clone.

Source

pub async fn status(&self) -> Result<Vec<ChangedPath>>

Bound form of Jj’s status (with dir pre-bound).

Source

pub async fn status_text(&self) -> Result<String>

Bound form of Jj’s status_text (with dir pre-bound).

Source

pub async fn log(&self, revset: &str, max: usize) -> Result<Vec<Change>>

Bound form of Jj’s log (with dir pre-bound).

Source

pub async fn current_change(&self) -> Result<Change>

Bound form of Jj’s current_change (with dir pre-bound).

Source

pub async fn describe(&self, message: &str) -> Result<()>

Bound form of Jj’s describe (with dir pre-bound).

Source

pub async fn describe_rev(&self, revset: &str, message: &str) -> Result<()>

Bound form of Jj’s describe_rev (with dir pre-bound).

Source

pub async fn new_change(&self, message: &str) -> Result<()>

Bound form of Jj’s new_change (with dir pre-bound).

Source

pub async fn bookmarks(&self) -> Result<Vec<Bookmark>>

Bound form of Jj’s bookmarks (with dir pre-bound).

Source

pub async fn bookmarks_all(&self) -> Result<Vec<BookmarkRef>>

Bound form of Jj’s bookmarks_all (with dir pre-bound).

Source

pub async fn reachable_bookmarks(&self) -> Result<Vec<Bookmark>>

Bound form of Jj’s reachable_bookmarks (with dir pre-bound).

Source

pub async fn bookmark_track(&self, name: &str, remote: &str) -> Result<()>

Bound form of Jj’s bookmark_track (with dir pre-bound).

Source

pub async fn bookmark_set(&self, name: &str, revision: &str) -> Result<()>

Bound form of Jj’s bookmark_set (with dir pre-bound).

Source

pub async fn git_fetch(&self) -> Result<()>

Bound form of Jj’s git_fetch (with dir pre-bound).

Source

pub async fn git_fetch_from(&self, remote: &str) -> Result<()>

Bound form of Jj’s git_fetch_from (with dir pre-bound).

Source

pub async fn git_push(&self, bookmark: Option<String>) -> Result<()>

Bound form of Jj’s git_push (with dir pre-bound).

Source

pub async fn root(&self) -> Result<PathBuf>

Bound form of Jj’s root (with dir pre-bound).

Source

pub async fn current_bookmark(&self) -> Result<Option<String>>

Bound form of Jj’s current_bookmark (with dir pre-bound).

Source

pub async fn trunk(&self) -> Result<Option<String>>

Bound form of Jj’s trunk (with dir pre-bound).

Source

pub async fn bookmark_create(&self, name: &str, revision: &str) -> Result<()>

Bound form of Jj’s bookmark_create (with dir pre-bound).

Source

pub async fn bookmark_rename(&self, old: &str, new: &str) -> Result<()>

Bound form of Jj’s bookmark_rename (with dir pre-bound).

Source

pub async fn bookmark_delete(&self, name: &str) -> Result<()>

Bound form of Jj’s bookmark_delete (with dir pre-bound).

Source

pub async fn bookmark_move( &self, name: &str, to: &str, allow_backwards: bool, ) -> Result<()>

Bound form of Jj’s bookmark_move (with dir pre-bound).

Source

pub async fn diff_summary( &self, from: &str, to: &str, ) -> Result<Vec<ChangedPath>>

Bound form of Jj’s diff_summary (with dir pre-bound).

Source

pub async fn diff_stat(&self, revset: &str) -> Result<DiffStat>

Bound form of Jj’s diff_stat (with dir pre-bound).

Source

pub async fn diff_text(&self, spec: DiffSpec) -> Result<String>

Bound form of Jj’s diff_text (with dir pre-bound).

Source

pub async fn diff(&self, spec: DiffSpec) -> Result<Vec<FileDiff>>

Bound form of Jj’s diff (with dir pre-bound).

Source

pub async fn commit_count(&self, revset: &str) -> Result<usize>

Bound form of Jj’s commit_count (with dir pre-bound).

Source

pub async fn is_conflicted(&self, revset: &str) -> Result<bool>

Bound form of Jj’s is_conflicted (with dir pre-bound).

Source

pub async fn has_workingcopy_conflict(&self) -> Result<bool>

Bound form of Jj’s has_workingcopy_conflict (with dir pre-bound).

Source

pub async fn resolve_list(&self, revset: &str) -> Result<Vec<String>>

Bound form of Jj’s resolve_list (with dir pre-bound).

Source

pub async fn template_query( &self, revset: &str, template: &str, limit: Option<usize>, ) -> Result<String>

Bound form of Jj’s template_query (with dir pre-bound).

Source

pub async fn description(&self, revset: &str) -> Result<String>

Bound form of Jj’s description (with dir pre-bound).

Source

pub async fn evolog(&self, revset: &str, max: usize) -> Result<Vec<Change>>

Bound form of Jj’s evolog (with dir pre-bound).

Source

pub async fn file_annotate( &self, path: &str, revset: Option<String>, ) -> Result<Vec<AnnotationLine>>

Bound form of Jj’s file_annotate (with dir pre-bound).

Source

pub async fn file_show(&self, revset: &str, path: &str) -> Result<String>

Bound form of Jj’s file_show (with dir pre-bound).

Source

pub async fn absorb( &self, from: Option<String>, filesets: &[JjFileset], ) -> Result<()>

Bound form of Jj’s absorb (with dir pre-bound).

Source

pub async fn split_paths( &self, filesets: &[JjFileset], message: &str, ) -> Result<()>

Bound form of Jj’s split_paths (with dir pre-bound).

Source

pub async fn duplicate(&self, revset: &str) -> Result<()>

Bound form of Jj’s duplicate (with dir pre-bound).

Source

pub async fn rebase(&self, onto: &str) -> Result<()>

Bound form of Jj’s rebase (with dir pre-bound).

Source

pub async fn rebase_branch(&self, branch: &str, dest: &str) -> Result<()>

Bound form of Jj’s rebase_branch (with dir pre-bound).

Source

pub async fn edit(&self, revset: &str) -> Result<()>

Bound form of Jj’s edit (with dir pre-bound).

Source

pub async fn squash_into( &self, into: &str, use_destination_message: bool, ) -> Result<()>

Bound form of Jj’s squash_into (with dir pre-bound).

Source

pub async fn commit_paths( &self, filesets: &[JjFileset], message: &str, ) -> Result<()>

Bound form of Jj’s commit_paths (with dir pre-bound).

Source

pub async fn squash_paths(&self, spec: SquashPaths) -> Result<()>

Bound form of Jj’s squash_paths (with dir pre-bound).

Source

pub async fn sparse_set(&self, patterns: &[String]) -> Result<()>

Bound form of Jj’s sparse_set (with dir pre-bound).

Source

pub async fn new_merge(&self, message: &str, parents: Vec<String>) -> Result<()>

Bound form of Jj’s new_merge (with dir pre-bound).

Source

pub async fn abandon(&self, revset: &str) -> Result<()>

Bound form of Jj’s abandon (with dir pre-bound).

Source

pub async fn git_fetch_branch(&self, branch: &str) -> Result<()>

Bound form of Jj’s git_fetch_branch (with dir pre-bound).

Source

pub async fn git_import(&self) -> Result<()>

Bound form of Jj’s git_import (with dir pre-bound).

Source

pub async fn op_head(&self) -> Result<String>

Bound form of Jj’s op_head (with dir pre-bound).

Source

pub async fn op_log(&self, limit: usize) -> Result<Vec<Operation>>

Bound form of Jj’s op_log (with dir pre-bound).

Source

pub async fn op_restore(&self, op_id: &str) -> Result<()>

Bound form of Jj’s op_restore (with dir pre-bound).

Source

pub async fn op_undo(&self) -> Result<()>

Bound form of Jj’s op_undo (with dir pre-bound).

Source

pub async fn workspace_list(&self) -> Result<Vec<Workspace>>

Bound form of Jj’s workspace_list (with dir pre-bound).

Source

pub async fn workspace_root(&self, name: Option<String>) -> Result<PathBuf>

Bound form of Jj’s workspace_root (with dir pre-bound).

Source

pub async fn workspace_add(&self, spec: WorkspaceAdd) -> Result<()>

Bound form of Jj’s workspace_add (with dir pre-bound).

Source

pub async fn workspace_forget(&self, name: &str) -> Result<()>

Bound form of Jj’s workspace_forget (with dir pre-bound).

Source§

impl<'a, R: ProcessRunner> JjAt<'a, R>

Source

pub async fn transaction<T, F, Fut>(&self, f: F) -> Result<T>
where F: FnOnce(JjAt<'a, R>) -> Fut, Fut: Future<Output = Result<T>> + 'a,

Bound form of Jj::transaction (with dir pre-bound): run f with op-log rollback on Err. See Jj::transaction for the caveats.

Trait Implementations§

Source§

impl<R: ProcessRunner> Clone for JjAt<'_, R>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R: ProcessRunner> Copy for JjAt<'_, R>

Auto Trait Implementations§

§

impl<'a, R> Freeze for JjAt<'a, R>

§

impl<'a, R> RefUnwindSafe for JjAt<'a, R>
where R: RefUnwindSafe,

§

impl<'a, R> Send for JjAt<'a, R>

§

impl<'a, R> Sync for JjAt<'a, R>

§

impl<'a, R> Unpin for JjAt<'a, R>

§

impl<'a, R> UnsafeUnpin for JjAt<'a, R>

§

impl<'a, R> UnwindSafe for JjAt<'a, R>
where R: RefUnwindSafe,

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> Any for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Source§

fn type_name(&self) -> &'static str

Source§

impl<T> AnySync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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