Bug 708014

Summary: Raw Unified patch view does not work -- leads to corrupted patches
Product: [Community] Bugzilla Reporter: Prarit Bhargava <prarit>
Component: User InterfaceAssignee: Simon Green <sgreen>
Status: CLOSED DUPLICATE QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.2CC: ebaak, jpokorny, jsafrane, sgreen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-21 00:43:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Prarit Bhargava 2011-05-26 14:45:46 UTC
Description of problem: After adding a patch to a Bugzilla and (correctly) using the "Patch" button, the next viewer of the Bugzilla will be able to see the patch I've added by clicking on the "attachment" link.

When viewing the patch, the filenames are stripped from the patch rendering the viewer useless.  In addition, and much more critically, *the Raw Unified view is also munging the patch so that the filenames are missing*.


Version-Release number of selected component (if applicable): current bugzilla.redhat.com


How reproducible: 100%


Steps to Reproduce:
1. Add patch

For example, https://bugzilla.redhat.com/show_bug.cgi?id=699451#c3

2. Click attachment to view patch -- filenames are missing.

https://bugzilla.redhat.com/attachment.cgi?id=495077&action=diff

3. Click "Raw Unified" to view patch -- filenames are missing.

https://bugzilla.redhat.com/attachment.cgi?id=495077&action=diff&context=patch&collapsed=&headers=1&format=raw


Compare that to the actual patch that was attached:

https://bugzilla.redhat.com/attachment.cgi?id=495077&action=edit
  
Actual results:  Corrupted patches due to Bugzilla.


Expected results:  Patches should have filenames intact o/w the viewer and "Raw Unified" views are effectively useless.


Additional info:  IMO, this is _critical_.  We (Engineering) use BZ to pass test patches back and forth to customers.  We use it to store patches on committed bugzillas.

Comment 1 Jan Pokorný [poki] 2011-10-19 20:17:04 UTC
I have a similar issue.


Original patch:
https://bugzilla.redhat.com/attachment.cgi?id=529083

snippet from the top (for illustration, not 1:1):
> --- a/ricci/modules/cluster/clumon/src/daemon/main.cpp
> +++ b/ricci/modules/cluster/clumon/src/daemon/main.cpp


Raw unified (navigation: [1] -> "Raw Unified" link):
https://bugzilla.redhat.com/attachment.cgi?id=529083&action=diff&context=patch&collapsed=&headers=1&format=raw

snippet from the top (for illustration, not 1:1):
> --- a/ricci/modules/cluster/clumon/src/daemon/main.cpp
> +++ a/ricci/modules/cluster/clumon/src/daemon/main.cpp


The question is, why it is turned the second "b" to "a".
Is it a correct behavior?


[1] https://bugzilla.redhat.com/attachment.cgi?id=529083&action=diff

Comment 2 Jan Safranek 2012-05-29 08:52:41 UTC
Reproducible also with Bugzilla 4.2

Original patch:
https://bugzilla.redhat.com/attachment.cgi?id=337853

Raw unified patch:
https://bugzilla.redhat.com/attachment.cgi?id=337853&action=diff&context=patch&collapsed=&headers=1&format=raw

-> file gtk/column_prefs.c is missing!

Comment 3 Simon Green 2012-06-21 00:43:13 UTC

*** This bug has been marked as a duplicate of bug 554878 ***