How can I fix the SVN import line endings error?

前端 未结 9 1847
名媛妹妹
名媛妹妹 2021-02-05 22:25

I have to import an huge SVN repository that I have to transfer from one server to another. So I exported it from the old server:

svnadmin dump . > archive.sv         


        
9条回答
  •  借酒劲吻你
    2021-02-05 22:37

    You have 2 options, repair the source or disable prop validation.

    Repairing the source (svn:log and svn:ignore):

    sed -e '/^svn:log$/,/^K / s/^M/ /' -e '/^svn:ignore$/,/^PROPS-END$/ s/^M/\n/' archive.svn > repaired-archive.svn
    
    svnadmin load . < repaired-archive.svn
    

    Where ^M is a control character, that means 0D in hex. To get it use ^V^M (control V control M) instead ^M (circumflex M or control M)

    Disabling prop validation:

    svnadmin load --bypass-prop-validation . < archive.svn
    

提交回复
热议问题