Commit Graph

218 Commits

Author SHA1 Message Date
pj kack
4023ee1dde UnrealPak: Optimizations for small workloads.
Add -fastexit parameter to terminate process instead of shutting down engine.
Turn off build target features to build less code (total dll size reduced from 56 MB to 46 MB).
Disable external profiler supports (skips loading of some dlls).
Don't spawn any reserve workers (by adding a DefaultEngine.ini for UnrealPak).
Make UnrealPAk compile in Test config (by fixing compile error in PerforceConnection.cpp).

#rb carlmagnus.nordin
#rnx
#preflight 63e5eaf66473b534f14e377b

[CL 24118943 by pj kack in ue5-main branch]
2023-02-10 10:13:31 -05:00
wouter burgers
1d6ef4b2e3 SourceControl: Added CanExecuteOperation to ISourceControlProvider interface.
#preflight 63de1752fe33a06594fc2e02

[CL 24018386 by wouter burgers in ue5-main branch]
2023-02-04 10:54:03 -05:00
jordan hoffmann
c0d518be33 [Backout] - Reverted Changes to SPerforceSourceControlSettings made in CL23857698
#preflight trivial
#rb dan.oconnor

[CL 23984120 by jordan hoffmann in ue5-main branch]
2023-02-02 18:44:45 -05:00
paul chipchase
39f6471fad Fix the perforce source control api returning invalid file paths when the users client spec root ends with a '/'or '\'
#rb Brooke.Hubert, Patrick.Laflamme
#rnx
#preflight 63d7927df62671520156e69d

