Commit Graph

194 Commits

Author SHA1 Message Date
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
patrick laflamme
6819c99704 Removed the creation of hundreds of unneccesary temporary strings while parsing P4 results.
#rb Patrick.Enfedaque
#preflight 6310a693e352708d4462e191

[CL 21743001 by patrick laflamme in ue5-main branch]
2022-09-01 12:40:50 -04:00
SRombauts
8df7cabe69 Updated the changelist window to handle the Enter and Delete keys to Submit or Delete the currently selected changelist if conditions to do these operations are met. This mimics P4V behavior.
Updated the changelist window to handle double clicking on a changelist. This opens the submit dialog if the submit conditions are met. This mimics P4V behavior.

PR #9433: [Source Control] Changelists window: intercept Enter and Delete keys to Submit or Delete the current changelist (Contributed by SRombauts)
#jira UE-160314
#rb Patrick.Enfedaque
#preflight 630d1e68f92416fb92702657

[CL 21709874 by SRombauts in ue5-main branch]
2022-08-30 17:17:25 -04:00
patrick laflamme
bff7926319 Modified the source control submit window opened from the changelist window:
- Supported editing the changelist and saving it in P4. If the submit fails, the code will also try to save any edited changelist description.
  - Enabled the 'keep checked out' button when submitting from the changelist window.
  - Fixed the P4 cache not properly updating the file 'kept in checkout'.
  - If the submit window is opened from the Source Control menu at the bottom right of the Eitor, the new 'Update' button to save the changelist description is not visible, this is not supported for all source control provider.

Added a delay of 1.5 seconds before showing the slow stack in the changelist window when refreshing the UI.

#jira UE-155238 - Add the option to "keep file in checkout"
#jira UE-155235 - Allow the user to save the description from the submit window.
#rb Patrick.Enfedaque
#preflight 6303e4e75a5d4e4624f5ab6d

[CL 21512088 by patrick laflamme in ue5-main branch]
2022-08-23 13:05:52 -04:00
patrick laflamme
7f2a598696 Refactored the Changelist Window UI to work better with large changelists along with bug fixes.
This submit should not regress any existing functionalites of the previous widget.

Along with the user interface changes, notable bug fixes were included
  - If a changelist is not specified for P4 operations 'Mark for Add', 'Mark for Delete and 'Checkout', defaulted to the 'default' P4 changlist. Without a valid changelist, the cache wasn't properly updated.
  - Fixed updating the cache for P4 'Mark for delete' operation not correctly updating the file changelist cached in the file state.

Other changes:
  - P4 changelists are now always returned sorted by changelist number, ascending.
  - Some of the safe operations were running synchronous are not running asynchrnous (create new changelist, delete empty changelist, delete shelved files).

This submit addresses the following Jiras:

#jira UE-155207 - Refactor the changelist window layout to have the left/right panel.
#jira UE-155209 - Add the context menu on right click on a file or a changelist.
#jira UE-155218 - Support creating new empty changelist from the changelist view.
#jira UE-155220 - Support moving files from the selected changelist (right view) to another changelist (left view)
#jira UE-155211 - Add visual feedback for any operation taking more than 0.5s.
#jira UE-155212 - Display a list of uncontrolled files in the left panel of the changelist window
#jira UE-155499 - Changelist windows buttons should be disabled if SCC is disabled
#jira UE-155229 - Add an option to automatically refresh the changelist window when new assets are imported|created (as uncontrolled), marked for add, checked out, marked for delete
#jira UE-107577 - Source Control's Changelists dialog does not refresh to reflect changes made while open

#rb Patrick.Enfedaque
#preflight 62ff946ef7404b55a326297b

[CL 21499885 by patrick laflamme in ue5-main branch]
2022-08-22 21:20:05 -04:00
paul chipchase
50655b3fd6 Do not try validating the perforce connection when switching to not using a workspace.
#rb Per.Larsson
#jira UE-160083
#rnx
#preflight 62f507c7b66d5d93139804a6

- If we are switching workspaces then we already know that the existing perforce settings are correct.
- The only reason we have to validate them is if we are switching to a different workspace and need to make sure that it exists.
- If we are just removing the workspace name entirely (which is valid for a number of operations) then we have nothing to check and we can just remove the workspace name from our p4 settings structure.
- This saves issuing a few pointless p4 commands.

[CL 21353145 by paul chipchase in ue5-main branch]
2022-08-12 06:59:24 -04:00
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
jeanfrancois dube
5f4ba555d2 Downgrade a warning to a log.
#rb none
#preflight none
#rnx

#ROBOMERGE-AUTHOR: jeanfrancois.dube
#ROBOMERGE-SOURCE: CL 21283396 via CL 21283402 via CL 21283404
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21289144 by jeanfrancois dube in ue5-main branch]
2022-08-09 11:33:30 -04:00
jeanfrancois dube
bf6ca2169e Perforce Source Control: always print perforce command execution time when it takes over 100ms.
#rb richard.malo
#preflight none
#rnx

#ROBOMERGE-AUTHOR: jeanfrancois.dube
#ROBOMERGE-SOURCE: CL 21283151 via CL 21283152 via CL 21283156
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)

[CL 21289096 by jeanfrancois dube in ue5-main branch]
2022-08-09 11:32:20 -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
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