Fossil

Check-in [dbb02ff1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Do not show a hex dump by default when viewing a binary artifact. Instead, just say that the artifact contains binary data and give a "Hex" submenu to view the hex if that is what the user wants. Ticket [a470443b64412d2856].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:dbb02ff1f945f6cba7e7af71ce896cbe37842b9c
User & Date: drh 2010-12-14 00:15:09
Context
2010-12-14
00:30
When doing a "fossil update" if there are multiple descendents but only one descendent in the same branch as current, then go to that one descendent without complaining. Ticket [33d2bf39889352f2f] check-in: 4beacb6d user: drh tags: trunk
00:15
Do not show a hex dump by default when viewing a binary artifact. Instead, just say that the artifact contains binary data and give a "Hex" submenu to view the hex if that is what the user wants. Ticket [a470443b64412d2856]. check-in: dbb02ff1 user: drh tags: trunk
00:06
Another bug fix associating with merges of branches which contain file name changes. check-in: 4c95b7b9 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

1156
1157
1158
1159
1160
1161
1162

1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
  if( renderAsWiki ){
    wiki_convert(&content, 0, 0);
  }else if( renderAsHtml ){
    @ <div>
    cgi_append_content(blob_buffer(&content), blob_size(&content));
    @ </div>
  }else{

    zMime = mimetype_from_content(&content);
    @ <blockquote>
    if( zMime==0 ){
      @ <pre>
      @ %h(blob_str(&content))
      @ </pre>
      style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
    }else if( strncmp(zMime, "image/", 6)==0 ){
      @ <img src="%s(g.zBaseURL)/raw?name=%s(zUuid)&amp;m=%s(zMime)"></img>
      style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
    }else{
      @ <pre>
      hexdump(&content);
      @ </pre>
    }
    @ </blockquote>
  }
  style_footer();
}  

/*







>






<




|
<
<







1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169

1170
1171
1172
1173
1174


1175
1176
1177
1178
1179
1180
1181
  if( renderAsWiki ){
    wiki_convert(&content, 0, 0);
  }else if( renderAsHtml ){
    @ <div>
    cgi_append_content(blob_buffer(&content), blob_size(&content));
    @ </div>
  }else{
    style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
    zMime = mimetype_from_content(&content);
    @ <blockquote>
    if( zMime==0 ){
      @ <pre>
      @ %h(blob_str(&content))
      @ </pre>

    }else if( strncmp(zMime, "image/", 6)==0 ){
      @ <img src="%s(g.zBaseURL)/raw?name=%s(zUuid)&amp;m=%s(zMime)"></img>
      style_submenu_element("Hex","Hex", "%s/hexdump?name=%s", g.zTop, zUuid);
    }else{
      @ <i>(file is %d(blob_size(&content)) bytes of binary data)</i>


    }
    @ </blockquote>
  }
  style_footer();
}  

/*