How can I query Perforce for a list of users who have workspaces that reference a particular file in the depot? -
i query perforce server list of users have active workspace view specification references given file in depot.
for example, given file //root/folder/file.txt command should return list of users have active workspace view specification references //root/folder/file.txt
alternatively command return workspaces reference file, , should straight forward list of owners of workspaces.
first you'll workspaces, , can run through list of workspaces owner.
to workspaces need loop on every workspace in server , run(assuming filename question):
p4 files //root/folder/file.txt@<workspace name>
if 'no such files' error, workspace doesn't have version of file synced. of workspaces have file, can owner in spec.
note query checking see if workspace has file synced, not mapped. general assumption if map , don't sync it, file unmapped.
Comments
Post a Comment