Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#76 Invalid topic chunks generated for svn diffs with properties

closed-fixed
nobody
None
5
2008-08-02
2008-07-16
Anonymous
No

When pulling diff from an SVN repository or submitting an SVN diff that includes a property change, the topic chunks are not generated properly (I end up with a topic containing a single file called "unknown").

Discussion

  • David Sitsky
    David Sitsky
    2008-07-16

    Logged In: YES
    user_id=208928
    Originator: NO

    Can you submit the actual diff text that was generated here? Click on the "download topic text" link and attach it to this bug please. Subversion properties are handled, but perhaps there are some corner cases that still need some work. Thanks.

     
  • Logged In: YES
    user_id=2032979
    Originator: NO

    I submitted a patch for this (BTW I am the original submitter of this bug). See the Patches section. Check it out and see if it looks fine. We've been using this patch locally for a while and it seems to cause no problems so far.

     
  • Logged In: YES
    user_id=324736
    Originator: NO

    I've run into this issue too.

    The problem is that SubversionDiff.pm looks (around line 75) for separator line after any of property actions (lines 53-58). But Subversion doesn't emit separator line after property. It emits another properties with their contents and empty line after all of them. After that the next 'index' line flollows. For example:

    ...
    504 +////////////////////////////////////////////////////////////////////////////////
    505 +// EOF: $Id$
    506 +////////////////////////////////////////////////////////////////////////////////
    507
    508 Property changes on: aaa
    509 ___________________________________________________________________
    510 Added: svn:eol-style
    511 + native
    512 Added: svn:keywords
    513 + Id
    514
    515 Index: bbb
    516 ===================================================================
    517 --- bbb (revision 2392)
    517 +++ bbb (revision 2393)
    ...

    My hack to deal with the issue is (instead of lines 52-58):
    while (defined $line &&
    $line !~ /^Index:/o) {
    $line = <$fh>;
    }
    Check for 'Index:' starting at the line start is essential because otherwise this check would trigger on 'Index:' in property value.

    Moreover, 'Index:' can appear at the line start from multiline property but I think this situation is quite rare and one can treat such multiline property as an error.

     
  • Logged In: YES
    user_id=2032979
    Originator: NO

    Patch uploaded (see Patches). My fix is pretty similar to eliterr's. The Patches entry contains a topic text to reproduce the problem.

     
  • David Sitsky
    David Sitsky
    2008-08-02

    • status: open --> closed-fixed
     
  • David Sitsky
    David Sitsky
    2008-08-02

    Logged In: YES
    user_id=208928
    Originator: NO

    Now fixed... thanks for all the information and help. Will be available in 1.9.6.