Fossil

Check-in [a327bd29]
Login

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

Overview
Comment:Add the test-timewarp-list command and the test_timewarp web page.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:a327bd29bcc567a7cebfba226d269498fdd4fab3
User & Date: drh 2011-02-11 15:33:54
Context
2011-02-11
16:52
Improved graph rendering in the case of a time-warp. check-in: 79b81a31 user: drh tags: trunk
15:33
Add the test-timewarp-list command and the test_timewarp web page. check-in: a327bd29 user: drh tags: trunk
15:11
Fix the check-in time fudger so that it will not move the date/time of a check-in by more than a few seconds. If the sequence of check-ins is further off than that chronologically, then they just show up out of order in the timeline. check-in: feaab7ba user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/timeline.c.

1311
1312
1313
1314
1315
1316
1317


















































  if( clock==0 ) return 0;
  if( g.fTimeFormat==1 ){
    return gmtime(clock);
  }else{
    return localtime(clock);
  }
}

























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
  if( clock==0 ) return 0;
  if( g.fTimeFormat==1 ){
    return gmtime(clock);
  }else{
    return localtime(clock);
  }
}


/*
** COMMAND: test-timewarp-list
**
** Usage: %fossil test-timewarp-list
**
** Display all instances of child checkins that appear earlier in time
** than their parent.
*/
void test_timewarp_cmd(void){
  Stmt q;

  db_find_and_open_repository(0, 0);
  db_prepare(&q,
     "SELECT blob.uuid "
     "  FROM plink p, plink c, blob"
     " WHERE p.cid=c.pid  AND p.mtime>c.mtime"
     "   AND blob.rid=c.pid"
  );
  while( db_step(&q)==SQLITE_ROW ){
    printf("%s\n", db_column_text(&q, 0));
  }
  db_finalize(&q);
}

/*
** WEBPAGE: test_timewarps
*/
void test_timewarp_page(void){
  Stmt q;

  login_check_credentials();
  if( !g.okRead || !g.okHistory ){ login_needed(); return; }
  style_header("Instances of timewarp");
  @ <ul>
  db_prepare(&q,
     "SELECT blob.uuid "
     "  FROM plink p, plink c, blob"
     " WHERE p.cid=c.pid  AND p.mtime>c.mtime"
     "   AND blob.rid=c.pid"
  );
  while( db_step(&q)==SQLITE_ROW ){
    const char *zUuid = db_column_text(&q, 0);
    @ <li>
    @ <a href="%s(g.zTop)/timeline?p=%S(zUuid)&amp;d=%S(zUuid)">%S(zUuid)</a>
  }
  db_finalize(&q);
  style_footer();
}