Fossil SCM
Improved identification of the source of phantoms when they are named in a cluster but nowhere else.
Commit
cd624d4ff267736272794085aa8cacd41e175ab7d3f089889f183487d378ca77
Parent
2ec0dc29f386cc5…
1 file changed
+6
-4
+6
-4
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -1041,11 +1041,12 @@ | ||
| 1041 | 1041 | " 'referenced by cluster', blob.uuid\n" |
| 1042 | 1042 | " FROM description, tagxref, blob\n" |
| 1043 | 1043 | " WHERE description.summary='unknown'\n" |
| 1044 | 1044 | " AND tagxref.tagid=(SELECT tagid FROM tag WHERE tagname='cluster')\n" |
| 1045 | 1045 | " 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||'*');" | |
| 1047 | 1048 | ); |
| 1048 | 1049 | } |
| 1049 | 1050 | |
| 1050 | 1051 | /* |
| 1051 | 1052 | ** Create the description table if it does not already exists. |
| @@ -1218,21 +1219,22 @@ | ||
| 1218 | 1219 | int describe_artifacts_to_stdout(const char *zWhere, const char *zLabel){ |
| 1219 | 1220 | Stmt q; |
| 1220 | 1221 | int cnt = 0; |
| 1221 | 1222 | if( zWhere!=0 ) describe_artifacts(zWhere); |
| 1222 | 1223 | db_prepare(&q, |
| 1223 | - "SELECT uuid, summary, isPrivate\n" | |
| 1224 | + "SELECT uuid, summary, coalesce(ref,''), isPrivate\n" | |
| 1224 | 1225 | " FROM description\n" |
| 1225 | 1226 | " ORDER BY ctime, type;" |
| 1226 | 1227 | ); |
| 1227 | 1228 | while( db_step(&q)==SQLITE_ROW ){ |
| 1228 | 1229 | if( zLabel ){ |
| 1229 | 1230 | fossil_print("%s\n", zLabel); |
| 1230 | 1231 | zLabel = 0; |
| 1231 | 1232 | } |
| 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)"); | |
| 1234 | 1236 | fossil_print("\n"); |
| 1235 | 1237 | cnt++; |
| 1236 | 1238 | } |
| 1237 | 1239 | db_finalize(&q); |
| 1238 | 1240 | if( zWhere!=0 ) db_multi_exec("DELETE FROM description;"); |
| 1239 | 1241 |
| --- 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 |