Fossil

Check-in [1c7dd794]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change output formatting of describe_artifact_to_stdout() to omit the RID. Make sure the purgeevent and purgeitem tables are not deleted by a rebuild.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | DBP-workflow
Files: files | file ages | folders
SHA1: 1c7dd7949e43001acd309506838bbc2ffa6b91b8
User & Date: drh 2014-12-01 17:17:32
Context
2014-12-01
17:26
Merge the latest trunk enhancements into DBP-workflow branch. check-in: ab188bad user: drh tags: DBP-workflow
17:17
Change output formatting of describe_artifact_to_stdout() to omit the RID. Make sure the purgeevent and purgeitem tables are not deleted by a rebuild. check-in: 1c7dd794 user: drh tags: DBP-workflow
2014-11-29
14:16
Always show a listing of imported content on "fossil bundle import". Added the "fossil test-phantoms" command. check-in: dd563556 user: drh tags: DBP-workflow
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/name.c.

920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945

946
947
948
949
950
951
952
** Print the content of the description table on stdout
*/
int describe_artifacts_to_stdout(const char *zWhere, const char *zLabel){
  Stmt q;
  int cnt = 0;
  describe_artifacts(zWhere);
  db_prepare(&q,
    "SELECT rid, uuid, datetime(ctime,'localtime'), type, detail, isPrivate\n"
    "  FROM description\n"
    " ORDER BY rid;"
  );
  while( db_step(&q)==SQLITE_ROW ){
    const char *zType = db_column_text(&q,3);
    const char *zPrivate = db_column_int(&q,5) ? "(U) " : "";
    if( zLabel ){ fossil_print("%s\n", zLabel); zLabel = 0; }
    fossil_print("%6d %.16s %s%s",
                 db_column_int(&q,0), db_column_text(&q,1), zPrivate,
                 db_column_text(&q,3));
    if( db_column_bytes(&q,4)>0 ){
      fossil_print(" %s", db_column_text(&q,4));
    }
    if( db_column_bytes(&q,2)>0
     && fossil_strcmp(zType,"checkin")==0
    ){
      fossil_print(" %s", db_column_text(&q,2));
    }

    fossil_print("\n");
    cnt++;
  }
  db_finalize(&q);
  db_multi_exec("DELETE FROM description;");
  return cnt;
}







|

|


|
<

<
|
<
|
|

|


|

>







920
921
922
923
924
925
926
927
928
929
930
931
932

933

934

935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
** Print the content of the description table on stdout
*/
int describe_artifacts_to_stdout(const char *zWhere, const char *zLabel){
  Stmt q;
  int cnt = 0;
  describe_artifacts(zWhere);
  db_prepare(&q,
    "SELECT uuid, datetime(ctime,'localtime'), type, detail, isPrivate\n"
    "  FROM description\n"
    " ORDER BY ctime, type;"
  );
  while( db_step(&q)==SQLITE_ROW ){
    const char *zType = db_column_text(&q,2);

    if( zLabel ){ fossil_print("%s\n", zLabel); zLabel = 0; }

    fossil_print("  %.16s %s", db_column_text(&q,0), db_column_text(&q,2));

    if( db_column_bytes(&q,3)>0 ){
      fossil_print(" %s", db_column_text(&q,3));
    }
    if( db_column_bytes(&q,1)>0
     && fossil_strcmp(zType,"checkin")==0
    ){
      fossil_print(" %s", db_column_text(&q,1));
    }
    if( db_column_int(&q,4) ) fossil_print(" (unpublished)");
    fossil_print("\n");
    cnt++;
  }
  db_finalize(&q);
  db_multi_exec("DELETE FROM description;");
  return cnt;
}

Changes to src/rebuild.c.

346
347
348
349
350
351
352
353

354
355
356
357
358
359
360
  rebuild_update_schema();
  for(;;){
    zTable = db_text(0,
       "SELECT name FROM sqlite_master /*scan*/"
       " WHERE type='table'"
       " AND name NOT IN ('blob','delta','rcvfrom','user',"
                         "'config','shun','private','reportfmt',"
                         "'concealed','accesslog','modreq')"

       " AND name NOT GLOB 'sqlite_*'"
       " AND name NOT GLOB 'fx_*'"
    );
    if( zTable==0 ) break;
    db_multi_exec("DROP TABLE %Q", zTable);
    free(zTable);
  }







|
>







346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
  rebuild_update_schema();
  for(;;){
    zTable = db_text(0,
       "SELECT name FROM sqlite_master /*scan*/"
       " WHERE type='table'"
       " AND name NOT IN ('blob','delta','rcvfrom','user',"
                         "'config','shun','private','reportfmt',"
                         "'concealed','accesslog','modreq',"
                         "'purgeevent','purgeitem')"
       " AND name NOT GLOB 'sqlite_*'"
       " AND name NOT GLOB 'fx_*'"
    );
    if( zTable==0 ) break;
    db_multi_exec("DROP TABLE %Q", zTable);
    free(zTable);
  }