Page 1 of 1

Get content diff with previous vesrion

Posted: Mon Dec 01, 2014 5:37 am
by Scott Du
Hello all, my company was using Vault to manage our source code, and recently my manager wanted to analysis our code quality, and asked me to develop a tool with Vault Api to count changed classes and functions during certain period.
For example, from 2014/6/1 to 2014/10/1, get all the changed files, classes and functions.
Now I am able to get changed file list by ServerOperations.ProcessCommandHistory() method, but next step compare files with previous version to get changed classes and functions, which I don't know how to get it. I am very new to Vault api, can anyone show me a way out? which command or class shall I used, if have any example would be great!
Thanks!

Re: Get content diff with previous vesrion

Posted: Mon Dec 01, 2014 5:35 pm
by Beth
One thing you can do is get the last historical version, pull both versions down to a disk location, and then perform a Diff on those two files.

I think you can also have DiffMerge output the results to a different file, and then you can use your preferred language to look through the file to identify if classes or functions changed.

Nothing in Vault or our Diff tool can identify classes and functions.