Skip to main content

FileLog

Struct FileLog 

Source
pub struct FileLog<L = Unselected, H = Unselected> { /* private fields */ }
Expand description

Print detailed information about the revisions of files.

The L type parameter tracks the changelist description output at compile time: Self::full_description transitions to the FullDescription state and Self::truncated_description transitions to the TruncatedDescription state. The H type parameter tracks whether file content history is displayed: Self::content_history transitions to the DisplayContentHistory state.

Implementations§

Source§

impl FileLog<Unselected, Unselected>

Source

pub fn new(bin: impl Into<PathBuf>, global_opts: GlobalOpts) -> Self

Creates a new p4 filelog command.

bin is the path to the Perforce command-line executable.

Source§

impl<H: ExclusiveOption> FileLog<Unselected, H>

Source

pub fn full_description(self) -> FileLog<FullDescription, H>

§Description

-l

List long output, with the full text of each changelist description.

Transitions this command to the FullDescription state.

Source

pub fn truncated_description(self) -> FileLog<TruncatedDescription, H>

§Description

-L

List long output, with the full text of each changelist description truncated at 250 characters.

Transitions this command to the TruncatedDescription state.

Source§

impl<L: ExclusiveOption> FileLog<L, Unselected>

Source

pub fn content_history(self) -> FileLog<L, DisplayContentHistory>

§Description

-h

Display file content history instead of file name history.

Transitions this command to the DisplayContentHistory state, which unlocks the -p option.

Source§

impl<L: ExclusiveOption, H: ExclusiveOption> FileLog<L, H>

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_changelist(&self) -> Option<&String>

§Description

-c change

Display only files submitted at the specified changelist number.

Source

pub fn set_changelist(&mut self, v: impl Into<String>) -> &mut Self

§Description

-c change

Display only files submitted at the specified changelist number.

Source

pub fn changelist(self, v: impl Into<String>) -> Self

§Description

-c change

Display only files submitted at the specified changelist number.

Source

pub fn get_follow_branches(&self) -> bool

§Description

-i

Follow file history across branches.

Source

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

§Description

-i

Follow file history across branches.

Source

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

§Description

-i

Follow file history across branches.

Source

pub fn get_limit(&self) -> Option<u64>

§Description

-m max

List only the first max changes per file output.

Source

pub fn set_limit(&mut self, v: u64) -> &mut Self

§Description

-m max

List only the first max changes per file output.

Source

pub fn limit(self, v: u64) -> Self

§Description

-m max

List only the first max changes per file output.

Source

pub fn get_ignore_non_contributory(&self) -> bool

§Description

-s

Display a shortened form of output by ignoring non-contributory integrations.

Source

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

§Description

-s

Display a shortened form of output by ignoring non-contributory integrations.

Source

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

§Description

-s

Display a shortened form of output by ignoring non-contributory integrations.

Source

pub fn get_include_time(&self) -> bool

§Description

-t

Display the time as well as the date.

Source

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

§Description

-t

Display the time as well as the date.

Source

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

§Description

-t

Display the time as well as the date.

Source§

impl<L: ExclusiveOption> FileLog<L, DisplayContentHistory>

Source

pub fn get_skip_promoted_tasks(&self) -> bool

§Description

-p

When used with the -h option, do not follow content of promoted task streams.

Source

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

§Description

-p

When used with the -h option, do not follow content of promoted task streams.

Source

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

§Description

-p

When used with the -h option, do not follow content of promoted task streams.

Trait Implementations§

Source§

impl<L: Clone, H: Clone> Clone for FileLog<L, H>

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<L: Debug, H: Debug> Debug for FileLog<L, H>

Source§

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

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

impl<L: Default, H: Default> Default for FileLog<L, H>

Source§

fn default() -> Self

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

impl<L: ExclusiveOption, H: ExclusiveOption> ParameterizedSpawn for FileLog<L, H>

Source§

fn spawn_with<'a>( &mut self, files: Self::Input<'a>, ) -> Result<Self::Output<'a>, Self::Error>

Spawns p4 filelog 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.

At least one file or file pattern must be provided.

Source§

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

Source§

type Output<'a> = Child

Source§

type Error = Error

Source§

impl<L: ExclusiveOption, H: ExclusiveOption> SubCommand for FileLog<L, H>

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<L, H> Freeze for FileLog<L, H>
where H: Freeze, L: Freeze,

§

impl<L, H> RefUnwindSafe for FileLog<L, H>

§

impl<L, H> Send for FileLog<L, H>
where H: Send, L: Send,

§

impl<L, H> Sync for FileLog<L, H>
where H: Sync, L: Sync,

§

impl<L, H> Unpin for FileLog<L, H>
where H: Unpin, L: Unpin,

§

impl<L, H> UnsafeUnpin for FileLog<L, H>
where H: UnsafeUnpin, L: UnsafeUnpin,

§

impl<L, H> UnwindSafe for FileLog<L, H>
where H: UnwindSafe, L: 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.