I use the "svn diff" command to get changes at the directory level, but this diff includes all comment line changes and empty line changes. How to ignore these values?
Example:
diff file:
+ import...... + some code + #comment + blank line + some code
this should be as follows: (comments and blank lines should be omitted)
+ import...... + some code + some code
It would also be nice if I can process the first file using Java or unix and delete these empty lines and comment lines?
svn diff -r 100:200 -x -b > file.diff
for spaces Use -x --ignore-space-changeor -x --ignore-all-space. (See svn -h diff.)
-x --ignore-space-change
-x --ignore-all-space
svn -h diff
, # , egrep ,
#
egrep
svn diff <args> | egrep -v '^\+(#|$)'
egrep?
egrep - grep, , grep egrep, grep , grep -E. . , -E , +,? | (). , , grep.
grep -E