How can I look up the latest change to a Perforce stream, including virtual streams?
I can look up the latest change to a depot path (which often corresponds to a stream_name), but that doesn't work for virtual streams. E.g.
p4 changes -m1 //depot/stream_name/...
The only way I've been able to achieve this is to create a new client, sync it to the stream, then delete the client. This is incredibly impactful to both the client and the server!
p4 client -o -S //depot/stream_name my_new_client
p4 sync -k ...
p4 changes -m1 @my_new_client
p4 client -d my_new_client
Is there a better way to look up the latest change to a Perforce stream?
Your solution of making a client is the right idea; just take out the costly step of syncing it, and use client file syntax to scope the p4 changes
command rather than the have list.
p4 client -o -S //depot/stream_name my_new_client | p4 client -i
p4 -c my_new_client changes -m1 //my_new_client/...
p4 client -d my_new_client