pub struct Branches<F = Unselected, U = Unselected> { /* private fields */ }Expand description
p4 [g-opts] branches [[-e | -E] nameFilter] [-m max][-t] [-u user [--user-case-insensitive] | --me]
List existing branch mappings.
Print the list of all branch mappings currently known to the system.
The F type parameter tracks the -e / -E name filter at compile
time, starting as Unselected: Self::filter transitions to the
Filter state, which carries both the pattern and its case
sensitivity.
The U type parameter tracks the owner filter at compile time, starting
as Unselected:
User (entered via Self::user or Self::filter_me).
Each filter can be set at most once; the remaining options (-m, -t,
and the other filter) stay available afterwards.
Implementations§
Source§impl Branches<Unselected, Unselected>
impl Branches<Unselected, Unselected>
Sourcepub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
pub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self
Creates a new p4 branches command.
bin is the path to the Perforce command-line executable.
Source§impl<F, U> Branches<F, U>
impl<F, U> Branches<F, U>
Sourcepub fn get_global_opts(&self) -> &GlobalOpts
pub fn get_global_opts(&self) -> &GlobalOpts
Sourcepub fn set_global_opts(&mut self, v: GlobalOpts) -> &mut Self
pub fn set_global_opts(&mut self, v: GlobalOpts) -> &mut Self
Sourcepub fn global_opts(self, v: GlobalOpts) -> Self
pub fn global_opts(self, v: GlobalOpts) -> Self
Sourcepub fn get_display_time(&self) -> bool
pub fn get_display_time(&self) -> bool
Sourcepub fn set_display_time(&mut self, v: bool) -> &mut Self
pub fn set_display_time(&mut self, v: bool) -> &mut Self
Sourcepub fn display_time(self, v: bool) -> Self
pub fn display_time(self, v: bool) -> Self
Source§impl<U> Branches<Unselected, U>
impl<U> Branches<Unselected, U>
Sourcepub fn filter(
self,
v: impl Into<String>,
case_insensitive: bool,
) -> Branches<Filter, U>
pub fn filter( self, v: impl Into<String>, case_insensitive: bool, ) -> Branches<Filter, U>
§Description
-e nameFilter / -E nameFilter
v is the branch name filter pattern; lists only branch specs whose
name matches it.
When case_insensitive is false (-e), the pattern is matched
using the server’s normal case-sensitivity rules. When
case_insensitive is true (-E), the pattern is matched
case-insensitively, even on a case-sensitive server.
For example:
p4 branches -e "svr-dev-rel*"
Transitions this command to the Filter state.
Source§impl<F> Branches<F, Unselected>
impl<F> Branches<F, Unselected>
Sourcepub fn user(
self,
v: impl Into<String>,
case_insensitive: bool,
) -> Branches<F, User>
pub fn user( self, v: impl Into<String>, case_insensitive: bool, ) -> Branches<F, User>
§Description
-u user
v is the owner user name or search pattern; case_insensitive selects the --user-case-insensitive suboption.
List branch specs owned by the specified user.
This can include * wildcards to form a search pattern. If wildcards are used, enclose the search pattern in double quotes (").
For example:
p4 branches -u "*bert"
You can also add the --user-case-insensitive suboption to indicate that the user value is a case-insensitive search pattern, even for a case-sensitive server.
Transitions this command to the User state.