Jump to content


Question about file limit on p4 commands for notation file[rev] ...

P4V P4api command line

  • Please log in to reply
5 replies to this topic

#1 mister_wilson

mister_wilson

    Advanced Member

  • Members
  • PipPipPip
  • 121 posts
  • LocationMontreal, Quebec

Posted 19 March 2015 - 02:58 PM

Hi,

Out of curiosity, could someone tell me if there is a limit to the number of files[rev] that perforce can handle via the command line and/or through the old P4API for .NET?

Examples:

for commands that allow multiple file[rev] arguments like "p4 fstat".

p4 fstat //depot/branch/file1.txt //depot/branch/file2.txt //depot/branch/file3.txt ... (what's the limit?)


or in the old P4api for .NET

P4RecordSet recordSet = p4.Run("fstat", myfiles); // What is the maximum number of file elements?

Thanks,

-jonathan

#2 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 19 March 2015 - 05:56 PM

Hi Jonathan,

When you mention the "old" P4Api.Net - which exact version are you referring to?

As far as I know, our client code just takes the arguments passed to it via the traditional

  main( int argc, char **argv )

mechanism and then passes them to the server. The server does have some limitations on such things as the length of a filename.

You can encounter an OS/shell/C Runtime limitation in passing arguments to the application (the p4 client in this case).  For example, the limitation for command line length on WinNT is fairly severe, like 1024 characters.

#3 mister_wilson

mister_wilson

    Advanced Member

  • Members
  • PipPipPip
  • 121 posts
  • LocationMontreal, Quebec

Posted 20 March 2015 - 01:04 AM

I'm referring to P4.NET-bin.zip (which contains p4api.dll and p4dn.dll from the subfolder CLR_2.0). I think the version is actually 2.0.0.0.

I was more concerned if I use the function Run(...)
public P4RecordSet Run(
string Command,
params string[] Args
)
and my Args array contains 10000 or 100000 files =). Would the limitation come from Perforce, the API or from the OS?

#4 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 24 March 2015 - 05:41 PM

Hi Jonathan,

If you are using one of the derived APIs, as far as I know, there is not an explicit limit. If you are on the command-line then you will be limited by ARG_MAX which is commonly 32k. Thus, most likely if a limitation arose, it would come from the OS due to the number of characters.

#5 mister_wilson

mister_wilson

    Advanced Member

  • Members
  • PipPipPip
  • 121 posts
  • LocationMontreal, Quebec

Posted 13 May 2015 - 05:16 PM

Thanks for the info =)

#6 P4Shimada

P4Shimada

    Advanced Member

  • Members
  • PipPipPip
  • 831 posts

Posted 13 May 2015 - 07:26 PM

You're welcome! Have a good week.





Also tagged with one or more of these keywords: P4V, P4api, command line

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users