job000374

albert (albert)
albert created this job , modified by Perforce maintenance
Open
Inconsistent handling %-embedded filenames.

Jeorg says, plus see attached screenshots:
<snip>

I encountered an inconsistency in the p4api.net around files that have a %
in their name.

First I will show you the output for the p4 command line which is
consistent. The files name on the harddrive is
Filter%253aScriptedEvaluation.cr2

Lets have a look at change 318475:
C:\>p4 describe 318475
Change 318475 by D****@T*** on 2015/08/28 08:27:57

FogBugzID: 24842

Affected files ...

...
//Osiris_Pass/Configuration/TRADING/RaptorServer/Settings/EvaluationStrategyMasters/Turbo/Filter%25253aScriptedEvaluation.cr2#1
branch
...
//Osiris_Pass/Configuration/TRADING/RaptorServer/Settings/ScriptCodeSnippets/Turbo/FilterEvaluationStrategy/Code.cr2#1
branch
...
//Osiris_Pass/Configuration/TRADING/RaptorServer/Settings/ScriptCodeSnippets/Turbo/FilterEvaluationStrategy/Parameter.cr2#1
branch
...
//Osiris_Pass/Configuration/TRADING/RaptorServer/Settings/ScriptTemplates/Turbo/ScriptedEvaluationStrategy/Code.cr2#1
branch
...
//Osiris_Pass/Configuration/TRADING/RaptorServer/Settings/ScriptTemplates/Turbo/ScriptedEvaluationStrategy/Parameter.cr2#1
branch

Differences ...

Now I want to take a look at the integrations around the first file:
C:\>p4 integrated
//Osiris_Pass/Configuration/TRADING/RaptorServer/Settings/EvaluationStrategyMasters/Turbo/Filter%25253aScriptedEvaluation.cr2
//Osiris_Pass/Configuration/TRADING/RaptorServer/Settings/EvaluationStrategyMasters/Turbo/Filter%25253aScriptedEvaluation.cr2#1
- branch into //Osiris_Prod/Conf
iguration/TRADING/RaptorServer/Settings/EvaluationStrategyMasters/Turbo/Filter%25253aScriptedEvaluation.cr2#1
//Osiris_Pass/Configuration/TRADING/RaptorServer/Settings/EvaluationStrategyMasters/Turbo/Filter%25253aScriptedEvaluation.cr2#1
- branch from //Osiris_Test/Conf
iguration/TRADING/RaptorServer/Settings/EvaluationStrategyMasters/Turbo/Filter%25253aScriptedEvaluation.cr2#1,#2

In p4.exe the % is always escaped.

But if I have a look at the changelist using p4api.net:
Changelist changeListDetails = _repository.GetChangelist(318475);

The Files property contains a FileMetaData object where the % is no longer
escaped.


And again I want to have a look at the integrations:

IList<FileIntegrationRecord> fileIntegrationRecords =
_repository.GetSubmittedIntegrations(new List<FileSpec>
{fileMetaData.DepotPath}, new Options());

Here the api returns null. It cannot find any integrations around the file
where % is not escaped.
If I do this instead:

string escapedPath = FileSpec
.ToEscapedPaths(fileMetaData.DepotPath).First();
IList<FileIntegrationRecord> fileIntegrationRecords =
_repository.GetSubmittedIntegrations(new List<FileSpec> {
FileSpec.DepotSpec(escapedPath)}, new Options());

I do get a result, but all path specifications are not escaped. So the
output from GetSubmittedIntegrations is inconsistent with the output from
GetChangelist().

Is there a reason for that or am I missing something here?

As for a workaround? Is there a mirroring function for ToEscapedPath? That
would at least help me in my case. But it is still confusing that there are
methods that return escaped output and some that dont.
  • Details
  • Comments -
Status
Open
Project
perforce-software-p4api-net
Severity
B
Reported By
albert
Reported Date
Modified By
Perforce maintenance
Modified Date
Owned By
albert
Type
Bug