Recently, I checked SVN and found that the size of the backed up files is extremely large. It takes more than 4 GB to back up data after two months. You can find many binary files automatically generated by IDE... My class. Well, if development is not conscious, it is only mandatory.
Google found this article: http://blog.csdn.net/clever101/article/details/8560833
Self-help clothes and food. The script is as follows:
#! /Bin/bashexport lang = "zh_CN.UTF-8" # Make sure that the Chinese log is displayed normally, easy to collect log repos = "$1" txn = "$2" # limit log length = 10 svnlook = "/usr/local/csvn/bin/svnlook" blacklist = "Target build classes bin/target. **. IML *. IPR *. iws *. class "function error_exit () {echo-e" 1.not allowed empty log "> & 2 echo-e" 2. logs must be greater than $ {length} characters or Chinese "> & 2 exit 1} function blacklist_exit () {if [! -Z "$ {inblacklist}"]; Then ECHO-e "some files in the blacklist, please cheack again! "> & 2 echo-e" blacklist: \ N $ {blacklist} "> & 2 exit 1 fi} # obtain the number of characters (including line breaks) temp_length = '$ {svnlook} log-T "$ {txn}" "$ {repos}" | SED's/\ s * $ // G' | SED's/ ^ \ s * // G' | WC -- chars' # statistical line break temp_line = '$ {svnlook} log-T "$ {txn}" "$ {repos}" | WC -- lines '# Number of real characters logmsg_length = 'expr $ {temp_length}-$ {temp_line}' # file blacklist filtering # filter folder inblacklist = "'$ {svnlook} changed-t" $ {txn} "" $ {repos} "| grep"/target/"'" # The folder must contain /, otherwise, blacklist_exitinblacklist = "'$ {svnlook} changed-T" $ {txn} "" $ {repos} "| grep"/build/"'" blacklist_exitinblacklist = "' $ {svnlook} changed-T "$ {txn}" "$ {repos}" | grep "/classes/" '"blacklist_exitinblacklist ="' $ {svnlook} changed-t" $ {txn} "" $ {repos} "| grep"/bin/target/"'" blacklist_exit # filter all files and folders starting with "dot". inblacklist = "' $ {svnlook} changed-T "$ {txn}" "$ {repos}" | grep "/\. "'" blacklist_exit # inblacklist = "' $ {svnlook} changed-T" $ {txn} "" $ {repos} "| grep "\. IML $ "'" blacklist_exitinblacklist = "' $ {svnlook} changed-T" $ {txn} "" $ {repos} "| grep "\. IPR $ "'" blacklist_exitinblacklist = "' $ {svnlook} changed-T" $ {txn} "" $ {repos} "| grep "\. iws $ "'" blacklist_exitinblacklist = "' $ {svnlook} changed-T" $ {txn} "" $ {repos} "| grep "\. class $ "'" blacklist_exit # determine whether the log length meets the requirements if ["$ {logmsg_length}"-lt $ {length}]; then error_exitfiexit 0
I don't know why. I cannot add Chinese characters to the returned logs. Otherwise, the turtle reported that the encoding could not be parsed. No one answered the question from the official website.