Fossil

Check-in [4f46e4f9]
Login

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

Overview
Comment:Less verbose -v
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | peter-ls
Files: files | file ages | folders
SHA1: 4f46e4f910a717c1818a819034d7e7910c5db1f8
User & Date: peter 2015-03-06 22:31:12
Context
2015-03-10
00:17
Add the -r option to the "ls" command. check-in: e567a910 user: drh tags: trunk
2015-03-06
22:31
Less verbose -v Closed-Leaf check-in: 4f46e4f9 user: peter tags: peter-ls
22:14
Extend fossil ls with -r check-in: 87f51a3d user: peter tags: peter-ls
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
  if( timeOrder ){
    zOrderBy = "mtime DESC";
  }

  compute_fileage(rid,0);
  db_prepare(&q,
    "SELECT datetime(fileage.mtime, 'localtime'), fileage.pathname,\n"
    "       blob.size, blob.uuid, blob2.uuid\n"
    "  FROM fileage, blob, blob as blob2\n"
    " WHERE blob.rid=fileage.fid AND blob2.rid=fileage.mid %s\n"
    " ORDER BY %s;", blob_sql_text(&where), zOrderBy /*safe-for-%s*/
  );
  blob_reset(&where);

  while( db_step(&q)==SQLITE_ROW ){
    const char *zTime = db_column_text(&q,0);
    const char *zFile = db_column_text(&q,1);
    int size = db_column_int(&q,2);
    const char *zFUuid = db_column_text(&q,3);
    const char *zCUuid = db_column_text(&q,4);
    if( verboseFlag ){
      /* TBD: What to include in verbose. UUID? */
      fossil_print("%s  %7d  %S  %S  %s\n", zTime, size, zFUuid, zCUuid, zFile);
    }else if( showAge ){
      fossil_print("%s  %s\n", zTime, zFile);
    }else{
      fossil_print("%s\n", zFile);
    }        
  }
  db_finalize(&q);







|
|
|








<
<

<
|







314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331


332

333
334
335
336
337
338
339
340
  if( timeOrder ){
    zOrderBy = "mtime DESC";
  }

  compute_fileage(rid,0);
  db_prepare(&q,
    "SELECT datetime(fileage.mtime, 'localtime'), fileage.pathname,\n"
    "       blob.size\n"
    "  FROM fileage, blob\n"
    " WHERE blob.rid=fileage.fid %s\n"
    " ORDER BY %s;", blob_sql_text(&where), zOrderBy /*safe-for-%s*/
  );
  blob_reset(&where);

  while( db_step(&q)==SQLITE_ROW ){
    const char *zTime = db_column_text(&q,0);
    const char *zFile = db_column_text(&q,1);
    int size = db_column_int(&q,2);


    if( verboseFlag ){

      fossil_print("%s  %7d  %s\n", zTime, size, zFile);
    }else if( showAge ){
      fossil_print("%s  %s\n", zTime, zFile);
    }else{
      fossil_print("%s\n", zFile);
    }        
  }
  db_finalize(&q);