pub struct JJWrapper { /* private fields */ }Expand description
Main wrapper for Jujutsu operations
Implementations§
Source§impl JJWrapper
impl JJWrapper
Sourcepub fn with_config(config: JJConfig) -> Result<JJWrapper>
pub fn with_config(config: JJConfig) -> Result<JJWrapper>
Create a new JJWrapper with custom configuration
Sourcepub fn get_config(&self) -> JJConfig
pub fn get_config(&self) -> JJConfig
Get the current configuration
Sourcepub async fn execute(&self, args: &[&str]) -> Result<JJResult>
pub async fn execute(&self, args: &[&str]) -> Result<JJResult>
Execute a jj command and return the result
Sourcepub fn get_operations(&self, limit: usize) -> Result<Vec<JJOperation>>
pub fn get_operations(&self, limit: usize) -> Result<Vec<JJOperation>>
Get operations from the operation log
Sourcepub fn get_user_operations(&self, limit: usize) -> Result<Vec<JJOperation>>
pub fn get_user_operations(&self, limit: usize) -> Result<Vec<JJOperation>>
Get user-initiated operations (exclude snapshots)
Sourcepub async fn get_conflicts(
&self,
commit: Option<&str>,
) -> Result<Vec<JJConflict>>
pub async fn get_conflicts( &self, commit: Option<&str>, ) -> Result<Vec<JJConflict>>
Get conflicts in the current commit or specified commit
Sourcepub async fn describe(&self, message: &str) -> Result<JJOperation>
pub async fn describe(&self, message: &str) -> Result<JJOperation>
Describe the current commit with a message
Sourcepub async fn new_commit(&self, message: Option<&str>) -> Result<JJResult>
pub async fn new_commit(&self, message: Option<&str>) -> Result<JJResult>
Create a new commit (renamed from ‘new’ to avoid confusion with constructor)
Sourcepub async fn squash(
&self,
from: Option<&str>,
to: Option<&str>,
) -> Result<JJResult>
pub async fn squash( &self, from: Option<&str>, to: Option<&str>, ) -> Result<JJResult>
Squash commits
Sourcepub async fn branch_create(
&self,
name: &str,
revision: Option<&str>,
) -> Result<JJResult>
pub async fn branch_create( &self, name: &str, revision: Option<&str>, ) -> Result<JJResult>
Create a branch
Sourcepub async fn branch_delete(&self, name: &str) -> Result<JJResult>
pub async fn branch_delete(&self, name: &str) -> Result<JJResult>
Delete a branch
Sourcepub async fn branch_list(&self) -> Result<Vec<JJBranch>>
pub async fn branch_list(&self) -> Result<Vec<JJBranch>>
List branches
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JJWrapper
impl RefUnwindSafe for JJWrapper
impl Send for JJWrapper
impl Sync for JJWrapper
impl Unpin for JJWrapper
impl UnwindSafe for JJWrapper
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