Hello,
I am using PTC Integrity client Build: 10.6.0.7337
I have a project say X containing 4 file members.
I am interested to see the revision history for these 4 file members.
In CLI it works just fine
si rlog --hostname=someHost --port=somePort --user=someUser --project=SomeProject/project.pj --norecurse --format="{membername}, [{revision}],{author}\n"
I see the revision history for all 4 file members.
However using the Java API I receive information only about 3 of the file members.
Similarly if I check a project with 3 file members, the Java API returns information about 2 file members
Similarly if I check a project with 1 file member, the Java API returns no information !
Therefore I assume there is a bug in the mksapi.jar and always information about one file member is skipped
IntegrationPointFactory factory = IntegrationPointFactory.getInstance();
IntegrationPoint integrationPoint = factory.createLocalIntegrationPoint(APIVersion.API_4_13);
integrationPoint.setAutoStartIntegrityClient(true);
String userNameX = "someUser";
String passwordX = "somePassword";
Session session = integrationPoint.createSession(userNameX, passwordX);
CmdRunner cmdRunner = session.createCmdRunner();
String hostX = "someHost";
int portX = 101;
cmdRunner.setDefaultHostname(hostX);
cmdRunner.setDefaultPort(portX);
HashMap<String, String> options = new HashMap<>();
String commandText = "rlog";
options.put("project","SomeProject/project.pj");
options.put("norecurse",null);
options.put("batch",null);
options.put("nofailOnAmbiguousProject",null);
String cmd_args="{membername}, [{revision}], {author}\n" ;
options.put("format",cmd_args);
Command cmd = new Command(Command.SI, commandText);
for (Map.Entry<String,String > entry : options.entrySet())
{
if (null == entry.getValue())
cmd.addOption(new Option(entry.getKey()));
else
cmd.addOption(new Option(entry.getKey(),entry.getValue()));
}
Response response = cmdRunner.execute(cmd);
WorkItemIterator selection = response.getWorkItems();
while (selection.hasNext())
{
WorkItem workItem = selection.next();
txtArea.append(String.format("workItem: %s (%d)\r\n",workItem.getId(),workItem.getFieldListSize()));
}
cmdRunner.release();