Jump to content


Repository.GetFixes() question P4API.NET

P4API.NET Repository GetFixes()

  • Please log in to reply
2 replies to this topic

#1 SpaceManMan

SpaceManMan

    Member

  • Members
  • PipPip
  • 19 posts

Posted 23 March 2016 - 09:23 PM

I need to get fixes using the below code in a class.

GetFixesCmdOptions opts = new GetFixesCmdOptions(GetFixesCmdFlags.None, 0, jobNumber, 0);
FileSpec filespec = new FileSpec(new DepotPath("//..."), null);
IList<FileSpec> filespecs = new List<FileSpec>();
filespecs.Add(filespec);

IList<Fix> target = p4Repository.GetFixes(filespecs, opts);

p4Repository and jobNumber are passed into this class but the depot path is not.  Is there a way to get the DepotPath from p4Repository?  I do not want to have to hard code depot path.

#2 P4Norman

P4Norman

    Advanced Member

  • Staff
  • 81 posts
  • LocationOakland CA, USA

Posted 31 March 2016 - 12:04 AM

Hi SpaceManMan,

The DepotPath is an optional argument used to constrain the output to fixes that are related to files within the path.
See the command reference for more about this:

https://www.perforce...f/p4_fixes.html

You could try passing an empty string and see if that works for you.  Otherwise I recommend you pass the depot root, the way you show.
that way you'll be sure  not to filter out any fix results accidently.

For more information about the C# call, the source is available on the workshop here:

https://swarm.worksh...t/Repository.cs

#3 SpaceManMan

SpaceManMan

    Member

  • Members
  • PipPip
  • 19 posts

Posted 31 March 2016 - 03:13 PM

Thank you P4Norman!





Also tagged with one or more of these keywords: P4API.NET, Repository, GetFixes()

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users