Fossil

Diff
Login

Differences From Artifact [71017fdf9e]:

To Artifact [d889dd7993]:


275
276
277
278
279
280
281
282
283
284
285
286
287
288
289








290
291

292

293

294
295
296
297
298
299
300
301
302
303
275
276
277
278
279
280
281








282
283
284
285
286
287
288
289
290

291
292
293

294



295
296
297
298
299
300
301







-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+

-
+

+
-
+
-
-
-







** WEBPAGE: finfo
** URL: /finfo?name=FILENAME
**
** Show the change history for a single file.
**
** Additional query parameters:
**
**    a=DATETIME Only show changes after DATETIME
**    b=DATETIME Only show changes before DATETIME
**    m=HASH     Mark this particular file version
**    n=NUM      Show the first NUM changes only
**    brbg       Background color by branch name
**    ubg        Background color by user name
**    ci=HASH    Ancestors of a particular check-in
**    orig=HASH  If both ci and orig are supplied, only show those
**    a=DATETIME   Only show changes after DATETIME
**    b=DATETIME   Only show changes before DATETIME
**    m=HASH       Mark this particular file version
**    n=NUM        Show the first NUM changes only
**    brbg         Background color by branch name
**    ubg          Background color by user name
**    ci=HASH      Ancestors of a particular check-in
**    orig=HASH    If both ci and orig are supplied, only show those
**                 changes on a direct path from orig to ci.
**    showid     Show RID values for debugging
**    showid       Show RID values for debugging
**
** DATETIME may be in any of usual formats, including "now",
** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in
** "YYYY-MM-DDTHH:MM:SS.SSS", "YYYYMMDDHHMM", and others.
** year-month-day form, it may be truncated, and it may also name a
** timezone offset from UTC as "-HH:MM" (westward) or "+HH:MM"
** (eastward). Either no timezone suffix or "Z" means UTC.
*/
void finfo_page(void){
  Stmt q;
  const char *zFilename = PD("name","");
  char zPrevDate[20];
  const char *zA;
  const char *zB;
384
385
386
387
388
389
390
391


392
393
394
395


396
397
398
399
400
401
402
382
383
384
385
386
387
388

389
390
391
392
393

394
395
396
397
398
399
400
401
402







-
+
+



-
+
+







    "  FROM mlink, event, blob"
    " WHERE mlink.fnid=%d"
    "   AND event.objid=mlink.mid"
    "   AND mlink.fid=blob.rid",
    TAG_BRANCH, fnid
  );
  if( (zA = P("a"))!=0 ){
    blob_append_sql(&sql, " AND event.mtime>=julianday('%q')", zA);
    blob_append_sql(&sql, " AND event.mtime>=%.16g",
         symbolic_name_to_mtime(zA,0));
    url_add_parameter(&url, "a", zA);
  }
  if( (zB = P("b"))!=0 ){
    blob_append_sql(&sql, " AND event.mtime<=julianday('%q')", zB);
    blob_append_sql(&sql, " AND event.mtime<=%.16g",
         symbolic_name_to_mtime(zB,0));
    url_add_parameter(&url, "b", zB);
  }
  if( baseCheckin ){
    blob_append_sql(&sql,
      " AND mlink.mid IN (SELECT rid FROM ancestor)"
      " GROUP BY mlink.fid"
    );