0

Is there a command-line way to find the most recent changelist that affects a given workspace? This can be done in the GUI by (in the workspaces tab), right-clicking the tip of the workspace tree, then going to "Folder History", and sorting by timestamp.

Thank you much and I greatly appreciate any responses.

G5W
  • 36,531
  • 10
  • 47
  • 80
Adam S
  • 8,945
  • 17
  • 67
  • 103

2 Answers2

0

A good answer to this depends on what you mean by "changelist that affects a given workspace". Do you mean:

  1. Changelist that modifies a given workspace definition? (There's no such thing.)
  2. Changelist whose contents are currently synced to the workspace? (p4 changes -m1 @workspace)
  3. Changelist whose contents COULD be synced to the workspace? (p4 changes -m1 //workspace/... -- this is the one that corresponds to the P4V operation you describe)
Samwise
  • 68,105
  • 3
  • 30
  • 44
0

You can use the p4 changes command (usage).

p4 changes -t -l -c YOUR_WORKSPACE -m 1 -s submitted //depot/project/...

Almost anything that can be done in P4V is achievable via the commandline (that is one of the best things about P4 is that is commandline first, gui second).

Dennis
  • 20,275
  • 4
  • 64
  • 80
  • This will return changes submitted *from* the workspace, but not changes that apply *to* the workspace that were submitted from other workspaces. I.e. it's changes *effected by* the workspace, not changes that *affect* the workspace. – Samwise Feb 13 '17 at 17:56