Commit Graph

168 Commits

Author SHA1 Message Date
paul chipchase
da282e1873 Add FSourceControlBackend support for storing virtualized payloads in a stream type depot.
#rb Per.Larsson
#rnx
#jira UE-160619
#preflight 62f37c86b66d5d93133d67e3

- Based on work from Jess.Kube

### Virtualization
- The source control backend now takes an optional config option "ClientStream" which takes the name of the client stream to use.
- If a client stream is set then workspaces created for payload submission will use that and not provide a client-view mapping.

#ushell-cherrypick of 21195584 by Jess.Kube
### PerforceSourceControl
- Allow FCreateWorkspace to create workspaces with streams as well as classic workspaces cia FCreateWorkspace::SetStream.
- Add a method FCreateWorkspace::ClearClientViewMappings which will clear any client view mappings already added to the operation.
- If we detect that a FCreateWorkspace operation has both a stream set and client view mappings set then FPerforceCreateWorkspaceWorker will return an error. Perforce will allow us to creat a client spec with both entries, but will default to using the stream. Technically we could allow this too but it might cause unexpected behaviour to the caller. It is better to give a clear error and fail the workspace creation.

[CL 21316756 by paul chipchase in ue5-main branch]
2022-08-10 08:51:05 -04:00
bryan sefcik
de1956f47b Ran IWYU on Public headers under Engine/Source/Developer/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21064294 by bryan.sefcik
#jira
#preflight 62d5c2111062f2e63015e598

#ROBOMERGE-OWNER: bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21155249 via CL 21158121 via CL 21161259
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21182053 by bryan sefcik in ue5-main branch]
2022-07-20 12:03:45 -04:00
marc audy
0edc19c939 Duplicating assets should keep a perforce relationship to the original file
#rb Brooke.Hubert
#jira

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 21119014 via CL 21119416 via CL 21119491
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21142516 by marc audy in ue5-main branch]
2022-07-17 22:46:56 -04:00
paul chipchase
8dd016450e We now call the virtualization process directly when submitting content via the editor rather than invoking a delegate.
#rb trivial
#rnx
#preflight 62d15f427e1c26dcd715699c

- Now that the IVirtualizationSystem interface supports both virtualization and rehydration of package files, it seems pointless to keep a delegate that occurs on pre-submit, rather than just calling the system we really want to call directly.
- Deprecating the public methods accessing the delegate from ISourceControlModule should prevent licensees from trying to use it. The delegate was added in 5.0 so even though it is unlikely to have been used by anyone we need to go through the deprecation steps to remove it.
-- This leaves the calling code a little more complicated than I'd like, but cannot be avoided.

[CL 21109464 by paul chipchase in ue5-main branch]
2022-07-15 09:52:19 -04:00
Patrick Boutot
05001865a2 Update the size of SSourceControlLogin to let the user-defined source control plugin auto-adjust its size.
#rb lauren.barnes
#preflight 62cf8359a4645cf7b0e4eb58

[CL 21089449 by Patrick Boutot in ue5-main branch]
2022-07-14 07:37:58 -04:00
marc audy
cd4b7d3c78 Game user settings fix and rollback of 20905839, which was itself a rollback of 20029182
#rb [at]Josh.Adams
#preflight

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: mic.rooney
#ROBOMERGE-SOURCE: CL 20973575 via CL 20978259
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
#ROBOMERGE-CONFLICT from-shelf

[CL 20980862 by marc audy in ue5-main branch]
2022-07-07 01:55:35 -04:00
marc audy
c4f29a0675 Fixup files that did not merge properly/got included in the merge unintentionally
#jira
#rnx

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 20962704 via CL 20962785 via CL 20962797
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20964187 by marc audy in ue5-main branch]
2022-07-06 05:41:03 -04:00
marc audy
7c7733328f Update Main from //Fortnite/Dev-EngineMerge [at] 20952818
This represents UE5/Main [at] 20628573
#jira
#rnx

#ROBOMERGE-OWNER: marc.audy
#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 20960321 via CL 20962677 via CL 20962692
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20963796 by marc audy in ue5-main branch]
2022-07-06 05:11:09 -04:00
mic rooney
f5a58f4e71 Temp backout while Josh is out so that we don't break workflows and he can re-backout/unrevert this when he's back in.
* Contains some selected back outs from other cls that included config context dependent changes, though it's limited to only backing out broken parts as much as possible to minimize surface area.

