It's all about the answers!

Ask a question

Compare two different stream files in RTC

Saran R (1337) | asked Nov 18 '15, 12:42 p.m.
edited Nov 18 '15, 12:45 p.m. by Ralph Schoon (63.2k33646)
 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

permanent link
Michele Pegoraro (1.8k14118103) | answered Nov 19 '15, 8:14 a.m.
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.

Saran R commented Dec 03 '15, 3:18 a.m.

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.

Michele Pegoraro commented Dec 04 '15, 9:25 a.m.

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.

permanent link
Geoffrey Clemm (30.1k33035) | answered Jan 24 '16, 12:44 a.m.
edited Jan 24 '16, 12:44 a.m.
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.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.