Fossil SCM

Improved identification of the source of phantoms when they are named in a cluster but nowhere else.

drh 2020-10-13 13:26 trunk
Commit cd624d4ff267736272794085aa8cacd41e175ab7d3f089889f183487d378ca77
1 file changed +6 -4
+6 -4
--- src/name.c
+++ src/name.c
@@ -1041,11 +1041,12 @@
10411041
" 'referenced by cluster', blob.uuid\n"
10421042
" FROM description, tagxref, blob\n"
10431043
" WHERE description.summary='unknown'\n"
10441044
" AND tagxref.tagid=(SELECT tagid FROM tag WHERE tagname='cluster')\n"
10451045
" AND blob.rid=tagxref.rid\n"
1046
- " AND content(blob.uuid) GLOB ('*M '||blob.uuid||'*');"
1046
+ " AND CAST(content(blob.uuid) AS text)"
1047
+ " GLOB ('*M '||description.uuid||'*');"
10471048
);
10481049
}
10491050
10501051
/*
10511052
** Create the description table if it does not already exists.
@@ -1218,21 +1219,22 @@
12181219
int describe_artifacts_to_stdout(const char *zWhere, const char *zLabel){
12191220
Stmt q;
12201221
int cnt = 0;
12211222
if( zWhere!=0 ) describe_artifacts(zWhere);
12221223
db_prepare(&q,
1223
- "SELECT uuid, summary, isPrivate\n"
1224
+ "SELECT uuid, summary, coalesce(ref,''), isPrivate\n"
12241225
" FROM description\n"
12251226
" ORDER BY ctime, type;"
12261227
);
12271228
while( db_step(&q)==SQLITE_ROW ){
12281229
if( zLabel ){
12291230
fossil_print("%s\n", zLabel);
12301231
zLabel = 0;
12311232
}
1232
- fossil_print(" %.16s %s", db_column_text(&q,0), db_column_text(&q,1));
1233
- if( db_column_int(&q,2) ) fossil_print(" (private)");
1233
+ fossil_print(" %.16s %s %s", db_column_text(&q,0),
1234
+ db_column_text(&q,1), db_column_text(&q,2));
1235
+ if( db_column_int(&q,3) ) fossil_print(" (private)");
12341236
fossil_print("\n");
12351237
cnt++;
12361238
}
12371239
db_finalize(&q);
12381240
if( zWhere!=0 ) db_multi_exec("DELETE FROM description;");
12391241
--- src/name.c
+++ src/name.c
@@ -1041,11 +1041,12 @@
1041 " 'referenced by cluster', blob.uuid\n"
1042 " FROM description, tagxref, blob\n"
1043 " WHERE description.summary='unknown'\n"
1044 " AND tagxref.tagid=(SELECT tagid FROM tag WHERE tagname='cluster')\n"
1045 " AND blob.rid=tagxref.rid\n"
1046 " AND content(blob.uuid) GLOB ('*M '||blob.uuid||'*');"
 
1047 );
1048 }
1049
1050 /*
1051 ** Create the description table if it does not already exists.
@@ -1218,21 +1219,22 @@
1218 int describe_artifacts_to_stdout(const char *zWhere, const char *zLabel){
1219 Stmt q;
1220 int cnt = 0;
1221 if( zWhere!=0 ) describe_artifacts(zWhere);
1222 db_prepare(&q,
1223 "SELECT uuid, summary, isPrivate\n"
1224 " FROM description\n"
1225 " ORDER BY ctime, type;"
1226 );
1227 while( db_step(&q)==SQLITE_ROW ){
1228 if( zLabel ){
1229 fossil_print("%s\n", zLabel);
1230 zLabel = 0;
1231 }
1232 fossil_print(" %.16s %s", db_column_text(&q,0), db_column_text(&q,1));
1233 if( db_column_int(&q,2) ) fossil_print(" (private)");
 
1234 fossil_print("\n");
1235 cnt++;
1236 }
1237 db_finalize(&q);
1238 if( zWhere!=0 ) db_multi_exec("DELETE FROM description;");
1239
--- src/name.c
+++ src/name.c
@@ -1041,11 +1041,12 @@
1041 " 'referenced by cluster', blob.uuid\n"
1042 " FROM description, tagxref, blob\n"
1043 " WHERE description.summary='unknown'\n"
1044 " AND tagxref.tagid=(SELECT tagid FROM tag WHERE tagname='cluster')\n"
1045 " AND blob.rid=tagxref.rid\n"
1046 " AND CAST(content(blob.uuid) AS text)"
1047 " GLOB ('*M '||description.uuid||'*');"
1048 );
1049 }
1050
1051 /*
1052 ** Create the description table if it does not already exists.
@@ -1218,21 +1219,22 @@
1219 int describe_artifacts_to_stdout(const char *zWhere, const char *zLabel){
1220 Stmt q;
1221 int cnt = 0;
1222 if( zWhere!=0 ) describe_artifacts(zWhere);
1223 db_prepare(&q,
1224 "SELECT uuid, summary, coalesce(ref,''), isPrivate\n"
1225 " FROM description\n"
1226 " ORDER BY ctime, type;"
1227 );
1228 while( db_step(&q)==SQLITE_ROW ){
1229 if( zLabel ){
1230 fossil_print("%s\n", zLabel);
1231 zLabel = 0;
1232 }
1233 fossil_print(" %.16s %s %s", db_column_text(&q,0),
1234 db_column_text(&q,1), db_column_text(&q,2));
1235 if( db_column_int(&q,3) ) fossil_print(" (private)");
1236 fossil_print("\n");
1237 cnt++;
1238 }
1239 db_finalize(&q);
1240 if( zWhere!=0 ) db_multi_exec("DELETE FROM description;");
1241

Keyboard Shortcuts

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