List Perforce users assigned to review files.
Namespace: Perforce.P4Assembly: p4api.net (in p4api.net.dll) Version: 2017.3.160.836 (2017.3.160.0836)
Syntax
C# |
---|
public IList<User> GetReviewers( IList<FileSpec> filespecs, Options options ) |
Visual Basic |
---|
Public Function GetReviewers ( _ filespecs As IList(Of FileSpec), _ options As Options _ ) As IList(Of User) |
Visual C++ |
---|
public: IList<User^>^ GetReviewers( IList<FileSpec^>^ filespecs, Options^ options ) |
Parameters
- filespecs
- Type: System.Collections.Generic..::..IList<(Of <(<'FileSpec>)>)>
- options
- Type: Perforce.P4..::..Options
Return Value
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:
CopyC#
To get the list of users who are reviewing submitted changelist 83476:
CopyC#
![](../icons/CopyCode.gif)
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<ProtectionEntry> target = Repository.GetProtectionEntries(filespecs, opts);
![](../icons/CopyCode.gif)
GetReviewersCmdOptions opts = new GetReviewersCmdOptions(GetReviewersCmdFlags.None, 83476); FileSpec filespec = new FileSpec(new DepotPath("//..."), null); IList<FileSpec> filespecs = new List<FileSpec>(); filespecs.Add(filespec); IList<ProtectionEntry> target = Repository.GetProtectionEntries(filespecs, opts);