Reputation: 221
How can i find out which function is changed from svn diff?
I just want to know function name in which code changes are made. In git, this is available as git diff --function-context.
Is there anything similar available for svn also?
Thanks
Upvotes: 4
Views: 960
Reputation: 31
SVN diff has a option can show function name in the result, but not just function name.
-x [--extensions] ARG : Specify differencing options for external diff or
internal diff or blame. Default: '-u'. Options are
separated by spaces. Internal diff and blame take:
-u, --unified: Show 3 lines of unified context
-b, --ignore-space-change: Ignore changes in
amount of white space
-w, --ignore-all-space: Ignore all white space
--igno`enter code here`re-eol-style: Ignore changes in EOL style
-U ARG, --context ARG: Show ARG lines of context
-p, --show-c-function: Show C function name
the changed line information is like this:
@@ -145,10 +145,6 @@ void UserOrder::getDBHandle() throw (CException)
int index = SPEC_INDEX(gPtrDbPool, m_Params["Fbuy_uid"]);
m_ptrUserTransOrderDBBuy = SPEC_SQL(gPtrDbPool, index);
-
- index = SPEC_INDEX(gPtrDbPool, m_Params["Fsale_uid"]);
-
- m_ptrUserTransOrderDBSale = SPEC_SQL(gPtrDbPool, index);
so, you can get the changed function names by a script.
Upvotes: 3