How do I tell Subversion to treat a file as a binary file?

前端 未结 10 1028
日久生厌
日久生厌 2020-11-30 21:35

How do I tell Subversion (svn) to treat a file as a binary file?

10条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-30 22:31

    If 'svn add' guesses the incorrect type and gives you an error like the following:

    svn: E200009: File 'qt/examples/dialogs/configdialog/images/config.png' has inconsistent newlines
    svn: E135000: Inconsistent line ending style
    

    then the workaround is to add the file without properties and then set the properties in a second step:

    svn add --no-auto-props qt/examples/dialogs/configdialog/images/config.png
    svn propset svn:mime-type image/png qt/examples/dialogs/configdialog/images/config.png
    

提交回复
热议问题