1501: "Download diff" for changesets containing changes to only one file are missing diff headers
- WontFix
- Review Board
vr.k*****@gmai***** (Google Code) (Is this you? Claim this profile.) | |
Feb. 21, 2010 |
What version are you running? 1.0.5.1 What's the URL of the page containing the problem? /r/128753/diff/raw/ What steps will reproduce the problem? 1. Generate a changeset that contains changes to only one file 2. Go to reviewboard and click "Download Diff" 3. Look at resultant file and see that it's missing the header information that patch needs What is the expected output? What do you see instead? Expected output would be a diff file that contains the header comments for patch (the filenames, etc.) What operating system are you using? What browser? Linux. Google Chrome 5.0.322.2 dev Please provide any additional information below. My turtle is cute!
Just to add... this is against our internal VMware reviewboard installation, which is going against Perforce. The post-review version, I believe, is 0.5. Also, to clarify, the resultant diff file looks like this: 44c44 < static void gdk_pixmap_draw_arc (GdkDrawable *drawable, --- > static void gdk_pixmap_draw_arc (GdkDrawable *phonyChange1, 53c53 < static void gdk_pixmap_draw_polygon (GdkDrawable *drawable, --- > static void gdk_pixmap_draw_polygon (GdkDrawable *phonyChange2, 81c81 < static void gdk_pixmap_draw_points (GdkDrawable *drawable, --- > static void gdk_pixmap_draw_points (GdkDrawable *phonyChange3, instead of this: --- gdkpixmap.c 2008-07-01 09:42:53.000000000 -0400 +++ /tmp/gdkpixmap.c 2010-02-16 18:27:35.192421300 -0500 @@ -41,7 +41,7 @@ static void gdk_pixmap_draw_rectangle gint y, gint width, gint height); -static void gdk_pixmap_draw_arc (GdkDrawable *drawable, +static void gdk_pixmap_draw_arc (GdkDrawable *phonyChange1, GdkGC *gc, gboolean filled, gint x, @@ -50,7 +50,7 @@ static void gdk_pixmap_draw_arc gint height, gint angle1, gint angle2); -static void gdk_pixmap_draw_polygon (GdkDrawable *drawable, +static void gdk_pixmap_draw_polygon (GdkDrawable *phonyChange2, GdkGC *gc, gboolean filled, GdkPoint *points, @@ -78,7 +78,7 @@ static void gdk_pixmap_draw_drawable gint ydest, gint width, gint height); -static void gdk_pixmap_draw_points (GdkDrawable *drawable, +static void gdk_pixmap_draw_points (GdkDrawable *phonyChange3, GdkGC *gc, GdkPoint *points, gint npoints); (in other words, the first 2 lines which list the file are missing)
Huh. Looks like somehow it's giving you a context diff for just that file, rather than a nice unified diff.
This is actually a "normal" diff, not even context. These diffs don't have any headers. The submitter should really not upload these. Looks like it was probably generated by p5 diff. It's an accident that it works at all. It happened to have the special Perforce headers we inject to display file information, so we had enough to stick the thing in the database, but all the content was a "normal" diff that we don't directly support. Our parser normally wouldn't be able to deal with it, except we have those headers... We do strip the headers on Unified diffs as well, so I'll fix this. If it was just the normal diffs, I wouldn't bother, as those are entirely unsupported and the problem would then only exist with p5.
-
+ Confirmed -
+ Component-DiffParser + Milestone-Release1.5
Scratch that. We only put the headers there if it's an empty file (to indicate that the file is in the changelist) or a binary file. So for normal files, we would just depend on the standard diff headers, which normal diffs don't provide. This is user error on the submitter's part, and we really should get him to use post-review. Going to wontfix this one.
-
- Confirmed + WontFix