Commit Graph

17 Commits

Author SHA1 Message Date
Ben Marsh
9aab040c4f EpicGames.Perforce.Native: Prevent Close messages being sent twice for the same file handle.
#preflight none

[CL 23531215 by Ben Marsh in ue5-main branch]
2022-12-15 15:42:44 -05:00
Ben Marsh
0161c0a4a0 EpicGames.Perforce.Native: Add permissions to I/O operation messages.
#preflight none

[CL 23496163 by Ben Marsh in ue5-main branch]
2022-12-13 15:16:58 -05:00
Ben Marsh
3fa3b5fddc EpicGames.Perforce.Native: Set the version string before every API call, per documentation.
#preflight none

[CL 22607938 by Ben Marsh in ue5-main branch]
2022-10-18 15:10:07 -04:00
Ben Marsh
e172b4590d EpicGames.Perforce: Add a host parameter for native perforce lib.
#preflight none

[CL 21958737 by Ben Marsh in ue5-main branch]
2022-09-11 10:28:25 -04:00
Ben Marsh
31b1359c92 EpicGames.Perforce: Allow passing a stdin prompt response directly into the regular command method, rather than having a special implementation for login commands.
#preflight none

[CL 21721707 by Ben Marsh in ue5-main branch]
2022-08-31 11:36:54 -04:00
Ben Marsh
66af5fcd70 Fix duplicated data packet when copying compressed data from Perforce response streams.
#preflight none

[CL 20972578 by Ben Marsh in ue5-main branch]
2022-07-06 16:12:45 -04:00
Ben Marsh
2037fed78d Fix native P4 library not being able to write to files with non-ANSI paths.
#preflight none
#jira UE-155162

[CL 20456674 by Ben Marsh in ue5-main branch]
2022-06-01 15:01:49 -04:00
Ben Marsh
8182d0fc32 EpicGames.Perforce.Native: Attempt to fix P4 symbol visibility.
#preflight none

[CL 20325466 by Ben Marsh in ue5-main branch]
2022-05-23 09:07:08 -04:00
Ben Marsh
99408a4501 Add UBT build files and BuildGraph script for EpicGames.Perforce.Native.
#preflight 6286e3768828ea88c814018c

[CL 20292753 by Ben Marsh in ue5-main branch]
2022-05-20 07:41:29 -04:00
Ben Marsh
3948f921c5 Horde: Fix double-free when using intercepted IO in native perforce library.
#preflight none

[CL 19325783 by Ben Marsh in ue5-main branch]
2022-03-09 16:16:08 -05:00
Ben Marsh
2897458ba4 Horde: Fix corrupt data in native Perforce library when server returns gzipped streams.
- Implementation of this logic exists within the p4 library, but is required to be reimplemented by any custom filesystem implementations.
- Add header for gzip.h utility class used by regular implementation so we can duplicate the logic for our overriden impl.
- Move output folder for compiled binaries under Engine/Binaries.

#preflight none

[CL 19309319 by Ben Marsh in ue5-main branch]
2022-03-08 15:14:22 -05:00
Ben Marsh
892805279c P4: Add support for intercepting I/O through native Perforce library. This allows streaming sync data directly into memory, avoiding any writes to disk.
#preflight 620a741d17632e948459cb9d

[CL 18979717 by Ben Marsh in ue5-main branch]
2022-02-14 10:37:38 -05:00
Ben Marsh
eddef12371 UGS-CLI: Various improvements/fixes.
* Support for creating workspaces using native P4 client, so "ugs init" now works correctly.
* Output a list of files which need to be clobbered when syncing, and add a -Clobber option to confirm intent.
* Fix exception accessing folders that user does not have permissions to when detecting a new workspace.

#preflight none

[CL 18618091 by Ben Marsh in ue5-main branch]
2022-01-14 10:51:47 -05:00
Ben Marsh
0f5d4b412d Add support for setting passwords on the native client at creation time.
[CL 18113267 by Ben Marsh in ue5-main branch]
2021-11-09 16:41:23 -05:00
Ben Marsh
14c8b42e39 Horde: Fix tagged output of some Perforce commands (eg. p4 dirs).
[CL 17570617 by Ben Marsh in ue5-main branch]
2021-09-20 10:32:28 -04:00
Ben Marsh
3b17bd92d0 Horde: Add support for the "p4 dirs" command.
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]
2021-09-15 16:49:30 -04:00
Ben Marsh
390c78654c Add a native implementation of IPerforceConnection, which uses the Perforce C++ API (via a DLL called EpicGames.Perforce.Native) to output records to a buffer shared with managed code (which is double-buffered with the processing thread in managed code). Interaction with the API is lightweight and done on a background thread, with an async API overlaid on top. Prebuilt binaries for the native component are currently tested on Windows and Linux.
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]
2021-08-29 16:35:57 -04:00