seonguk.jeon
seonguk.jeon

Reputation: 67

How can i get a description of changelist from perforce?

I'm testing perforce command from cmd.

I want to get only description of changelist. So I'm looking for the solution from perforce document (https://www.perforce.com/manuals/cmdref/Content/CmdRef/Home-cmdref.html)

But I have not found it yet.

Please, help me

Upvotes: 1

Views: 3370

Answers (1)

Samwise
Samwise

Reputation: 71454

To get the description of a changelist, use the p4 describe command.

C:\Perforce\test>p4 describe 290
Change 290 by Tod@Samwise-dvcs-1509687817 on 2022/03/29 17:02:28

        Tod's awesome change

Affected files ...

... //stream/child_stream/TestFile.cpp#2 edit

Differences ...

==== //stream/child_stream/TestFile.cpp#2 (text) ====

1a2
> "tod"

See p4 help describe for information on the various flags. To omit the diffs and see just the description and list of affected files, add the -s flag:

C:\Perforce\test>p4 describe -s 290
Change 290 by Tod@Samwise-dvcs-1509687817 on 2022/03/29 17:02:28

        Tod's awesome change

Affected files ...

... //stream/child_stream/TestFile.cpp#2 edit

If for scripting purposes you need the description and only the description, use the undoc (see p4 help undoc for info on undoc flags) -F and -Ztag global options, like this:

C:\Perforce\test>p4 -Ztag -F %desc% describe -s 290
Tod's awesome change

Upvotes: 2

Related Questions