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

Mark/seek in svn_subst_stream_translated() - needs to restore translation state

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • 1.7.0
    • libsvn_subr

    Description

      svn_subst_stream_translated() doesn't handle mark/seek properly.
      translated_stream_mark() saves and translated_stream_seek() restores
      only the source stream's position, and not the internal state of
      translation which it resets to "not in a translation".  This will work
      properly only if the marked position is not inside a keyword or EOL.  It
      needs to store (into the mark structure) the current state of
      translation as well.
      
      (An alternative could be to attach conditions to the use of mark/seek:
      "this only works if you do XXX" - but I think that would be a Bad Thing.
      The concept of streams works well precisely because we can layer
      arbitrary streams on top of each other and expect them to work without
      having to worry about such conditions.)
      
      Found by code inspection, in trunk r934400.
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              julianfoad Julian Foad
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: