Edgewall Software

Ticket #6682 (new defect)

Opened 10 months ago

Last modified 4 months ago

"binary files ... differ" in diff/patch files

Reported by: r.bhatia@… Owned by: cboos
Priority: normal Milestone: 0.12
Component: rendering Version: 0.10.3
Severity: minor Keywords: diff
Cc:

Description

hi, please do not skip content of patchfiles when it states that two binary files differ:

e.g.

--- a/main.inc.php	2007-11-29 09:45:26.065072250 +0100
+++ b/main.inc.php	2008-01-14 22:48:30.340162500 +0100
@@ -85,7 +85,7 @@ $rcmail_config['smtp_log'] = TRUE;
 $rcmail_config['list_cols'] = array('subject', 'from', 'date', 'size');
 
 // relative path to the skin folder
-$rcmail_config['skin_path'] = 'skins/default/';
+$rcmail_config['skin_path'] = 'skins/ipax/';
 
 // use this folder to store temp files (must be writebale for apache user)
 $rcmail_config['temp_dir'] = 'temp/';
Binary files a/blank.gif and b/blank.gif differ

is it possible to render such information at the top, when displaying the content of patch files?

cheers,

Attachments

Change History

  Changed 10 months ago by r.bhatia@…

ps. perhaps this is no proper diff file - but to my knowledge it applies well :)

in reply to: ↑ description   Changed 10 months ago by eblot

  • keywords needinfo added
  • owner changed from jonas to cboos
  • component changed from general to changeset view

Replying to r.bhatia@ipax.at:

hi, please do not skip content of patchfiles when it states that two binary files differ:

You cannot "diff" binary files: diff/patch tool suite cannot work binary files (diff would only be able to report that files are different). Several tools exist to create delta fro binary files, but this is OOT.

The example you provided shows PHP files, i.e. non-binary files. Why do you report them as binary? It is a configuration issue within your Subversion repository?

follow-ups: ↓ 4 ↓ 5   Changed 10 months ago by cboos

  • keywords needinfo removed
  • severity changed from normal to minor
  • milestone set to 0.11.1

I think he was talking about that line:

Binary files a/blank.gif and b/blank.gif differ

which is probably skipped in 0.10.x:

  • main.inc.php

    a b  
    8585$rcmail_config['list_cols'] = array('subject', 'from', 'date', 'size'); 
    8686 
    8787// relative path to the skin folder 
    88 $rcmail_config['skin_path'] = 'skins/default/'; 
     88$rcmail_config['skin_path'] = 'skins/ipax/'; 
    8989 
    9090// use this folder to store temp files (must be writebale for apache user) 
    9191$rcmail_config['temp_dir'] = 'temp/'; 

Right.

I would have expected this to work in 0.11, but no. And btw, the diffs inlined in Wiki pages seem to be broken atm. (404 for diff.css?)

in reply to: ↑ 3   Changed 10 months ago by cboos

Replying to cboos:

And btw, the diffs inlined in Wiki pages seem to be broken atm. (404 for diff.css?)

For some reason, the add_stylesheet(req, 'common/css/diff.css') in the patch.py code translates to $.loadStyleSheet("/devel/chrome/site/css/diff.css", ""); in the generated HTML...

in reply to: ↑ 3   Changed 10 months ago by r.bhatia@…

Replying to cboos:

I think he was talking about that line:

Binary files a/blank.gif and b/blank.gif differ

I would have expected this to work in 0.11, but no.

right, that is what i'm talking about. i know that binary files cannot be "diff"ed but when someone checks in a file with this content, trac will never show those lines.

maybe the correct solution is to display some kind of an error-log for all lines which are skipped by the PatchRenderer? class.

thanks for replying so fast!

cheers, raoul

  Changed 7 months ago by cboos

  • keywords diff added
  • component changed from version control/changeset view to rendering

  Changed 4 months ago by cboos

  • milestone changed from 0.11.2 to 0.12

I've got a few pending enhancements to the patch renderer, including minimal support for Git style binary patches. I should add support for the "Binary files a/blank.gif and b/blank.gif differ" case as well.

Add/Change #6682 ("binary files ... differ" in diff/patch files)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change from cboos. Next status will be 'new'
The owner will change from cboos to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.