Fossil SCM
Improved display in /uvlist: wrapped the file hash in "code" tags to make same-type hashes display at the same width, and added an "Algo" column to identify the hash algorithm for the benefit of those who can't work it out from the length alone.
Commit
b1dc17a0aa7d3bc2f7e900870932c15a0ff6ce8886876eefb8e58e55be7ebb58
Parent
4d43560f668eaac…
1 file changed
+4
-1
+4
-1
| --- src/unversioned.c | ||
| +++ src/unversioned.c | ||
| @@ -571,10 +571,11 @@ | ||
| 571 | 571 | while( db_step(&q)==SQLITE_ROW ){ |
| 572 | 572 | const char *zName = db_column_text(&q, 0); |
| 573 | 573 | sqlite3_int64 mtime = db_column_int(&q, 1); |
| 574 | 574 | const char *zHash = db_column_text(&q, 2); |
| 575 | 575 | int isDeleted = zHash==0; |
| 576 | + char *zAlgo = isDeleted ? "deleted" : strlen(zHash) == 40 ? "SHA1" : "SHA3-256"; | |
| 576 | 577 | int fullSize = db_column_int(&q, 3); |
| 577 | 578 | char *zAge = human_readable_age((iNow - mtime)/86400.0); |
| 578 | 579 | const char *zLogin = db_column_text(&q, 4); |
| 579 | 580 | int rcvid = db_column_int(&q,5); |
| 580 | 581 | if( zLogin==0 ) zLogin = ""; |
| @@ -587,10 +588,11 @@ | ||
| 587 | 588 | @ <th> Name |
| 588 | 589 | @ <th> Age |
| 589 | 590 | @ <th> Size |
| 590 | 591 | @ <th> User |
| 591 | 592 | @ <th> Hash |
| 593 | + @ <th> Algo | |
| 592 | 594 | if( g.perm.Admin ){ |
| 593 | 595 | @ <th> rcvid |
| 594 | 596 | } |
| 595 | 597 | @ </tr></thead> |
| 596 | 598 | @ <tbody> |
| @@ -608,11 +610,12 @@ | ||
| 608 | 610 | @ <td> <a href='%R/uv/%T(zName)'>%h(zName)</a> </td> |
| 609 | 611 | } |
| 610 | 612 | @ <td data-sortkey='%016llx(-mtime)'> %s(zAge) </td> |
| 611 | 613 | @ <td data-sortkey='%08x(fullSize)'> %s(zSzName) </td> |
| 612 | 614 | @ <td> %h(zLogin) </td> |
| 613 | - @ <td> %h(zHash) </td> | |
| 615 | + @ <td><code> %h(zHash) </code></td> | |
| 616 | + @ <td> %s(zAlgo) </td> | |
| 614 | 617 | if( g.perm.Admin ){ |
| 615 | 618 | if( rcvid ){ |
| 616 | 619 | @ <td> <a href="%R/rcvfrom?rcvid=%d(rcvid)">%d(rcvid)</a> |
| 617 | 620 | }else{ |
| 618 | 621 | @ <td> |
| 619 | 622 |
| --- src/unversioned.c | |
| +++ src/unversioned.c | |
| @@ -571,10 +571,11 @@ | |
| 571 | while( db_step(&q)==SQLITE_ROW ){ |
| 572 | const char *zName = db_column_text(&q, 0); |
| 573 | sqlite3_int64 mtime = db_column_int(&q, 1); |
| 574 | const char *zHash = db_column_text(&q, 2); |
| 575 | int isDeleted = zHash==0; |
| 576 | int fullSize = db_column_int(&q, 3); |
| 577 | char *zAge = human_readable_age((iNow - mtime)/86400.0); |
| 578 | const char *zLogin = db_column_text(&q, 4); |
| 579 | int rcvid = db_column_int(&q,5); |
| 580 | if( zLogin==0 ) zLogin = ""; |
| @@ -587,10 +588,11 @@ | |
| 587 | @ <th> Name |
| 588 | @ <th> Age |
| 589 | @ <th> Size |
| 590 | @ <th> User |
| 591 | @ <th> Hash |
| 592 | if( g.perm.Admin ){ |
| 593 | @ <th> rcvid |
| 594 | } |
| 595 | @ </tr></thead> |
| 596 | @ <tbody> |
| @@ -608,11 +610,12 @@ | |
| 608 | @ <td> <a href='%R/uv/%T(zName)'>%h(zName)</a> </td> |
| 609 | } |
| 610 | @ <td data-sortkey='%016llx(-mtime)'> %s(zAge) </td> |
| 611 | @ <td data-sortkey='%08x(fullSize)'> %s(zSzName) </td> |
| 612 | @ <td> %h(zLogin) </td> |
| 613 | @ <td> %h(zHash) </td> |
| 614 | if( g.perm.Admin ){ |
| 615 | if( rcvid ){ |
| 616 | @ <td> <a href="%R/rcvfrom?rcvid=%d(rcvid)">%d(rcvid)</a> |
| 617 | }else{ |
| 618 | @ <td> |
| 619 |
| --- src/unversioned.c | |
| +++ src/unversioned.c | |
| @@ -571,10 +571,11 @@ | |
| 571 | while( db_step(&q)==SQLITE_ROW ){ |
| 572 | const char *zName = db_column_text(&q, 0); |
| 573 | sqlite3_int64 mtime = db_column_int(&q, 1); |
| 574 | const char *zHash = db_column_text(&q, 2); |
| 575 | int isDeleted = zHash==0; |
| 576 | char *zAlgo = isDeleted ? "deleted" : strlen(zHash) == 40 ? "SHA1" : "SHA3-256"; |
| 577 | int fullSize = db_column_int(&q, 3); |
| 578 | char *zAge = human_readable_age((iNow - mtime)/86400.0); |
| 579 | const char *zLogin = db_column_text(&q, 4); |
| 580 | int rcvid = db_column_int(&q,5); |
| 581 | if( zLogin==0 ) zLogin = ""; |
| @@ -587,10 +588,11 @@ | |
| 588 | @ <th> Name |
| 589 | @ <th> Age |
| 590 | @ <th> Size |
| 591 | @ <th> User |
| 592 | @ <th> Hash |
| 593 | @ <th> Algo |
| 594 | if( g.perm.Admin ){ |
| 595 | @ <th> rcvid |
| 596 | } |
| 597 | @ </tr></thead> |
| 598 | @ <tbody> |
| @@ -608,11 +610,12 @@ | |
| 610 | @ <td> <a href='%R/uv/%T(zName)'>%h(zName)</a> </td> |
| 611 | } |
| 612 | @ <td data-sortkey='%016llx(-mtime)'> %s(zAge) </td> |
| 613 | @ <td data-sortkey='%08x(fullSize)'> %s(zSzName) </td> |
| 614 | @ <td> %h(zLogin) </td> |
| 615 | @ <td><code> %h(zHash) </code></td> |
| 616 | @ <td> %s(zAlgo) </td> |
| 617 | if( g.perm.Admin ){ |
| 618 | if( rcvid ){ |
| 619 | @ <td> <a href="%R/rcvfrom?rcvid=%d(rcvid)">%d(rcvid)</a> |
| 620 | }else{ |
| 621 | @ <td> |
| 622 |