[Backout] - CL20029182
[FYI] josh.adams
Original CL Desc
-----------------------------------------------------------------
- Adding FConfigContext which is used to repalce LoadExternalIniFile, LoadLocalIniFile, etc, as well as have localized data for all configs read on a thread (like the other platform configs loaded in the editor)
- The Load*IniFile functions will create a Context, but eventually those APIs will go away and the Context will be the only way to load ini files
- Simplified some of the ini loading code, like removing the HierarchyCache (it wasn't helping editor load times, and added much complexity, and was not thread-safe, and it shouldn't actually be helpful because all the calls to Load*IniFile should eventually be replaced with either GConfig or FCOnfigCacheIni::ForPlatform(), which won't need to re-read in files
- Ini reading time actually went down due to the simplification, including Cache removal
- Left in old code for now behing a #define (USE_CONTEXT) in case something goes wrong
- Added in VERIFY_CONTEXT mode which I used to run original and Context modes and compare (including preflighting builds) (I also added a Compare function that we may want to keep around to use for future debugging)
- Added a separate set of config layers for plugins which speeds up plugin parsing, but also will fix the issue with BaseEngine.ini vs DefaultEngine.ini in Engine vs Project plugins (this shows how Contexts can bring useful information down into the guts - however a later change will enable it)
- Once this is all seen to be working, I will clean up the non-Context functions, and some globals vs static members, etc
#rb paul.chipchase
#preflight 62716c1c5e6ce673f452005a


#ROBOMERGE-AUTHOR: josh.adams
#ROBOMERGE-SOURCE: CL 20029165 via CL 20029180 via CL 20905839 via CL 20905880
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20908094 by mic rooney in ue5-main branch]
2022-06-30 20:54:32 -04:00
vlad golovan
e378ef3273 Adding Async version of QueryFileState.
#rb Patrick.Laflamme

#ROBOMERGE-OWNER: vlad.golovan
#ROBOMERGE-AUTHOR: vlad.golovan
#ROBOMERGE-SOURCE: CL 20599361 via CL 20599875 via CL 20599876
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20601769 by vlad golovan in ue5-main branch]
2022-06-10 16:29:12 -04:00
stanley hayes
5dbfb6b452 #JIRA: SOL-2791
Updates to source control helpers that:
- allow for reverting files marked for delete
- return success on a successful 'mark for delete'
#rb YiLiang.Siew
#rnx
#preflight 629fca23617cbe81d33de34d

#ROBOMERGE-AUTHOR: stanley.hayes
#ROBOMERGE-SOURCE: CL 20569168 via CL 20569170 via CL 20569172 via CL 20569174 via CL 20569176
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v954-20466795)

[CL 20570262 by stanley hayes in ue5-main branch]
2022-06-08 22:17:43 -04:00
josh adams
46a830d6b4 - Replacing many uses of LoadGlobalIniFile and LoadExternalIniFile with FCOnfigContext
#rb matt.peters
#p4v-preflight-copy 20293528
#preflight 629665d15238916c514359ad

[CL 20441581 by josh adams in ue5-main branch]
2022-05-31 16:25:06 -04:00
wouter burgers
cc6477999d SourceControl: Add FGetSubmittedChangelists operation.
#jira UCS-3549
#review-20287134
#preflight 628745339a4fcb31acdd42e6

[CL 20292011 by wouter burgers in ue5-main branch]
2022-05-20 03:46:02 -04:00
Lauren Barnes
6248f8d412 Replacing legacy EditorStyle calls with AppStyle
#preflight 6272a74d2f6d177be3c6fdda
#rb Matt.Kuhlenschmidt

#ROBOMERGE-OWNER: Lauren.Barnes
#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20057269 via CL 20070159 via CL 20072035 via CL 20072203
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)
#ROBOMERGE-CONFLICT from-shelf

[CL 20105363 by Lauren Barnes in ue5-main branch]
2022-05-09 13:12:28 -04:00
Matt Peters
7ad238a806 AssetRegistry includes (Engine/Source): change #include "AssetData.h" -> #include "AssetRegistry/AssetData.h", and similar for the other moved AssetRegistry headers.
#rb Zousar.Shaker
#rnx
#preflight 6270509a220f89f0ad573030

