Pierre Girodias
Pierre Girodias

Reputation: 43

List changes in a directory using perforce

New to perforce (and stackoverflow). I'm trying determine what has changed in my local view: I want to list all the recent changes under a directory in my workspace.

Perforce documentation seems to suggest everything is file based. Is there not a simple solution that does not require either probing each file individually and recursively down the directory tree, or filtering and processing changelists (multiple projects are sharing the same depot in my case)?

Ideally, I'm looking for the SVN equivalent of "svn log -v" (i.e., no path specification).

I'm also looking for a command-line solution.

Upvotes: 4

Views: 4473

Answers (2)

Samwise
Samwise

Reputation: 71424

To see the last N changes under a particular workspace directory, do:

p4 changes -m N path/...

Note that path/... can be a relative local path, an absolute local path, or an absolute depot path. This is true for almost any Perforce command that accepts a file argument -- if you can specify one file you can usually specify an arbitrary pattern like "foldername/...", and you can usually specify it in either local or depot syntax.

Upvotes: 3

Paul
Paul

Reputation: 2076

Take a look at p4 changes and the documentation. There are some examples, which might already help you. Moreover there are some global options, which you can use to specify the client, port, etc.

You are probably looking for something like

p4 changes -m 5 -s submitted //depot/project/..., which return the last 5 submitted changelists under the given depot path.

Upvotes: 3

Related Questions