Fossil

Check-in [bf8e4377]
Login

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

Overview
Comment:Fix the /finfo page to do a better job of showing later deletions of files that are deleted more than once.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:bf8e4377a9cab88a2c3918f2a4207ef141b5be8d
User & Date: drh 2015-02-07 04:14:06
Context
2015-02-07
04:18
Add the Tk tests/id.test file graphing test case to the release checklist. check-in: ff7019ec user: drh tags: trunk
04:14
Fix the /finfo page to do a better job of showing later deletions of files that are deleted more than once. check-in: bf8e4377 user: drh tags: trunk
02:49
Improved management of URL parameters in the file browsers. Add file and directory icons to the flat-view. check-in: 7478f997 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/finfo.c.

   356    356       blob_append_sql(&sql, " AND event.mtime>=julianday('%q')", zA);
   357    357       url_add_parameter(&url, "a", zA);
   358    358     }
   359    359     if( (zB = P("b"))!=0 ){
   360    360       blob_append_sql(&sql, " AND event.mtime<=julianday('%q')", zB);
   361    361       url_add_parameter(&url, "b", zB);
   362    362     }
          363  +  /* We only want each version of a file to appear on the graph once,
          364  +  ** at its earliest appearance.  All the other times that it gets merged
          365  +  ** into this or that branch can be ignored.  An exception is for when
          366  +  ** files are deleted (when they have mlink.fid==0).  If the same file
          367  +  ** is deleted in multiple places, we want to show each deletion, so
          368  +  ** use a "fake fid" which is derived from the parent-fid for grouping.
          369  +  ** The same fake-fid must be used on the graph.
          370  +  */
   363    371     blob_append_sql(&sql,
   364         -    " GROUP BY mlink.fid"
          372  +    " GROUP BY"
          373  +    "   CASE WHEN mlink.fid>0 THEN mlink.fid ELSE mlink.pid+1000000000 END"
   365    374       " ORDER BY event.mtime DESC /*sort*/"
   366    375     );
   367    376     if( (n = atoi(PD("n","0")))>0 ){
   368    377       blob_append_sql(&sql, " LIMIT %d", n);
   369    378       url_add_parameter(&url, "n", P("n"));
   370    379     }
   371    380     db_prepare(&q, "%s", blob_sql_text(&sql));
................................................................................
   430    439       db_reset(&qparent);
   431    440       if( zBr==0 ) zBr = "trunk";
   432    441       if( uBg ){
   433    442         zBgClr = hash_color(zUser);
   434    443       }else if( brBg || zBgClr==0 || zBgClr[0]==0 ){
   435    444         zBgClr = strcmp(zBr,"trunk")==0 ? "" : hash_color(zBr);
   436    445       }
   437         -    gidx = graph_add_row(pGraph, frid, nParent, aParent, zBr, zBgClr,
          446  +    gidx = graph_add_row(pGraph, frid>0 ? frid : fpid+1000000000,
          447  +                         nParent, aParent, zBr, zBgClr,
   438    448                            zUuid, 0);
   439    449       if( strncmp(zDate, zPrevDate, 10) ){
   440    450         sqlite3_snprintf(sizeof(zPrevDate), zPrevDate, "%.10s", zDate);
   441    451         @ <tr><td>
   442    452         @   <div class="divider">%s(zPrevDate)</div>
   443    453         @ </td><td></td><td></td></tr>
   444    454       }