[CL 20016982 by Matt Peters in ue5-main branch]
2022-05-02 18:06:48 -04:00
vlad golovan
9a0c0dad75 Source control operation to get file from depot. Users can now pull a shelfed changelist files.
#rb Patrick.Laflamme
[REVIEW] [at]marshall.beachy, [at]jay.Nakai

#ROBOMERGE-OWNER: vlad.golovan
#ROBOMERGE-AUTHOR: vlad.golovan
#ROBOMERGE-SOURCE: CL 19745483 via CL 19747037 via CL 19747055
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)

[CL 19801743 by vlad golovan in ue5-main branch]
2022-04-18 23:23:28 -04:00
vlad golovan
702da1818c GetChangelistDescription SourceControlOperation to get information about the changelist for blueprint review tool
#rb patrick.laflamme
[REVIEW] [at]marshall.beachy, [at]jay.Nakai

#ROBOMERGE-OWNER: vlad.golovan
#ROBOMERGE-AUTHOR: vlad.golovan
#ROBOMERGE-SOURCE: CL 19576986 via CL 19578465 via CL 19578760
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19580636 by vlad golovan in ue5-main branch]
2022-03-31 19:25:37 -04:00
paul chipchase
9f5ba891db Added an array view overload to FUpdatePendingChangelistsStatus::SetChangelistsToUpdate to make it easier for the caller to add a single changelist
#rb Luc.Eygasier
#rnx
#robomerge FNNC
#preflight 623490fab43f22036e0fe993

[CL 19435090 by paul chipchase in ue5-main branch]
2022-03-18 10:33:11 -04:00
paul chipchase
bcdf6ba3b9 Fix typo in method name
#rb trivial
#rnx
#preflight 622f580e344901ad192a0cdd

- Fix incorrect spelling in the method name.
- Oddly enough this was spelt correctly for both the member and in the comments.

[CL 19373079 by paul chipchase in ue5-main branch]
2022-03-14 11:14:19 -04:00
paul chipchase
14b6c6fc6a Allow the caller to decide if FUpdateStatus will check for directy paths based on the path itself (terminating in a seperator) or if the file system should be used instead.
#rb Patrick.Laflamme
#jira UE-145721
#rnx
#preflight 622f0358752729a2ad448e16

- The problem we have is if a p4 depot path is used when requesting filestates (to see if the file exists in p4 for example) it will be treated as a networkpath due to it starting with // so calling the filesystem to check if it is a directory or not can get very expensive.
- Other operations just check the end of the path for '/' or '\' which is what this operation used to do, but that was changed at some point to check the file system, presumably to fix another problem and as we don't really know how 3rd party code is using this system we cannot just change the behavior without risking breaking existing code bases.
- This fix allows the caller to opt in to the old behavior of just checking the end of the path to determine if it is a directory or not.
- This fix is not very good, future work for a better fix will be tracked in the attached jira.

[CL 19371141 by paul chipchase in ue5-main branch]
2022-03-14 05:25:55 -04:00
paul chipchase
c08d860e2e Allow additional source control providers to be created so that specialized subsystems can maintain their own separate connection without interrupting the normal editor workflows.
#rb Luc.Eygasier, Sebastien.Lussier
#rnx
#preflight 622895d331133a23da78a4ca

### Misc
- FPerforceSourceControlRevision, FPerforceConnection and FPerforceSourceControlLabel now own a reference to their FPerforceSourceControlProvider and accesses the connection settings from that rather than via the module singleton.
- FPerforceSourceControlCommand now accesses the connection settings by finding the FPerforceSourceControlProvider that the given IPerforceSourceControlWorker references.
- FPerforceSourceControlProvider now owns it's own FPerforceSourceControlSettings rather than accessing a shared one owned by the module.
- Marked a number of derived classes as final.

### FPerforceConnection
- ::EnsureValidConnection can now work without a valid client (although most commands will require a client to run, things like p4 print does not).
-- Due to this change we might not catch cases where the the system cannot connect to source control as the user is not logged in as this would get caught when we checked the workspace by calling ::TestConnection.
-- To get around this ::EnsureValidConnection will now call "p4 login -s" via the newly added TestLoginConnection.
- Renamed ::TestConnection to ::TestClientConnection as we are really testing the connection to the specified workspace.
- There does seem to be some inconsistency in the logging, depending how a perforce source control provider first creates its connection as in some cases FPerforceConnection::EnsureValidConnection gets called first and in other cases FPerforceConnection::EstablishConnection is called. We should unify these paths but this change list is already so large I am opting to postpone this to it's own work item.

