Skip to content

Commit

Permalink
Merge pull request #44 from PlasticSCM/1002231-fix-revert-unchange-sl…
Browse files Browse the repository at this point in the history
…ow-status

Apply to "RevertUnchanged" the same optimization as for "Sync"
  • Loading branch information
juliomaqueda committed Oct 25, 2022
2 parents e159c41 + 874ee52 commit 310c5af
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,12 @@ bool FPlasticRevertUnchangedWorker::Execute(FPlasticSourceControlCommand& InComm
{
Files.Add(FPaths::ConvertRelativePathToFull(FPaths::ProjectContentDir()));
}
// detect the special case of a Sync of the root folder:
else if ((InCommand.Files.Num() == 1) && (InCommand.Files[0] == InCommand.PathToWorkspaceRoot))
{
// only update the status of assets in the Content directory
Files[0] = FPaths::ConvertRelativePathToFull(FPaths::ProjectContentDir());
}
PlasticSourceControlUtils::RunUpdateStatus(Files, false, InCommand.Concurrency, InCommand.ErrorMessages, States, InCommand.ChangesetNumber, InCommand.BranchName);

return InCommand.bCommandSuccessful;
Expand Down Expand Up @@ -1043,7 +1049,7 @@ bool FPlasticSyncWorker::Execute(FPlasticSourceControlCommand& InCommand)
{
// now update the status of our files
// detect the special case of a Sync of the root folder:
if ((InCommand.Files.Num() == 1) && (InCommand.Files.Last() == InCommand.PathToWorkspaceRoot))
if ((InCommand.Files.Num() == 1) && (InCommand.Files[0] == InCommand.PathToWorkspaceRoot))
{
// only update the status of assets in the Content directory
TArray<FString> ContentDir;
Expand Down

0 comments on commit 310c5af

Please sign in to comment.