Fossil SCM
Always include the "Annotate" and "Blame" submenu items of the /file page, not just for cases of text/ mimetypes, since some files (ex: Makefile.in) do not have a well-defined mimetype, but we do want to Annotate them.
Commit
b84b8bf3591ce225eb4ab9e071f0ef343c58c3b45b83907538e1529c16755187
Parent
8ca760ce9705101…
1 file changed
+4
-6
+4
-6
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2367,16 +2367,14 @@ | ||
| 2367 | 2367 | } |
| 2368 | 2368 | blob_reset(&path); |
| 2369 | 2369 | } |
| 2370 | 2370 | style_submenu_element("Artifact", "%R/artifact/%S", zUuid); |
| 2371 | 2371 | zMime = mimetype_from_name(zName); |
| 2372 | - if( zMime && strncmp(zMime, "text/", 5)==0 ){ | |
| 2373 | - style_submenu_element("Annotate", "%R/annotate?filename=%T&checkin=%T", | |
| 2374 | - zName, zCI); | |
| 2375 | - style_submenu_element("Blame", "%R/blame?filename=%T&checkin=%T", | |
| 2376 | - zName, zCI); | |
| 2377 | - } | |
| 2372 | + style_submenu_element("Annotate", "%R/annotate?filename=%T&checkin=%T", | |
| 2373 | + zName, zCI); | |
| 2374 | + style_submenu_element("Blame", "%R/blame?filename=%T&checkin=%T", | |
| 2375 | + zName, zCI); | |
| 2378 | 2376 | blob_init(&downloadName, zName, -1); |
| 2379 | 2377 | objType = OBJTYPE_CONTENT; |
| 2380 | 2378 | }else{ |
| 2381 | 2379 | @ <h2>Artifact |
| 2382 | 2380 | style_copy_button(1, "hash-ar", 0, 2, "%s", zUuid); |
| 2383 | 2381 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2367,16 +2367,14 @@ | |
| 2367 | } |
| 2368 | blob_reset(&path); |
| 2369 | } |
| 2370 | style_submenu_element("Artifact", "%R/artifact/%S", zUuid); |
| 2371 | zMime = mimetype_from_name(zName); |
| 2372 | if( zMime && strncmp(zMime, "text/", 5)==0 ){ |
| 2373 | style_submenu_element("Annotate", "%R/annotate?filename=%T&checkin=%T", |
| 2374 | zName, zCI); |
| 2375 | style_submenu_element("Blame", "%R/blame?filename=%T&checkin=%T", |
| 2376 | zName, zCI); |
| 2377 | } |
| 2378 | blob_init(&downloadName, zName, -1); |
| 2379 | objType = OBJTYPE_CONTENT; |
| 2380 | }else{ |
| 2381 | @ <h2>Artifact |
| 2382 | style_copy_button(1, "hash-ar", 0, 2, "%s", zUuid); |
| 2383 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2367,16 +2367,14 @@ | |
| 2367 | } |
| 2368 | blob_reset(&path); |
| 2369 | } |
| 2370 | style_submenu_element("Artifact", "%R/artifact/%S", zUuid); |
| 2371 | zMime = mimetype_from_name(zName); |
| 2372 | style_submenu_element("Annotate", "%R/annotate?filename=%T&checkin=%T", |
| 2373 | zName, zCI); |
| 2374 | style_submenu_element("Blame", "%R/blame?filename=%T&checkin=%T", |
| 2375 | zName, zCI); |
| 2376 | blob_init(&downloadName, zName, -1); |
| 2377 | objType = OBJTYPE_CONTENT; |
| 2378 | }else{ |
| 2379 | @ <h2>Artifact |
| 2380 | style_copy_button(1, "hash-ar", 0, 2, "%s", zUuid); |
| 2381 |