### FPerforceSourceControlModule
- Removed all of the singleton style accessors so that classes inside of the module can no longer assume that there is only one FPerforceSourceControlProvider. Updated the documentation to match.
- Since there is no reason for classes in the module to need to access FPerforceSourceControlModule, ::Get has been removed
- The responsibility to register all of the worker creation delegates has been moved to IPerforceSourceControlWorker so that all source control providers can share them.
- ::GetProvider has been removed, if a class inside the module needs access to a provider then a reference to it's provider will be given to it at construction time.
- ::SetLastError, ::AccessSettings and ::SaveSettings are now called directly on FPerforceSourceControlSettings

### FPerforceSourceControlSettings
- This class now takes the name of the system that owns it as a parameter in the constructor
-- The name will be used to identify where to store the settings in the config file, unless the name is blank in which case the pre-existing default location will be used.
- This will allow for multiple source control providers to store their connection info.

### SPerforceSourceControlSettings
- Moved FGetWorkspaces from SPerforceSourceControlSettings.h to its own header file to reduce the number of places that need to include the slate headers.
- Move the fwd declares to the top of the header base don recent coding standards discussions.
- Instead of accessing the source control provider via FPerforceSourceControlModule the dialog is now given a pointer to one when constructed.
-- This pointer is assumed to always be valid and should be a reference if the slate system supported it.

### PerforceSourceControlOperations
- IPerforceSourceControlWorker now takes a reference to the owning FPerforceSourceControlProvider in it's constructor. All derived workers have been updated to this.
- Moved the registering of worker creation delegates from the module cpp to a new static method IPerforceSourceControlWorker::RegisterWorkers
-- This should make it easier to find when adding a new worker and allows source control providers to share the same map of delegates rather than duplicating it.
-- This means we also need a new static method IPerforceSourceControlWorker::CreateWorker for instantiating new workers based on the given name.

### FSourceControlInitSettings
- This is a new class that is used to set up a newly created source control provider.
- The settings are expected to be given in the same way you would override settings via the cmdline. The existing perforce cmdline code has been updated to use this class.
- This still has the downside that the calling code needs to know the type of source control provider, but I don't really see a good way around this unless we refactor the entire API to be feature based.

[CL 19318801 by paul chipchase in ue5-main branch]
2022-03-09 07:10:46 -05:00
luc eygasier
17192faa91 Modifies UpdateStatus to enforce full validation only if bForceUpdate flag is used. Ignoring files not opened/edited by default.
#jira UE-142984
#rb Matt.Johnson
#preflight 621e9446f1206ae3ea672a99


#ROBOMERGE-AUTHOR: luc.eygasier
#ROBOMERGE-SOURCE: CL 19209915 via CL 19210531 via CL 19211958 via CL 19212023 via CL 19212162
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19224112 by luc eygasier in ue5-main branch]
2022-03-02 13:11:09 -05:00
paul chipchase
bfbe90794a The source control operation FCreateWorkspace now supports setting a description.
#rb Sebastian.Nordgren
#rnx
#preflight 621896c2a77f4c4a4b9b7a86

[CL 19143635 by paul chipchase in ue5-main branch]
2022-02-25 04:17:39 -05:00
richard malo
b3c340041b Added option to provide a different project directory to be used by source control.
#rb scott.nelson
[FYI] luc.eygasier
#preflight 62055a9369224cb0d87518ca

#ROBOMERGE-OWNER: richard.malo
#ROBOMERGE-AUTHOR: richard.malo
#ROBOMERGE-SOURCE: CL 18943053 via CL 18944261 via CL 18944332 via CL 18944374 via CL 18946678 via CL 18946778
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18946785 by richard malo in ue5-main branch]
2022-02-10 19:07:07 -05:00
Mike Beach
d1f8e0da6e Adopting some editor source control modifications from a partner stream.
* Introduces a new 'GetFileList' operation
  * Adds "keep checked out" option to other operations

#rb Luc.Eygasier
#preflight 620598920c64e1822f4849a8

[CL 18946159 by Mike Beach in ue5-main branch]
2022-02-10 18:34:05 -05:00