Bug 197607 - Bugzilla diff viewer shows leftover junk for svn property changes
Summary: Bugzilla diff viewer shows leftover junk for svn property changes
Status: Closed FIXED
Alias: None
Product: Services
Classification: Unclassified
Component: Bug Tracker (show other bugs)
Version: unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: Marcus von Appen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-14 00:53 UTC by Dimitry Andric
Modified: 2015-02-28 19:52 UTC (History)
1 user (show)

See Also:


Attachments
p5-PatchReader Update (1.67 KB, patch)
2015-02-19 16:22 UTC, Marcus von Appen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2015-02-14 00:53:33 UTC
The diff viewer built into Bugzilla shows a bit of left-over junk, when you attach a diff generated by Subversion, which also changes properties.

For example, take a look at this diff view:
https://bugs.freebsd.org/bugzilla/attachment.cgi?id=152952&action=diff

Each of the files has this part at the end, generated by Subversion:

Property changes on: games/cube/files/patch-entities.cpp
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property

It looks like Bugzilla picks up the + signs at the start of the line, and thinks that is part of the diff?
Comment 1 Marcus von Appen freebsd_committer freebsd_triage 2015-02-18 13:35:32 UTC
The problem seems to be within p5-PatchReader, which is used to extract the information from a diff. It is unable to deal with SVN diffs properly at the moment. We will look into this.
Comment 2 Marcus von Appen freebsd_committer freebsd_triage 2015-02-19 16:22:34 UTC
Created attachment 153180 [details]
p5-PatchReader Update

The following patch should fix the problem. I could not notice any side effects on other patches, so I assume the patch to work correctly for most (if not all) patches.
Comment 3 Marcus von Appen freebsd_committer freebsd_triage 2015-02-19 16:24:55 UTC
Toni: can you review the patch and tell me, if it is okay to commit it?
Comment 4 Toni Viemerö 2015-02-19 16:36:18 UTC
Looks good.
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-02-21 09:33:48 UTC
A commit references this bug:

Author: mva
Date: Sat Feb 21 09:33:11 UTC 2015
New revision: 379493
URL: https://svnweb.freebsd.org/changeset/ports/379493

Log:
  - Ignore SVN property changes in PatchReader::Raw. They were mistaken
    for line changes of the original patch.
  - This fixes Bugzilla's patch viewer not to show SVN property changes as
    line additions or removals of a file.

  PR:		197607
  Reported by:	dim@
  Approved by:	toni.viemero@iki.fi (maintainer)

Changes:
  head/devel/p5-PatchReader/Makefile
  head/devel/p5-PatchReader/files/patch-lib__PatchReader__Raw.pm
Comment 6 Marcus von Appen freebsd_committer freebsd_triage 2015-02-28 19:52:01 UTC
The PatchReader module has been updated and the property changes should not be shown anymore.