Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-2065

Cannot set svn:eol-style property for non text/* mime-type files

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.1
    • 1.2.0
    • cmdline client
    • None

    Description

      When setting up svn:eol-style using 'svn propset svn:eol-style native foo.gram'
      command, svn failed to set the property and jump up a message tells me that it
      has binary type property (that is, has a non text/* svn:mime-type property) and
      no svn:eol-style property is added:
      
      SHELL> svn porplist foo.gram
      Properties on 'foo.gram':
        svn:mime-type : application/srgs
        svn:keywords : Id LastChangedDate LastChangedRevision LastChangedBy HeadURL
      
      SHELL> svn propset svn:eol-style native foo.gram
      svn: File 'foo.gram' has binary mime type property
      
      SHELL> svn porplist foo.gram
      Properties on 'foo.gram':
        svn:mime-type : application/srgs
        svn:keywords : Id LastChangedDate LastChangedRevision LastChangedBy HeadURL
      
      EVEN IF I ADD THE --force OPTION:
      
      SHELL> svn propset --force svn:eol-style native foo.gram
      svn: File 'foo.gram' has binary mime type property
      
      SHELL> svn porplist foo.gram
      Properties on 'foo.gram':
        svn:mime-type : application/srgs
        svn:keywords : Id LastChangedDate LastChangedRevision LastChangedBy HeadURL
      
      In fact, there are some document formats that are not registered as a text/*
      document, but IS actually text files, especially for some XML document formats.
      For example, the ABNF document (one of the grammar format for VoiceXML) I used
      above is registered in IETF with the MIME type, application/srgs, but is actually
      a text file.
      
      There's a work around that can avoid the problem: first remove the svn:mime-type
      property, add the svn:eol-style property, then add the svn:mime-type property
      back.  However, this is really annonying.
      
      In my opinion, pormpting a warning message that warn the user when setting
      svn:eol-style property on a non text/* mime-type file is a good thing.  But the
      --force option should be work fine, in case if we DO want to set the
      svn:eol-style property.
      

      Original issue reported by jeffhung

      Attachments

        1. 1_2065-patch.txt
          9 kB
          Karl Fogel
        2. 2_2065-patch-complete.txt
          17 kB
          Karl Fogel

        Issue Links

          Activity

            People

              Unassigned Unassigned
              subversion-importer Subversion Importer
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: