0

I think the command is p4 changes, but I can't figure out the syntax for what I want.

I tried with

p4 changes -u myusername @2021/09/08,2022/04/04 /path/to/directory

where the date interval and the user name seem to be honored, but the path is not, so I think I've misunderstood what the doc means by //depot/project/... in this example:

p4 changes -m 5 //depot/project/... Show the last five submitted, pending, or shelved changelists that include any file under the project directory.

I tried taking the path from the address bar in Perforce Helix P4V when I select the file in the depot.

Enlico
  • 23,259
  • 6
  • 48
  • 102

1 Answers1

3

The revision specifier modifies the file path and they go together as a single argument:

p4 changes -u myusername /path/to/directory/...@2021/09/08,2022/04/04 

See p4 help changes and p4 help revisions.

A lot of commands like p4 changes take a file[revRange] argument; in the above example /path/to/directory/... is file and @2021/09/08,2022/04/04 is revRange.

If you specify a revRange on its own then file is implicitly //..., which is why the first version of the command you tried returned results across the entire depot. The /path/to/directory was interpreted as a separate argument; if you left off the trailing ... wildcard it wouldn't match any files, so that part of the result was just empty.

Samwise
  • 68,105
  • 3
  • 30
  • 44