Compare two different stream files in RTC
Hello everybody,
I am quite new to this topic, so please help me out by answering my below query.
We have developed a tool to compare our own file because it's not comparable by beyond compare tool. In my tool we got new requirement to compare the files which is present in two different stream. Can you let me how it's internally works in RTC and it's feasible to develop.
Many thanks in advance.
2 answers
What do you like to do? Do you want to get the files from the streams and comparing them using your tool? I suppose that in this case you can simply download them from two repository workspace and compare. Does the point is that you don't want to download the entire stream? If so, it is possible (using plain API) to retrieve the content of the files in order to compare them. As a possible simplified way you can do it so: you need to access the two workspace, searching in the configuration for the file you want and then use the content manager class to fetch the content.
Comments
Hello Michele,
Thanks for your response. Yes exactly i want to download the files from the both streams which they selected to compare. And i want to know the changeset from where it's shown when i select two streams.
Using Plain API you can do it. It's quite complex to say how in a comment so try and feel free to ask if you are blocked. To draw a simple line you have to retrieve the two stream, by name or using the UUID and retrieve the IFileItem from their configuration. After this you can check the history of the Item in order to get lats change-set. Probably the main point here is to retrieve the item but knowing the component relative path it should be ok.
If you are not used with the plain api development take a look here.
The easiest approach is to make your compare tool invokable from the command line, and then declare that tools as an "external merge tool" (which primarily consists of defining the command line to invoke for your tool). When you compare those two files, select "compare with external tool", and your compare tool will be invoked.