Commit Graph

185 Commits

Author SHA1 Message Date
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
23561c479e Backing out my previous backout in CL 21008523 to avoid conflicts with release engine staging
#rb none
#rnx
#preflight 62cfc09a5c36489ec9cab393

[CL 21088298 by paul chipchase in ue5-main branch]
2022-07-14 03:22:35 -04:00
paul chipchase
85ed853f9b Backing out 21008487, submitted to the wrong branch
#rb none
#preflight skip

[CL 21008523 by paul chipchase in ue5-main branch]
2022-07-08 11:54:05 -04:00
paul chipchase
bbc5c94cd1 Fix issues when trying to run a perforce connection without a clientspec
#rb Sebastian.Nordgren
#rnx
#jira UE-158934
#preflight 62c829272823f28cf273a5aa

### Perforce Connection
- The test for bRequireWorkspace was inverted, we only want to require a workspace if the workspace is NOT optional.
- Combined the two if statements checking if we should try and auto assign a workspace to reduce indentation.
- Changed use of Len() == 0 to IsEmpty() for consistency
- Do not take the workspace name from the default environment if bRequireWorkspace is false

### PerforceSourceControlProvider
- When switching workspaces use EConnectionOptions::WorkspaceOptional when establishing the connection since we are providing the workspace name.
- Remove the check, the entire point of ::EnsureValidConnection is that it can change the workspace requested.

### PerforceSourceControloOperations
- Running FConnect command with perforce does not actually connect, but rather validates the clientspec. This needed to be changed to not give an error if the clientspec is empty.
- I'd rather allow FConnect to work for connections without a clientspec rather than avoid calling it at a higher level in case a different source control provider would require FConnect to be called at this point. Not calling it requires too much knowledge of the target source control provider to be safe.

### Future Work
- Currently the optional workspace flag is used to indicate that the workspace is being set for the connection manually and we don't want to auto evalute the workspace name. However we are really confusing two different issues here 1) having no client 2) having a specific client. In the second case we might want to allow defaulting to a valid workspace. So overall it would be better to have a flag indicating that it is okay to have no clientspec name and another flag indicating that we want to fallback to a valid name if the one we provided was not valid.

[CL 21008487 by paul chipchase in ue5-main branch]
2022-07-08 11:52:00 -04:00
marc audy
eeba153b77 Fix duplicate line
#jira
#rnx

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 20962814 via CL 20962822 via CL 20962837
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20964190 by marc audy in ue5-main branch]
2022-07-06 05:41:11 -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
patrick laflamme
661a74232a Added a CPU timer scope into PerforceSourceControlProvider::Tick() to capture time spend when a state update is broadcasted.
#rb Trivial
#preflight Trivial

#ROBOMERGE-AUTHOR: patrick.laflamme
#ROBOMERGE-SOURCE: CL 20894232 via CL 20894414 via CL 20894720
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20898581 by patrick laflamme in ue5-main branch]
2022-06-30 13:21:21 -04:00
Patrick Laflamme
f5f7265c8b Added TRACE_CPUPROFILER_EVENT_SCOPE to Perforce integration plugin to be able to capture some performance metrics.
#rb Trivial
#jira UE-155232 - Capture/Profile performance data for P4.
#preflight 62b1e14c405a18a061f2d594

[CL 20758715 by Patrick Laflamme in ue5-main branch]
2022-06-21 11:41:13 -04:00
lauren barnes
5f7006fb53 Fixing EditorStyle->AppStyle merge errors
#rb trivial

#ROBOMERGE-AUTHOR: lauren.barnes
#ROBOMERGE-SOURCE: CL 20073150 via CL 20073151
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 20105751 by lauren barnes in ue5-main branch]
2022-05-09 13:31:58 -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
paul chipchase
62b9de0943 Fix some duplicate localization keys
#rb trivial
#rnx
#jira UE-150811
#preflight 62711ad0006bd3ab9e8e2aaf

[CL 20023722 by paul chipchase in ue5-main branch]
2022-05-03 08:20:56 -04:00
paul chipchase
6e0e15496e Running FCreateWorkspace/FDeleteWorkspace with the perforce source control provider will no longer print info directly to stdout.
#rb trivial
#rnx
#preflight 626f823667326112684d0c24

- Because the commands do not return data in tagged format it was being written directly to stdout, this would cause odd log messages stating that a workspace had been create/deleted that would be displayed outside of our normal logging format.

[CL 20006887 by paul chipchase in ue5-main branch]
2022-05-02 03:23:09 -04:00
paul chipchase
c05b7f24d5 Combined the boolean parameters we pass to FPerforceConnection into a single bit field and add a new option to apply the global-opt '-q' to a command to supress non tagged output.
#rb martin.ridgers, wouter.burgers
#rnx
#preflight 626be80153253f874bcbee3c

