I am trying to extract diff between to perforce revision files. But my requirement is to extract function names which got modified. Is there a way to find changed functions.
Asked
Active
Viewed 255 times
1
-
Afaik perforce can't do that for you. Fetch both versions and diff them should work though. – fredrik Dec 20 '17 at 06:03
-
You may have to actually "parse" (I use the term relatively loosely) the source file to do that. Get the whole source file, scan backwards from the diff-point until you find the function declaration. Coding style will probably help you here, so you may be able to identify a function from "it's starting at column 1 and has parenthesis", for example. – Mats Petersson Dec 20 '17 at 07:21
-
@Mats Petersson, Thank you. By the above way I am able to parse and extract Function changed. – Abhishek Bajaj Jan 19 '18 at 09:45