svnadmin load 遇到E125005 的错误
在升级SVN的过程中,遇到 E125005的错误,是因为有些开发人员提交comment的时候,换行没有换行符号,是Eclipse的SVN插件的一个问题,
svnadmin: E125005: Invalid property valuefound in dumpstream; consider repairing the source or using--bypass-prop-validation while loading.
svnadmin: E125005: Cannot accept non-LFline endings in 'svn:log' property
要修复这个问题,可以把所有的comment重新edit下。
要修改历史的commnet,必须 配置pre-revprop-change, 用项目默认的pre-revprop-change.tmpl 即可,复制到一个目录下,比如下面的/space/rep/allconfig/hooks/pre-revprop-change
import os import commands resps="project1, project2,project3,".split(",") for res in resps: os.system("ln -s /space/rep/allconfig/hooks/pre-revprop-change /space/rep/"+res+"/hooks/pre-revprop-change") output=commands.getoutput("svn info svn://192.168.22.19/"+res) revesion=output[output.find("Last Changed Rev:")+len("Last Changed Rev:"):output.find("\nLast Changed Date")] print revesion #sys.exit(1) for i in xrange(1,int(revesion.strip())+1): os.system("svn pget svn:log --revprop -r "+str(i)+" svn://192.168.22.9/"+res+" > svn.log") os.system("svn pset svn:log --revprop -r "+str(i)+" --file svn.log svn://192.168.22.19/"+res) import os import commands resps="project1, project2,project3,".split(",") for res in resps: os.system("ln -s /space/rep/allconfig/hooks/pre-revprop-change /space/rep/"+res+"/hooks/pre-revprop-change") output=commands.getoutput("svn info svn://192.168.22.19/"+res) revesion=output[output.find("Last Changed Rev:")+len("Last Changed Rev:"):output.find("\nLast Changed Date")] print revesion #sys.exit(1) for i in xrange(1,int(revesion.strip())+1): os.system("svn pget svn:log --revprop -r "+str(i)+" svn://192.168.22.9/"+res+" > svn.log") os.system("svn pset svn:log --revprop -r "+str(i)+" --file svn.log svn://192.168.22.19/"+res)
然后重新dump, load即可。
补充:Web开发 , Python ,