- Some commands do not return tagged output even when we set that as our preference and will print the output to stdout as we are not currently collecting the standard output messages.
-- We could collect this output and return as info to the caller but that would involve adding more parameters which I am loath to do at the moment. At some point I plan to replace all of the FPerforceConnection::Run input and output parameters with single data structures and unify the different connection types at which point adding support for returning all info output would make sense.
-  To supress this output we would normally pass -q as a global-opt for the command, which in the case of the cpp API requires us to call ::SetQuiet on the client users but for that we need to be able to pass in the request to FPerforceConnection::Run.
-- Note that calling ::SetQuiet is pretty much the same as overriding ClientUser::OuputInfo
- At this point we had two bool parameters in ::Run already, so when adding a third we might as well convert this to a bitfield of flags.
- It seems that the former parameter bInAllowRetry was never hooked to anything since the last large source conde API refactor near a decade a go, so that could just be removed.
- I felt that the former parameter 'bInStandardDebugOutput' was not clearly named, in the end if it was true we would log the full p4 command (and timing of the command in VeryVerbose mode) and in almost all cases this was set to true. So I flipped the flag so it is not set to opt out of logging a command.
- I removed one overload of FPerforceConnection::Run by setting the flags to have a default value. This should help discourage anyone from adding more parameters to the method.

[CL 20006796 by paul chipchase in ue5-main branch]
2022-05-02 03:00:12 -04:00
vlad golovan
2c2075a040 Fix compile error due to new default constructor requirement in later versions of the engine.
#rb Patrick.Laflamme
[REVIEW] [at]marshall.beachy, [at]jay.Nakai

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

[CL 19801760 by vlad golovan in ue5-main branch]
2022-04-18 23:23:50 -04:00
vlad golovan
4cc6a48114 Fix a copy paste error. 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 19747073 via CL 19747089
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)

[CL 19801750 by vlad golovan in ue5-main branch]
2022-04-18 23:23:34 -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
paul chipchase
0bd3da68aa Fix FPerforceSourceControlProvider::TryToDownloadFileFromBackgroundThread not appending info/error messages to the provided operation
#rb trivial
#rnx
#preflight 6256abb45f20a0a34d9d62e9

- This way of invoking an operation was missing a call to FPerforceSourceControlCommand::ReturnResults which will pass the info/error messages from the command to the operation that the caller passed into the provider in the first place.
- This will allow the caller to gain access to any messages generated during the operation.

[CL 19737642 by paul chipchase in ue5-main branch]
2022-04-13 06:59:45 -04:00
vlad golovan
5447a07e30 Fix for Issue #157997: Compile errors in PerforceSourceControlOperations.cpp
#Jira UE-147800
[REVIEW] [at]marshall.beachy, [at]jay.Nakai

#ROBOMERGE-AUTHOR: vlad.golovan
#ROBOMERGE-SOURCE: CL 19580101 via CL 19580104
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v938-19570697)

[CL 19580699 by vlad golovan in ue5-main branch]
2022-03-31 19:27:20 -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
wouter burgers
3217b35e31 Fixed 'files(s) -> file(s)' typo's in code and comments.
#jira none
#review-19507050
#preflight 623dbe0b9f11d3c739504676

[CL 19524850 by wouter burgers in ue5-main branch]
2022-03-28 05:50:13 -04:00
Patrick Laflamme
f628fe1bba Fixed FUpdatePendingChangelistsStatus operation that did nothing if a specific set of changelist was requested.
#jira UE-145489 - Perforce source control doesn't update a specific set of P4 change list states
#rb Paul.Chipchase
#preflight 62335a876666d7e7539c378f

[CL 19422016 by Patrick Laflamme in ue5-main branch]
2022-03-17 12:14:02 -04:00
paul chipchase
165fbc87be FDelete now works correctly (for perforce) when passing in a ISourceControlChangelist when the operation is executed.
#rb Per.Larsson
#rnx
#preflight 6232edad736af8e082347531

- When executing FCheckOut, passing in a valid ISourceControlChangelist to ISourceControlProvider::Execute will cause the checked out files to be added to the given changelist.
- FDelete now both have the same functionality, based on the FCheckOut code.
- Note that we follow the existing convention that a changelist provided on the command line always overrides a changelist passed into ::Execute
- This code exists in some form or other in most of the workers, we probably should move it to a single function somewhere to avoid potential divergence.

[CL 19418324 by paul chipchase in ue5-main branch]
2022-03-17 05:29:20 -04:00
paul chipchase
82a27f8cf9 Fix problems setting perforce settings from the commandline introduced in CL 19318801.
#rb Sebastian.Nordgren
#rnx
#preflight 62309ccae65a7e65d686d1dc
#robomerge FNNC

- The behaviour for the settings for the default provider (that takes it's settings from the command line) should be OverrideExisting not  OverrideAll to maintain the original behaviour. This was a mistake due to misreading the original code. As it was, setting one setting via the command line would clear any previously set or saved settings.
- When parsing the cmdline we used the form "KeyName=" as the key, as FParse::Value does not strip the = automatically, but when we were looking up the values to override settings we were just using "KeyName" which would not match. The lambda ::ParseCmdLineSetting now adds = to any key passed in when parsing, so there is no longer a need for the caller to add it. This helps the keys match and work correctly.

[CL 19386795 by paul chipchase in ue5-main branch]
2022-03-15 11:32:55 -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