Click or drag to resize

RepositoryGetReviewers Method

List Perforce users assigned to review files.

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2024.1.265.5426
Syntax
public IList<User> GetReviewers(
	IList<FileSpec> filespecs,
	Options options
)

Parameters

filespecs
Type: System.Collections.GenericIListFileSpec
options
Type: Perforce.P4Options

Return Value

Type: IListUser
Remarks

p4 help reviews

reviews -- List the users who are subscribed to review files

p4 reviews [-C client] [-c changelist#] [file ...]

'p4 reviews' lists all users who have subscribed to review the
specified files.

The -c flag limits the files to the submitted changelist.

The -C flag limits the files to those opened in the specified clients
workspace, when used with the -c flag limits the workspace to files
opened in the specified changelist.

To subscribe to review files, issue the 'p4 user' command and edit
the 'Reviews field'.

Examples
To get the list of users who are reviewing submits to //depot/main/src:
GetReviewersCmdOptions opts =
new GetReviewersCmdOptions(GetReviewersCmdFlags.None, 0);

FileSpec filespec =
new FileSpec(new DepotPath("//depot/main/src/..."), null);
IList<FileSpec> filespecs = new List<FileSpec>();
filespecs.Add(filespec);

   IList<User> reviewers =
   Repository.GetReviewers(filespecs, opts);
To get the list of users who are reviewing submitted changelist 83476:
GetReviewersCmdOptions opts =
new GetReviewersCmdOptions(GetReviewersCmdFlags.None, 83476);

FileSpec filespec =
new FileSpec(new DepotPath("//..."), null);
IList<FileSpec> filespecs = new List<FileSpec>();
filespecs.Add(filespec);

   IList<User> reviewers =
   Repository.GetReviewers(filespecs, opts);
See Also