pub struct GenericBranch(/* private fields */);Expand description
A generic branch that can represent any type of branch.
This struct wraps a Python branch object and provides access to it through the Branch trait.
Trait Implementations§
Source§impl Clone for GenericBranch
impl Clone for GenericBranch
Source§fn clone(&self) -> GenericBranch
fn clone(&self) -> GenericBranch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, 'py> FromPyObject<'a, 'py> for GenericBranch
impl<'a, 'py> FromPyObject<'a, 'py> for GenericBranch
Source§impl<'py> IntoPyObject<'py> for GenericBranch
impl<'py> IntoPyObject<'py> for GenericBranch
Source§type Output = Bound<'py, <GenericBranch as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <GenericBranch as IntoPyObject<'py>>::Target>
The smart pointer type to use. Read more
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of a conversion error.
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<GenericBranch as IntoPyObject<'py>>::Output, <GenericBranch as IntoPyObject<'py>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<GenericBranch as IntoPyObject<'py>>::Output, <GenericBranch as IntoPyObject<'py>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for GenericBranch
impl !RefUnwindSafe for GenericBranch
impl Send for GenericBranch
impl Sync for GenericBranch
impl Unpin for GenericBranch
impl UnsafeUnpin for GenericBranch
impl UnwindSafe for GenericBranch
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
Source§impl<T> Branch for Twhere
T: PyBranch,
impl<T> Branch for Twhere
T: PyBranch,
Source§fn format(&self) -> BranchFormat
fn format(&self) -> BranchFormat
Get the format of this branch. Read more
Source§fn vcs_type(&self) -> VcsType
fn vcs_type(&self) -> VcsType
Get the type of version control system for this branch. Read more
Get the tags for this branch. Read more
Source§fn repository(&self) -> GenericRepository
fn repository(&self) -> GenericRepository
Get the repository associated with this branch. Read more
Source§fn last_revision(&self) -> RevisionId
fn last_revision(&self) -> RevisionId
Get the last revision in this branch. Read more
Source§fn basis_tree(&self) -> Result<RevisionTree, Error>
fn basis_tree(&self) -> Result<RevisionTree, Error>
Get the basis tree for this branch. Read more
Source§fn get_user_url(&self) -> Url
fn get_user_url(&self) -> Url
Get the user-visible URL for this branch. Read more
Source§fn controldir(
&self,
) -> Box<dyn ControlDir<WorkingTree = GenericWorkingTree, Repository = GenericRepository, Branch = GenericBranch>>
fn controldir( &self, ) -> Box<dyn ControlDir<WorkingTree = GenericWorkingTree, Repository = GenericRepository, Branch = GenericBranch>>
Get the control directory for this branch. Read more
Source§fn push(
&self,
remote_branch: &(dyn PyBranch + 'static),
overwrite: bool,
stop_revision: Option<&RevisionId>,
tag_selector: Option<Box<dyn Fn(String) -> bool>>,
) -> Result<(), Error>
fn push( &self, remote_branch: &(dyn PyBranch + 'static), overwrite: bool, stop_revision: Option<&RevisionId>, tag_selector: Option<Box<dyn Fn(String) -> bool>>, ) -> Result<(), Error>
Push this branch to a remote branch. Read more
Source§fn pull(
&self,
source_branch: &(dyn PyBranch + 'static),
overwrite: Option<bool>,
) -> Result<(), Error>
fn pull( &self, source_branch: &(dyn PyBranch + 'static), overwrite: Option<bool>, ) -> Result<(), Error>
Pull from a source branch into this branch. Read more
Source§fn set_parent(&mut self, parent: &str)
fn set_parent(&mut self, parent: &str)
Set the parent branch location. Read more
Source§fn get_push_location(&self) -> Option<String>
fn get_push_location(&self) -> Option<String>
Get the push location for this branch. Read more
Source§fn user_transport(&self) -> Transport
fn user_transport(&self) -> Transport
Get a transport for accessing this branch’s user files. Read more
Source§fn get_config(&self) -> BranchConfig
fn get_config(&self) -> BranchConfig
Get the configuration for this branch. Read more
Source§fn get_config_stack(&self) -> ConfigStack
fn get_config_stack(&self) -> ConfigStack
Get the configuration stack for this branch. Read more
Source§fn sprout(
&self,
to_controldir: &(dyn PyControlDir + 'static),
to_branch_name: &str,
) -> Result<(), Error>
fn sprout( &self, to_controldir: &(dyn PyControlDir + 'static), to_branch_name: &str, ) -> Result<(), Error>
Create a new branch from this branch. Read more
Source§fn create_checkout(
&self,
to_location: &Path,
) -> Result<GenericWorkingTree, Error>
fn create_checkout( &self, to_location: &Path, ) -> Result<GenericWorkingTree, Error>
Create a checkout of this branch. Read more
Source§fn generate_revision_history(
&self,
last_revision: &RevisionId,
) -> Result<(), Error>
fn generate_revision_history( &self, last_revision: &RevisionId, ) -> Result<(), Error>
Generate the revision history for this branch. Read more
Source§fn bind(&self, other: &dyn Branch) -> Result<(), Error>
fn bind(&self, other: &dyn Branch) -> Result<(), Error>
Bind this branch to another branch. Read more
Source§fn get_bound_location(&self) -> Option<String>
fn get_bound_location(&self) -> Option<String>
Get the location of the branch this branch is bound to. Read more
Source§fn get_old_bound_location(&self) -> Option<String>
fn get_old_bound_location(&self) -> Option<String>
Get the location this branch used to be bound to. Read more
Source§fn get_rev_id(&self, revno: u32) -> Result<RevisionId, Error>
fn get_rev_id(&self, revno: u32) -> Result<RevisionId, Error>
Get the revision ID for a given revision number. Read more
Source§fn revision_id_to_revno(&self, revision_id: &RevisionId) -> Result<u32, Error>
fn revision_id_to_revno(&self, revision_id: &RevisionId) -> Result<u32, Error>
Convert a revision ID to its revision number. Read more
Source§fn check_real_revno(&self, revno: u32) -> bool
fn check_real_revno(&self, revno: u32) -> bool
Check whether a revision number corresponds to a real revision. Read more
Source§fn last_revision_info(&self) -> (u32, RevisionId)
fn last_revision_info(&self) -> (u32, RevisionId)
Get information about the last revision. Read more
Source§fn set_last_revision_info(
&self,
revno: u32,
revision_id: &RevisionId,
) -> Result<(), Error>
fn set_last_revision_info( &self, revno: u32, revision_id: &RevisionId, ) -> Result<(), Error>
Set the last revision information for this branch. Read more
Source§fn get_stacked_on_url(&self) -> Result<String, Error>
fn get_stacked_on_url(&self) -> Result<String, Error>
Get the URL this branch is stacked on. Read more
Source§fn set_stacked_on_url(&self, url: &str) -> Result<(), Error>
fn set_stacked_on_url(&self, url: &str) -> Result<(), Error>
Set the URL this branch is stacked on. Read more
Source§fn fetch(
&self,
from_branch: &dyn Branch,
last_revision: Option<&RevisionId>,
) -> Result<(), Error>
fn fetch( &self, from_branch: &dyn Branch, last_revision: Option<&RevisionId>, ) -> Result<(), Error>
Copy revisions from another branch into this branch. Read more
Source§fn update(&self) -> Result<(), Error>
fn update(&self) -> Result<(), Error>
Update this branch to match the master branch. Read more
Source§fn set_push_location(&self, location: &str) -> Result<(), Error>
fn set_push_location(&self, location: &str) -> Result<(), Error>
Set the location to push this branch to. Read more
Source§fn set_public_branch(&self, location: &str) -> Result<(), Error>
fn set_public_branch(&self, location: &str) -> Result<(), Error>
Set the public branch location. Read more
Source§fn get_append_revisions_only(&self) -> bool
fn get_append_revisions_only(&self) -> bool
Check if this branch is configured to only allow appending revisions. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
Converts
self into an owned Python object, dropping type information.