Question

I can do this using filelog. A command such as

p4 filelog -m1 -s //path/to/file

Produces output of the following form:

#51 change 196811 edit on 2014/05/06 by user@client-workspace ...

I would prefer not to have parse it. I can't figure out how to do it using p4 fstat. I would have thought it would be actionOwner, but:

$ p4  fstat -T actionOwner //path/to/file

Field actionOwner doesn't exist.
Was it helpful?

Solution

Instead of using 'fstat', you could do 'p4 -ztag filelog -m1 -s //path/to/file'.

It will produce output something like:

C:\Users\Bryan\perforce\client>p4 -ztag filelog -m 1 //depot/a
... depotFile //depot/a
... rev0 1
... change0 1
... action0 add
... type0 text
... time0 1399680148
... user0 Bryan
... client0 Dell660
... fileSize0 10
... digest0 733F328D8CFF7DD89970EC34A70AA14F
... desc0 My super change

And you could look at the "user0" field.

By the way, if you have a recent enough client, you can even combine this with the less-known -F option, as in:

C:\Users\Bryan\perforce\client>p4 -ztag -F "%user0%" filelog -m 1 //depot/a
Bryan

There are lots of ways to skin this cat, but this is definitely one of the ways.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top