pub struct Annotate<F = Unselected> { /* private fields */ }Expand description
p4 [g-opts] annotate [-a -c -i -I -q -t -T -u] [-d options] FileSpec[revSpec]: print file lines along with their revisions.
Implementations§
Source§impl Annotate<Unselected>
impl Annotate<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 annotate command.
bin is the path to the Perforce command-line executable.
Sourcepub fn follow_branches(self) -> Annotate<Branches>
pub fn follow_branches(self) -> Annotate<Branches>
§Description
-i
Follow file history across branches. If a file was created by branching, the output includes revisions up to the branch point. The use of the -i option implies the -c option. The -i option cannot be combined with -I.
Sourcepub fn follow_integrations(self) -> Annotate<Integrations>
pub fn follow_integrations(self) -> Annotate<Integrations>
§Description
-I
Follow integrations into the file. If a line was introduced into the file by a merge, the source of the merge is indicated as the changelist that introduced the line. If that source was itself the result of an integration, that source will be used instead. The use of the -I option implies the -c option. The -I option cannot be combined with -i.
Source§impl<F: ExclusiveOption> Annotate<F>
impl<F: ExclusiveOption> Annotate<F>
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_all_lines(&self) -> bool
pub fn get_all_lines(&self) -> bool
§Description
-a
All lines, including deleted lines and lines no longer present at the head revision, are included. Each line includes a starting and ending revision.
Sourcepub fn set_all_lines(&mut self, v: bool) -> &mut Self
pub fn set_all_lines(&mut self, v: bool) -> &mut Self
§Description
-a
All lines, including deleted lines and lines no longer present at the head revision, are included. Each line includes a starting and ending revision.
Sourcepub fn all_lines(self, v: bool) -> Self
pub fn all_lines(self, v: bool) -> Self
§Description
-a
All lines, including deleted lines and lines no longer present at the head revision, are included. Each line includes a starting and ending revision.
Sourcepub fn get_changelist_number(&self) -> bool
pub fn get_changelist_number(&self) -> bool
§Description
-c
Display the changelist number, rather than the revision number, associated with each line. If you use the -a option and the -c option together, each line includes a starting and ending changelist number.
Sourcepub fn set_changelist_number(&mut self, v: bool) -> &mut Self
pub fn set_changelist_number(&mut self, v: bool) -> &mut Self
§Description
-c
Display the changelist number, rather than the revision number, associated with each line. If you use the -a option and the -c option together, each line includes a starting and ending changelist number.
Sourcepub fn changelist_number(self, v: bool) -> Self
pub fn changelist_number(self, v: bool) -> Self
§Description
-c
Display the changelist number, rather than the revision number, associated with each line. If you use the -a option and the -c option together, each line includes a starting and ending changelist number.
Sourcepub fn get_diff_options(&self) -> Option<&str>
pub fn get_diff_options(&self) -> Option<&str>
§Description
-d options
Runs the diff routine with one of a subset of the standard UNIX diff options. See Usage notes for a listing of these options.
Sourcepub fn set_diff_options(&mut self, v: impl Into<String>) -> &mut Self
pub fn set_diff_options(&mut self, v: impl Into<String>) -> &mut Self
§Description
-d options
Runs the diff routine with one of a subset of the standard UNIX diff options. See Usage notes for a listing of these options.
Sourcepub fn diff_options(self, v: impl Into<String>) -> Self
pub fn diff_options(self, v: impl Into<String>) -> Self
§Description
-d options
Runs the diff routine with one of a subset of the standard UNIX diff options. See Usage notes for a listing of these options.
Sourcepub fn get_quiet_mode(&self) -> bool
pub fn get_quiet_mode(&self) -> bool
Sourcepub fn set_quiet_mode(&mut self, v: bool) -> &mut Self
pub fn set_quiet_mode(&mut self, v: bool) -> &mut Self
Sourcepub fn quiet_mode(self, v: bool) -> Self
pub fn quiet_mode(self, v: bool) -> Self
Sourcepub fn get_force_binary(&self) -> bool
pub fn get_force_binary(&self) -> bool
Sourcepub fn set_force_binary(&mut self, v: bool) -> &mut Self
pub fn set_force_binary(&mut self, v: bool) -> &mut Self
Sourcepub fn force_binary(self, v: bool) -> Self
pub fn force_binary(self, v: bool) -> Self
Sourcepub fn get_user_date(&self) -> bool
pub fn get_user_date(&self) -> bool
§Description
-u
Display the name of the user who modified the change and the date when the modification occurred.
Sourcepub fn set_user_date(&mut self, v: bool) -> &mut Self
pub fn set_user_date(&mut self, v: bool) -> &mut Self
§Description
-u
Display the name of the user who modified the change and the date when the modification occurred.
Sourcepub fn user_date(self, v: bool) -> Self
pub fn user_date(self, v: bool) -> Self
§Description
-u
Display the name of the user who modified the change and the date when the modification occurred.
Sourcepub fn get_tab(&self) -> Option<u32>
pub fn get_tab(&self) -> Option<u32>
§Description
-T | --tab=N
Align output to a tab stop of 8. You can specify a different tab value
using the --tab option and specifying the desired value for N.
Returns the tab stop currently set, or None if no tab option is set.
Sourcepub fn set_tab(&mut self, v: u32) -> &mut Self
pub fn set_tab(&mut self, v: u32) -> &mut Self
§Description
--tab=N
Align output to a tab stop of N. Use Self::set_default_tab to
align output to the default tab stop of 8 with -T.
Sourcepub fn tab(self, v: u32) -> Self
pub fn tab(self, v: u32) -> Self
§Description
--tab=N
Align output to a tab stop of N. Use Self::default_tab to align
output to the default tab stop of 8 with -T.
Sourcepub fn set_default_tab(&mut self) -> &mut Self
pub fn set_default_tab(&mut self) -> &mut Self
§Description
-T
Align output to a tab stop of 8. Use Self::set_tab to align output
to a different tab stop with --tab=N.
Sourcepub fn default_tab(self) -> Self
pub fn default_tab(self) -> Self
Trait Implementations§
Source§impl<F: ExclusiveOption> ParameterizedSpawn for Annotate<F>
impl<F: ExclusiveOption> ParameterizedSpawn for Annotate<F>
Source§fn spawn_with<'a>(
&mut self,
files: Self::Input<'a>,
) -> Result<Self::Output<'a>, Self::Error>
fn spawn_with<'a>( &mut self, files: Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>
Spawns p4 annotate for the given files as a child process with piped
standard output and error streams; use the returned Child handle
to wait for it or interact with it.