Email Diff broker skips diff when binary files are added

Issue #4729 resolved
Ed Brannin
created an issue


When I add a binary file and slightly change a text file, the "Email Diff" broker says the diff is too large.

I would rather it include the diff for the text files and simply indicate Added/Modified/Deleted for binary files, like the command-line "hg diff" and the BitBucket website.


I have a nightly script that updates a website mirror, commits the changes and pushes them to BitBucket.

Whenever the change is a new PDF file (like a weekly church bulletin), the email looks like this:
changeset:   ff056ba1ca19
date:        2012-09-04 12:29:41
summary:     Mirror update
affected #:  2 files
Diff too large to display.

The linked-to changeset's patch (to which I will gladly grant access for anyone investigating this) is only 1193 bytes on the command-line:

$ hg log -pvr ff056ba1ca19
changeset:   47:ff056ba1ca19
date:        Tue Sep 04 06:29:41 2012 -0400
files: 09-09-12.pdf files.htm
Mirror update

diff -r a9a212ee468d -r ff056ba1ca19 09-09-12.pdf
Binary file 09-09-12.pdf has changed
diff -r a9a212ee468d -r ff056ba1ca19 files.htm
--- a/ files.htm Sun Sep 02 06:53:07 2012 -0400
+++ b/ files.htm Tue Sep 04 06:29:41 2012 -0400
@@ -63,7 +63,7 @@
 <div id="apDiv1">
   <p align="center"><span class="style1">Weekly Bulletins:</span></p>

-  <!--p align="center" class="style2"><a href="Bulletins/HNJ 09-09-12.pdf">09-09-12</a></p-->
+  <p align="center" class="style2"><a href="Bulletins/HNJ 09-09-12.pdf">09-09-12</a></p>
   <p align="center" class="style2"><a href="Bulletins/HNJ 09-02-12.pdf">09-02-12</a></p>
   <p align="center" class="style2"><a href="Bulletins/08-26-12.pdf">08-26-12</a></p>
   <p align="center" class="style2"><a href="Bulletins/HNJ 08-19-12.pdf">08-19-12</a><br />New!  Now from the right year!</p>

Comments (3)

  1. Log in to comment