Fossil SCM

On the /artifact_stats page, relabel "unknown" artifacts as "unused".

drh 2017-12-11 16:10 trunk
Commit 71e777dd730fa9af3f94aa863ada93efc55d4fdecd87a8c006cd88773f68c2fe
1 file changed +4 -4
+4 -4
--- src/stat.c
+++ src/stat.c
@@ -630,11 +630,11 @@
630630
@ WHERE atype IS NULL
631631
@ AND id IN (SELECT srcid FROM tagxref);
632632
@ UPDATE artstat SET atype='tag'
633633
@ WHERE atype IS NULL
634634
@ AND id IN (SELECT objid FROM event WHERE type='g');
635
- @ UPDATE artstat SET atype='unknown' WHERE atype IS NULL;
635
+ @ UPDATE artstat SET atype='unused' WHERE atype IS NULL;
636636
;
637637
db_multi_exec("%s", zSql/*safe-for-%s*/);
638638
if( bWithTypes ){
639639
db_multi_exec("%s", zSql2/*safe-for-%s*/);
640640
}
@@ -841,19 +841,19 @@
841841
sqlite3_free(z);
842842
}
843843
@ </tbody></table>
844844
db_finalize(&q);
845845
846
- if( db_exists("SELECT 1 FROM artstat WHERE atype='unknown'") ){
847
- @ <h1>Unknown Artifacts:</h1>
846
+ if( db_exists("SELECT 1 FROM artstat WHERE atype='unused'") ){
847
+ @ <h1>Unused Artifacts:</h1>
848848
db_prepare(&q,
849849
"SELECT artstat.id, blob.uuid, user.login,"
850850
" datetime(rcvfrom.mtime), rcvfrom.rcvid"
851851
" FROM artstat JOIN blob ON artstat.id=blob.rid"
852852
" LEFT JOIN rcvfrom USING(rcvid)"
853853
" LEFT JOIN user USING(uid)"
854
- " WHERE atype='unknown'"
854
+ " WHERE atype='unused'"
855855
);
856856
@ <table class='sortable' border='1' \
857857
@ data-column-types='ntttt' data-init-sort='0'>
858858
@ <thead><tr>
859859
@ <th>RecordID</th>
860860
--- src/stat.c
+++ src/stat.c
@@ -630,11 +630,11 @@
630 @ WHERE atype IS NULL
631 @ AND id IN (SELECT srcid FROM tagxref);
632 @ UPDATE artstat SET atype='tag'
633 @ WHERE atype IS NULL
634 @ AND id IN (SELECT objid FROM event WHERE type='g');
635 @ UPDATE artstat SET atype='unknown' WHERE atype IS NULL;
636 ;
637 db_multi_exec("%s", zSql/*safe-for-%s*/);
638 if( bWithTypes ){
639 db_multi_exec("%s", zSql2/*safe-for-%s*/);
640 }
@@ -841,19 +841,19 @@
841 sqlite3_free(z);
842 }
843 @ </tbody></table>
844 db_finalize(&q);
845
846 if( db_exists("SELECT 1 FROM artstat WHERE atype='unknown'") ){
847 @ <h1>Unknown Artifacts:</h1>
848 db_prepare(&q,
849 "SELECT artstat.id, blob.uuid, user.login,"
850 " datetime(rcvfrom.mtime), rcvfrom.rcvid"
851 " FROM artstat JOIN blob ON artstat.id=blob.rid"
852 " LEFT JOIN rcvfrom USING(rcvid)"
853 " LEFT JOIN user USING(uid)"
854 " WHERE atype='unknown'"
855 );
856 @ <table class='sortable' border='1' \
857 @ data-column-types='ntttt' data-init-sort='0'>
858 @ <thead><tr>
859 @ <th>RecordID</th>
860
--- src/stat.c
+++ src/stat.c
@@ -630,11 +630,11 @@
630 @ WHERE atype IS NULL
631 @ AND id IN (SELECT srcid FROM tagxref);
632 @ UPDATE artstat SET atype='tag'
633 @ WHERE atype IS NULL
634 @ AND id IN (SELECT objid FROM event WHERE type='g');
635 @ UPDATE artstat SET atype='unused' WHERE atype IS NULL;
636 ;
637 db_multi_exec("%s", zSql/*safe-for-%s*/);
638 if( bWithTypes ){
639 db_multi_exec("%s", zSql2/*safe-for-%s*/);
640 }
@@ -841,19 +841,19 @@
841 sqlite3_free(z);
842 }
843 @ </tbody></table>
844 db_finalize(&q);
845
846 if( db_exists("SELECT 1 FROM artstat WHERE atype='unused'") ){
847 @ <h1>Unused Artifacts:</h1>
848 db_prepare(&q,
849 "SELECT artstat.id, blob.uuid, user.login,"
850 " datetime(rcvfrom.mtime), rcvfrom.rcvid"
851 " FROM artstat JOIN blob ON artstat.id=blob.rid"
852 " LEFT JOIN rcvfrom USING(rcvid)"
853 " LEFT JOIN user USING(uid)"
854 " WHERE atype='unused'"
855 );
856 @ <table class='sortable' border='1' \
857 @ data-column-types='ntttt' data-init-sort='0'>
858 @ <thead><tr>
859 @ <th>RecordID</th>
860

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button