Skip to main content

Annotate

Struct Annotate 

Source
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>

Source

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.

Source

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.

Source

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>

Source

pub fn get_global_opts(&self) -> &GlobalOpts

§Description

g-opts

See Global options.

Source

pub fn set_global_opts(&mut self, v: GlobalOpts) -> &mut Self

§Description

g-opts

See Global options.

Source

pub fn global_opts(self, v: GlobalOpts) -> Self

§Description

g-opts

See Global options.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn get_diff_options(&self) -> Option<&DiffOptions>

§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.

Source

pub fn set_diff_options(&mut self, v: impl Into<DiffOptions>) -> &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.

Source

pub fn diff_options(self, v: impl Into<DiffOptions>) -> 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.

Source

pub fn get_quiet_mode(&self) -> bool

§Description

-q

Quiet mode, which suppresses the one-line header for each file.

Source

pub fn set_quiet_mode(&mut self, v: bool) -> &mut Self

§Description

-q

Quiet mode, which suppresses the one-line header for each file.

Source

pub fn quiet_mode(self, v: bool) -> Self

§Description

-q

Quiet mode, which suppresses the one-line header for each file.

Source

pub fn get_force_binary(&self) -> bool

§Description

-t

Force p4 annotate to display non-text (binary) files.

Source

pub fn set_force_binary(&mut self, v: bool) -> &mut Self

§Description

-t

Force p4 annotate to display non-text (binary) files.

Source

pub fn force_binary(self, v: bool) -> Self

§Description

-t

Force p4 annotate to display non-text (binary) files.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn default_tab(self) -> Self

§Description

-T

Align output to a tab stop of 8. Use Self::tab to align output to a different tab stop with --tab=N.

Trait Implementations§

Source§

impl<F: Clone> Clone for Annotate<F>

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<F: Debug> Debug for Annotate<F>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F: Default> Default for Annotate<F>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<F: ExclusiveOption> ParameterizedSpawn for Annotate<F>

Source§

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.

Source§

type Input<'a> = &'a [&'a OsStr]

Source§

type Output<'a> = Child

Source§

type Error = Error

Source§

impl<F: ExclusiveOption> SubCommand for Annotate<F>

Source§

fn name(&self) -> &str

Source§

fn inject_local_args(&self, command: &mut Command)

Source§

fn global_opts(&self) -> Option<&GlobalOpts>

Source§

fn inject_args(&self, command: &mut Command)

Source§

fn setup_command<S: AsRef<OsStr>>(&self, bin: S) -> Command

Auto Trait Implementations§

§

impl<F> Freeze for Annotate<F>
where F: Freeze,

§

impl<F> RefUnwindSafe for Annotate<F>
where F: RefUnwindSafe,

§

impl<F> Send for Annotate<F>
where F: Send,

§

impl<F> Sync for Annotate<F>
where F: Sync,

§

impl<F> Unpin for Annotate<F>
where F: Unpin,

§

impl<F> UnsafeUnpin for Annotate<F>
where F: UnsafeUnpin,

§

impl<F> UnwindSafe for Annotate<F>
where F: UnwindSafe,

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> 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, 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> ParameterizedOutput for T
where T: for<'a> ParameterizedSpawn<Output<'a> = Child, Error = Error>,

Source§

type Input<'a> = <T as ParameterizedSpawn>::Input<'a>

Source§

type Error = Error

Source§

fn output_with<'a>( &mut self, input: <T as ParameterizedOutput>::Input<'a>, ) -> Result<Output, <T as ParameterizedOutput>::Error>

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.