- Now uses the custom C++ Perforce library developed for Horde. This removes dependencies on an installed P4.EXE tool, improves performance, and paves the way to cross-platform support via command line invocations.
- As part of the migration to the new Perforce library, the codebase now uses async/await extensively instead of background threads, and supports a proper cancellation path rather than aborting threads.
- ILogger is now used for writing log files.
- Started converting to use of nullable annotations.
#preflight none
[CL 18511154 by Ben Marsh in ue5-main branch]
- Removed functionality to set environment variables through the IPerforceConnection object. This is now handled via PerforceEnvironment.
- Added support for logging in using the native Perforce connection implementation.
- Started migrating methods that return a list of responses to return an IAsyncEnumerable instead. This makes it much easier to perform stream processing on requests that return a lot of data.
- Added the "p4 depot" command.
- Added the "p4 have" command.
- Added the "p4 opened" command.
- Added the "p4 stream" command.
- Added the "p4 users" command.
- Added support for printing files to a temporary file, and for p4 print commands returning metadata along with the payload in its response.
- Fixed stream corruption using native Perforce library if a record did not completely fit within the output buffer.
#preflight none
[CL 18504069 by Ben Marsh in ue5-main branch]
- PerforceEnvironment class now allows querying the state of Perforce environment variables in a client agnostic way. (Supports system environment variables on Mac/Linux, and registry on Win32. Also reads settings from any P4ENVIRO file, and P4CONFIG files when initialized with a directory.)
- Connection settings are now stored in a PerforceSettings object, with a read-only IPerforceSettings interface. Both clients can be initialized through the same parameter block.
- A connection can be created using the PerforceConnection.CreateAsync() method. Specifying the IPerforceSettings.PreferNativeClient will create a NativePerforceConnection implementation where possible.
[CL 18464429 by Ben Marsh in ue5-main branch]
Data tools:
* Convert data to local writable -> Convert All data in changelist or all selected data files to local writable
Unshelving tools:
* Unshelve to current revision -> Remembers revision all files you are about to unshelve and if the revision is older, will sync to saved revision
* Unshelve and make data writable -> Unshelve changelist but for data will make them writable locally
#jira none
#review-17681604
#rb Andy.Firth Brandon.Dawson
#preflight skip
#robomerge 5.0
#robomerge FnMain
[CL 18039467 by Maxime Mercier in ue5-main branch]
* CbWriter instances may now be cleared, and can cache allocated buffers between uses.
* Records may now be returned using IAsyncEnumerable<T> allowing them to be processed as they are received, and removing the need to allocate large numbers of temporary objects.
[CL 17599803 by Ben Marsh in ue5-main branch]
This requires special handling for the native Perforce connection, since it returns information as message records that the client formats as strings through an "Error" object. To work around this, the C++ library converts such messages into stat records that are more easily parsed by C# code.
[CL 17526529 by Ben Marsh in ue5-main branch]
user command must have a space after the -o before the user name, restore the space and quoting the user name
#jira none
[CL 17389981 by Ryan Hummer in ue5-main branch]
Performance has been tested against the P4 .NET API and the command line client by performing a fstat of non-deleted files in //UE5/Main.
EpicGames.Perforce (this library): 47s
Command line client piping to file: 59s
P4 .NET API: ~40 minutes
[CL 17347502 by Ben Marsh in ue5-main branch]
* Introduce a new FileSpecList class which supports implicit conversion from a single string and arrays/lists of strings.
* Make the cancellation token argument to all commands optional.
[CL 17335316 by Ben Marsh in ue5-main branch]