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

patch for svn_load_dirs.pl on multi-line properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.x
    • unscheduled
    • tools
    • Windows NT

    Description

      I have found that svn_load_dirs.pl does not deal properly with multi-line 
      properties. For example, we'd like to set the property svn:ignore on a folder 
      to avoid commiting different file types, lets say *.bak *.in. These two file 
      types must be in different lines.
      
      In order to correct this issue, I have modified the script. You can find the 
      following patch:
      
      --- svn_load_dirs.pl.1.6.17.in	2012-03-21 16:24:56.898517000 +0100
      +++ svn_load_dirs.pl.patched.in	2012-03-21 16:28:29.414142000 +0100
      @@ -1197,7 +1197,12 @@
                       
                       # Write the value to a temporary file in case it's multi-line
                       my ($handle, $tmpfile) = tempfile(DIR => $temp_dir);
      -                print $handle $property_value;
      +                # Searches for newline chars that are treated as literals: \r\n
      +                my @property_lines = split(/(\\r)?\\n/, $property_value);
      +                foreach my $property_line (@property_lines)
      +                  {
      +                    print $handle "$property_line\n";
      +                  }
                       close($handle);
       
                       read_from_process($svn,
      
      I hope this helps.
      DarĂ­o.
      

      Original issue reported by darizotas

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: