Commit Graph

54 Commits

Author SHA1 Message Date
Ben Marsh
a24e48fa97 Horde: Remove the remaining boolean variable names with a 'b' prefix.
#preflight none

[CL 22600647 by Ben Marsh in ue5-main branch]
2022-10-18 11:08:00 -04:00
Ben Marsh
5a3173bbe3 EpicGames.Perforce: Add support for "p4 sizes" command. #9584
#jira UE-164680
#preflight none

[CL 22222365 by Ben Marsh in ue5-main branch]
2022-09-28 10:47:54 -04:00
Ben Marsh
e4720da1bf EpicGames.Perforce: Fix invalid changelist number being returned when submitting a non-shelved changelist.
#preflight none

[CL 21978102 by Ben Marsh in ue5-main branch]
2022-09-12 21:44:33 -04:00
Ben Marsh
b51ee11618 UGS: Fix exception when querying current stream from a non-stream workspace.
#preflight none

[CL 21969077 by Ben Marsh in ue5-main branch]
2022-09-12 14:07:43 -04:00
Ben Marsh
44286a5bf7 Horde: Fix errors being ignored when submitting changelists, and incorrect changelist number being returned.
#preflight none

[CL 21967470 by Ben Marsh in ue5-main branch]
2022-09-12 12:45:59 -04:00
Ben Marsh
f98b6dcb90 Horde: Change to the correct host when impersonating a user.
#preflight none

[CL 21958769 by Ben Marsh in ue5-main branch]
2022-09-11 11:09:49 -04:00
Ben Marsh
ca48dfabb9 Horde: Refactor Perforce service to use EpicGames.Perforce rather than P4API.NET. New implementation supports connection pooling and asynchronous operation.
#preflight 63121d66ab25bb91f58f42be

[CL 21759888 by Ben Marsh in ue5-main branch]
2022-09-02 11:20:42 -04:00
Ben Marsh
d082dfcc2a EpicGames.Perforce: Use regular command execution flow for logging in.
#preflight none

[CL 21722327 by Ben Marsh in ue5-main branch]
2022-08-31 12:05:09 -04:00
Ryan Hummer
1b0163b46c Optimize Horde printing a shelved CL for Preflight by issuing one call to p4 print
Using the wildcard support for p4 print we can print the entire contents of a shelf with one call instead of a call for each file.

Splitting TryPrint*Async into a method that assumes one file in and one result out, and another method that can return multiple results.

#rnx
#jira none
#rb ben.marsh
#preflight n/a

[CL 21706680 by Ryan Hummer in ue5-main branch]
2022-08-30 14:48:22 -04:00
aldenc98
f59e7b924e PR #9391: Fix deadlock due to NativePerforceConnection.Response not being disposed (Contributed by aldenc98)
#preflight none

[CL 21150270 by aldenc98 in ue5-main branch]
2022-07-18 13:28:48 -04:00
Ben Marsh
68b1b97e52 Fix differences in serialization behaviors between native and legacy Perforce clients.
IPerforceConnection now contains a CreateRecord method to create a PerforceRecord, which adds numbered fields for lists in the legacy client, and unnumbered fields for the native client.

#preflight none

[CL 20568223 by Ben Marsh in ue5-main branch]
2022-06-08 20:01:33 -04:00
Ben Marsh
1e81e25cec EpicGames.Perforce: Do not default to ignoring 'Empty' error responses. These are unpleasant to deal with when querying file collections, but are legitimate indications of errors when (for example) trying to submit empty changelists.
#preflight 628441a0614041edb73dfde4

[CL 20254565 by Ben Marsh in ue5-main branch]
2022-05-17 20:51:21 -04:00
Ben Marsh
4f9c7d5b2c EpicGames.Perforce: Fall back to running external process when running on Apple silicon. We don't have a native P4 library for arm64 yet.
#preflight none

[CL 20001459 by Ben Marsh in ue5-main branch]
2022-04-30 21:11:08 -04:00
Ben Marsh
81783aafd7 P4: Prevent updates to existing changelists clearing out the file list.
#fyi Paul.Chipchase
#preflight none

[CL 19652000 by Ben Marsh in ue5-main branch]
2022-04-06 14:17:29 -04:00
Ben Marsh
508c144999 Horde: Last batch (hopefully) of static analysis fixes/suppressions.
#preflight 623e144c8073508cfc117a87

[CL 19517822 by Ben Marsh in ue5-main branch]
2022-03-25 15:35:47 -04: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
40c9e7cb50 Horde: Fix typo.
#preflight none

[CL 18623460 by Ben Marsh in ue5-main branch]
2022-01-14 16:23:06 -05:00
Ben Marsh
1ea7fefd32 Horde: If a call to p4 login doesn't return a proper record, call p4 login -s to get one.
#preflight none

[CL 18623341 by Ben Marsh in ue5-main branch]
2022-01-14 16:17:31 -05:00
Ben Marsh
a40c4c2c8b UGS: Support for running UGS CLI on Mac.
#preflight none

[CL 18554839 by Ben Marsh in ue5-main branch]
2022-01-08 15:04:19 -05:00
Ben Marsh
7a9e8c8b5c UGS: Significant refactor of UGS internals.
- 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]
2022-01-04 14:03:17 -05:00
Ben Marsh
e7ab127649 [CS] Various improvements to Perforce library.
- 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]
2022-01-03 17:18:56 -05:00
Ben Marsh
1f185de5a4 Combine interface for creating native and external Perforce client connections.
- 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]
2021-12-14 21:31:40 -05:00
Ben Marsh
72dbf9aa4e Enable code analysis (and fix warnings) for EpicGames.Perforce.
#preflight 61b7b75dc65177a67488ca5e

[CL 18449150 by Ben Marsh in ue5-main branch]
2021-12-13 16:50:25 -05:00
Ben Marsh
08007defcb UAT: Add extension methods for the "p4 files" command to IPerforceConnection.
[CL 18440749 by Ben Marsh in ue5-main branch]
2021-12-12 12:43:30 -05:00
Maxime Mercier
1a49c53b87 New perforce tools
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]
2021-11-03 15:49:48 -04:00