- CL 23859876 introduced optimizations that consider a filepath to be invalid if the path contains consecutive path separators (DirA//DirB for example instead of DirA/DirB) and although no issues were seen when testing we fairly quickly ran into a user facing errors when trying to submit work from the editor.
- The users client spec root had a '\' at the end of it where as most internal devs do not. This in turn caused problems when parsing file info from source control as the code was assuming that the client spec root had no trailing separator and was adding one.
- We now normalize the client spec root after we parse it via a call to FPaths::NormalizeDirectoryName which should enforce that the root path match all our usual expectations.

[CL 23945309 by paul chipchase in ue5-main branch]
2023-02-01 04:04:01 -05:00
henrik karlsson
5d182413f0 [Engine/Plugins]
* Added IWYUSupport.KeepAsIsForNow on a bunch of plugins that requires work to be able to run iwyu

#preflight skipped
#rb none

[CL 23898272 by henrik karlsson in ue5-main branch]
2023-01-28 03:18:29 -05:00
jordan hoffmann
890ebc2a44 [BugFix] Disabled ReviewChangelist tool when source control is inactive
also made SPerforceSourceControlSettings::GetPassword() fail silently when on a non-slate thread rather than asserting
#jira UE-169786
#jira UE-172421
#jira UE-173530
#rb none
#preflight 63d197fe45795e7d5c0a2ef2

[CL 23863403 by jordan hoffmann in ue5-main branch]
2023-01-25 20:42:28 -05:00
bob tellez
eec77c4bc0 #UE Remove some redundant messages from the DownloadFile p4 operation, similar to how other operations behave
[CL 23603094 by bob tellez in ue5-main branch]
2023-01-06 16:09:40 -05:00
paul chipchase
cffcf4bf46 Fix the perforce API reporting that files are not under source control when polled via the depot path.
#rb brooke.hubert
#jira UE-172649
#rnx
#preflight 63986274c16855964d9cfc76

- If we queried the state of a file using the depot path it would parse correctly but internally record the state as 'DontCare' meaning that it has no special state but the change in 23468037 causes files with that state to be classed as not under source control.
- The root problem that 23468037 was fixing was that when querying a file that does not exist (using client paths) we expect the file state to be set to 'NotInDepot' but for a file in a unit test this state was coming back as 'DontCare'. This was due to the imaginary file was being queried as a depot location (Engine root) where most users do not have permission to add things, so instead of an error message indicating that the file does not exist, the server was returning an error relating to permissions.
- We can fix this by checking for the permission error and adding that to the list of errors that result in us setting the 'NotInDepot' state. Which in turn allows us to remove the change from 23468037 that was blocking the depot path queries.
- There is an argument to be made that we should not allow file states to be queried via depot paths and doing so should raise an error. To allow that we would need to extend the source control api with a way to query files server state which would be out of scope for a release hot fix.

[CL 23531470 by paul chipchase in ue5-main branch]
2022-12-15 15:59:42 -05:00
stuart hill
d8b31f7ed0 Add a flag to the source control provider to tell us if 'uncontrolled' changelists are supported.
#rb Marco.Anastasi, zach.rammell
#prelight 6398633f8c5081ee9a275f20

[CL 23499875 by stuart hill in ue5-main branch]
2022-12-13 18:18:02 -05:00
brooke hubert
696920d4fd Fix source control automated tests that were failing
#Jira UE-172352
#preflight 63921eedbb6fefa472891573
#rb jamie.dale

[CL 23475330 by brooke hubert in ue5-main branch]
2022-12-11 23:10:18 -05:00
aditya ravichandran
28eccf9aa0 Revision Control Iconography Update:
Update the default set of revision control icons
Create FRevisionControlStyleManager to manage the currently active revision control style and add a default style that is used by all providers
#rb lauren.barnes, brooke.hubert
#preflight 639364ee67018b14b5fb9891

[CL 23466976 by aditya ravichandran in ue5-main branch]
2022-12-09 14:18:01 -05:00
aditya ravichandran
f8b7ee5555 Replace any instances of "Source Control" with "Revision Control" in text in the Editor
#rb JeanMichel.Dignard, Robb.Surridge
#preflight 637d180efa348e8480e8837e

[CL 23250808 by aditya ravichandran in ue5-main branch]
2022-11-23 11:57:50 -05:00
henrik karlsson
b5164ac775 Fixes to make modules compile with IWYU. We've added to IWYU toolchain so it compiles "orphaned" headers which does not have a owning cpp file. This identified lots of headers that couldn't be compiled by themselves (or if they were to included first)
Change consist of only forward declaration and additional includes

#preflight 63789c1de30d438849c48188
#rb none

[CL 23218412 by henrik karlsson in ue5-main branch]
2022-11-21 03:22:23 -05:00
paul chipchase
1a00222986 The perforce source control API can now issue a single p4 print command with multiple depot file paths as arguments rather than issuing a single p4 print command per file.
#rb PJ.Kack
#jira UE-167578
#rnx
#preflight 635bdddd5b54febd38b7efd0

- Clean up the source control backend by removing the older code path that was ifdefed out and clean up the new path.
- FPerforceConnection no longer takes a TOptional<FSharedBuffer> but takes an optional pointer to a TArray of FSharedBuffer. When gathering files this should return one FSharedBuffer per file requested.
-- It might make more sense to attach the FSharedBuffer to the FP4Record but that would require some bigger changes and would be better suited to being some follow on work. All the code is private in the module and not exposed so it is fairly safe and easy to do these refactors later.

- Replaced the TArray buffer for gathering files with a purpose built class FP4DepotFile.
- When issuing a p4 print command with multiple files we will get one call to ClientUser::OutputStat followed by calls to either ClientUser::OutputText or ClientUser::OutputBinary until all of the file has been delivered, then we will get another call to ClientUser::OutputStat for the next file and so on.
-- Note with binary files we seem to get one final call to ClientUser::OutputBinary with zero size, which I assume is supposed to signal the end of the transfer, text files do not get this, they seem to just stop.

[CL 22888671 by paul chipchase in ue5-main branch]
2022-11-01 15:10:19 -04:00
stuart hill
1fc502d9b1 Give the option to disable being able to diff files in the Source Control Submit Widget. To allow this, AllowsDiffAgainstDepot function should return false.
#preflight 6360fd498768c5532f5425f0
#rb Marco.Anastasi, Patrick.Laflamme

[CL 22888653 by stuart hill in ue5-main branch]
2022-11-01 15:09:57 -04:00
christian savoie
fd89edb9be Add access to local revision number for all source control systems.
Change perforce Revert option to be based on if an item is checked out or marked for add, rather than if it can be checked in.

#tests Used to implement source control menu refactor https://p4-swarm.epicgames.net/reviews/22528870

[CL 22863683 by christian savoie in ue5-main branch]
2022-10-31 11:08:06 -04:00
paul chipchase
d657c87f4d Prevent a slate assert if a perforce connection error is encountered when initializing VA source control connections from background threads.
#rb Sebastian.Nordgren
#rnx
#preflight 63581307d669d2aa7ec95866

- Added FTSMessageLog which is a thread safe version of FMessageLog with limited functionality. It can be used as a thread safe drop in replacement for code that only wants to send messages to the FMessageLog system.
- Somewhat experimental at the moment so it is being kept private in the perforce plugin where it is immediately needed.
- Thread safety is currently achieved by using the normal logging system if we detect that the messages are being added from background threads.
-- In future work this will be improved and we will marshal the messages to the GameThread.

[CL 22795873 by paul chipchase in ue5-main branch]
2022-10-26 18:17:21 -04:00
christian savoie
48b260a74e Fix Perforce Sync command to correctly use Revision value.
Add Revision and Force options to Plastic and Subversion.

#tests Used when implementing source control menu refactor  https://p4-swarm.epicgames.net/reviews/22528870, only tested perforce sync command.

[CL 22683432 by christian savoie in ue5-main branch]
2022-10-21 01:05:23 -04:00
patrick enfedaque
aa180f6f09 Fix not being able to revert Uncontrolled Changelist changes with files not at head revision. (files were forced synched to proper revision but would stay in the UC)
- Add flag to SourceControlOperation to test modified status against synched revision (p4 #have)
- Use this new flag when testing for modifications in UncontrolledChangelist

#jira UE-165558
#rb luc.eygasier
#preflight 633633b7936ff7e3dcda5f92

[CL 22271768 by patrick enfedaque in ue5-main branch]
2022-09-30 11:39:49 -04:00
marco anastasi
dd01cd42b5 Create shortcut buttons in Status Bar for Skein operations
#rb wouter.burgers, patrick.laflamme
#preflight 63301d3d665f6b8f7fab0066


RESOLUTION: Resolved conflict with IsAtLatestRevision() and GetNumLocalChanges()

[CL 22193646 by marco anastasi in ue5-main branch]
2022-09-26 16:32:49 -04:00
paul chipchase
623ba6cc9e The source control settings for the VA source control connection are no longer saved to a local ini file.
#rb Per.Larsson
#jira UE-163834
#rnx
#preflight 632d98e4b4515b7e221654ec

### Virtualization
- At the moment there is no way in the editor UX to change the source control settings for the source control backend, so what ever settings are found in the global environment would be applied when the editor is first run and then saved to a config file under the <saved> directory. From this point onwards those settings would always be used when setting up the source control backend. If the settings were wrong, the first time that the editor was started, then we'd continue to use the incorrect settings even if the global enviroment was fixed. Making the backend work at that point would require that the user know about the local ini file and change the settings there.
- We cannot fix this by just ignoring the ini file as it has been requested that users can add their settings there in case they want to customize things, so we just need to avoid saving to it.
- Added documentation to the source control backends header file on how to set up the ini file if needed.

### Perforce
- FSourceControlInitSettings now accepts EConfigBehavior which describes how we want the source control provider to deal with its settings with regards to the ini file.
- Note that EConfigBehavior is not a bitfield as we do not wish to support only writing to the ini file, there is no point if it cannot be read from.
- When the source control provider is creatred we pass on the into from EConfigBehavior to the FPerforceSourceControlSettings to enable/disable saving and loading.

[CL 22163769 by paul chipchase in ue5-main branch]
2022-09-23 20:05:59 -04:00
paul chipchase
700ad12ab5 Overriding the perforce server address (P4PORT) no longer requires that the user (P4USER) and workspace (P4CLIENT) be overridden as well.
#rb
#jira UE-164284
#rnx
#preflight 632b058efc7f1efbdf92c1b0

- Changed check so that we only check if  'NewServerName' is set in order to apply it as the P4PORT.
-- Originally P4PORT, P4USER and P4CLIENT were all set inside of this if statement and it seems to have been assumed that either all three of the input parameters will be set, or none of them.
-- Host masquerading was added later and was specifically done so that it would only be applied if the P4PORT is overridden as well. I am not sure on the use case for this so I opted to leave it alone.
- Some of the earlier connection attempts don't use the user name or the workspace name so reporting them as part of the failure can be confusing. I have removed them.

[CL 22122719 by paul chipchase in ue5-main branch]
2022-09-21 16:29:22 -04:00
wouter burgers
286e2234bf SourceControl / UEFN: Remove / disable 'sync' context menu item in Content Browser.
For SourceControl providers that do not support individual file revisions, the 'Sync' option in the context menu of the Content Browser is misleading as it suggests only the selected files/folders will be synced, while in reality the sync is project wide. I've left the current behavior as the default behavior for all but Skein/Git of which I know they do not support individual file revisions.

#preflight 631ec93359159ac1832b5538

[CL 22086921 by wouter burgers in ue5-main branch]
2022-09-19 21:54:19 -04:00
patrick laflamme
d9a04862a3 Added the 'Last Saved' and 'User' column to the changelist window.
- Implemented sorting and searching for the new columns.
  - Added a FUpdateStatus request to the source control provider when the user selects a changelist.  This gets the users that checked out the files along with extra file status.

Added support to enable/disable changelist window columns for 'Type', 'Last Saved' and 'User' columns and persisted the settings.
Added tooltips over the changelist row that display the content of a column. Useful when the value is clipped because the column is too small.
Added tooltips over the changelist row header.
Prevented creation of useless temporary strings in PerforceSourceControlOperations.cpp

#rb Patrick.Enfedaque
#preflight 6323613367163bf6600d4fc6

[CL 22040806 by patrick laflamme in ue5-main branch]
2022-09-15 18:45:09 -04:00
patrick laflamme
613bcd7b4d Fixed the 'Submit Window' saving the description of the default changelist into a new changelist without moving the files.
- In the 'Submit' window, renamed the 'Apply' button to 'Save' button.
  - If the user saves with the 'default' changelist, a new changelist is created with the user description and files are moved into that changelist.
  - If the user saves with any other changelist, ony the description is edited.

#rb Luc.Eygasier
#preflight 631a13a2304480f8f85aba2c

[CL 21909342 by patrick laflamme in ue5-main branch]
2022-09-08 20:48:26 -04:00