Announcement

Collapse
No announcement yet.

Plugin - Perforce: call Methods from API - location of temporary files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Plugin - Perforce: call Methods from API - location of temporary files

    Hi,

    I need to call for a Plugin, methods from the Perforce-API (provided by the Source of the Perforce-UE-Plugin).

    It works and I gathered files from a certain label which i need to get the Revision associated with the label.

    But when i call "Get(FString& filename)" no errors are printed and the files are saved somehow in a temporary file.

    But i donĀ“t know atm how to get these temporary files.

    Does anybody know how to get access to these files ? There are no changes in the Workspace.

    Thanks.



    Code:
    void USrcControl::GetFilesFromLabel(const FString& InLabel, const FString& LabelPath)
    {
    
     ISourceControlProvider& SourceControlProvider = ISourceControlModule::Get().GetProvider();
    
     TSharedPtr<ISourceControlLabel> SourceControlLabel = SourceControlProvider.GetLabel(InLabel);
    
     TArray<FString> InFiles;
     InFiles.Add(*LabelPath);
    
     if (SourceControlLabel != NULL)
     {
        SourceControlLabel->GetFileRevisions(InFiles, OutRevisions);
     }
     else
     {
        UE_LOG(LogTemp, Warning, TEXT("Label %s not found. Make sure the Versionfile is up to date!"), *InLabel);
     }
    }
    and

    Code:
    void USrcControl::GetFilesFromServer()
    {
        // IPLatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();
    
        for (auto e : OutRevisions)
        {
            FString fileName = e->GetFilename();    //.Append(TEXT("_tmp"));
            e->Get(fileName);
        }
    }
    Output:
    I get the files from Label for Revision 1

    Code:
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Binaries/Win64/UE4Editor-PluginBrowser.dll //Plugins/PluginBrowser/Binaries/Win64/UE4Editor-PluginBrowser.dll#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Binaries/Win64/UE4Editor-PluginBrowser.pdb //Plugins/PluginBrowser/Binaries/Win64/UE4Editor-PluginBrowser.pdb#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Binaries/Win64/UE4Editor.modules //Plugins/PluginBrowser/Binaries/Win64/UE4Editor.modules#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Default.rc2.res //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Default.rc2.res#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Definitions.PluginBrowser.h //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Definitions.PluginBrowser.h#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/LiveCodingInfo.json //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/LiveCodingInfo.json#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Module.PluginBrowser.cpp //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Module.PluginBrowser.cpp#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Module.PluginBrowser.cpp.obj //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Module.PluginBrowser.cpp.obj#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Module.PluginBrowser.cpp.obj.response //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Module.PluginBrowser.cpp.obj.response#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Module.PluginBrowser.cpp.txt //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/Module.PluginBrowser.cpp.txt#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.dll.response //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.dll.response#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.exp //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.exp#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.lib //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.lib#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.lib.response //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.lib.response#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.suppressed.exp //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.suppressed.exp#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.suppressed.lib //Plugins/PluginBrowser/Intermediate/Build/Win64/UE4Editor/Development/PluginBrowser/UE4Editor-PluginBrowser.suppressed.lib#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Resources/ButtonIcon_40x.png //Plugins/PluginBrowser/Resources/ButtonIcon_40x.png#1'
    LogSourceControl: Attempting 'p4 print -q -o//Plugins/PluginBrowser/Resources/Icon128.png //Plugins/PluginBrowser/Resources/Icon128.png#1'
Working...
X