Fossil

Check-in [09f82acd]
Login

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

Overview
Comment:Added the test-rename-list webpage.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:09f82acd13c3f04fedd3ef440f57b7f8f9ffb4fa
User & Date: drh 2014-04-29 17:32:16
Context
2014-04-29
18:02
Rebuild now sets user.mtime if it is NULL, per ML thread. check-in: 6fdf91d7 user: stephan tags: trunk
17:32
Added the test-rename-list webpage. check-in: 09f82acd user: drh tags: trunk
11:48
Possible fix for [56bafbab54]: unable to use network drive. Theory is that the AccessCheck() call failes because there are more than one Privileges in use. See: http://msdn.microsoft.com/en-us/library/windows/desktop/aa374815%28v=vs.85%29.aspx check-in: 969f0a26 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/path.c.

   507    507         fossil_free(zTo);
   508    508       }
   509    509       fossil_free(aChng);
   510    510       g.argv += 2;
   511    511       g.argc -= 2;
   512    512     }
   513    513   }
          514  +
          515  +/* Query to extract all rename operations */
          516  +static const char zRenameQuery[] = 
          517  +@ SELECT
          518  +@     datetime(event.mtime),
          519  +@     F.name AS old_name,
          520  +@     T.name AS new_name,
          521  +@     blob.uuid
          522  +@   FROM mlink, filename F, filename T, event, blob
          523  +@  WHERE coalesce(mlink.pfnid,0)!=0 AND mlink.pfnid!=mlink.fnid
          524  +@    AND F.fnid=mlink.pfnid
          525  +@    AND T.fnid=mlink.fnid
          526  +@    AND event.objid=mlink.mid
          527  +@    AND event.type='ci'
          528  +@    AND blob.rid=mlink.mid
          529  +@  ORDER BY 1 DESC, 2;
          530  +;
          531  +  
          532  +/*
          533  +** WEBPAGE: test-rename-list
          534  +**
          535  +** Print a list of all file rename operations throughout history.
          536  +** This page is intended for for testing purposes only and may change
          537  +** or be discontinued without notice.
          538  +*/
          539  +void test_rename_list_page(void){
          540  +  Stmt q;
          541  +
          542  +  login_check_credentials();
          543  +  if( !g.perm.Read ){ login_needed(); return; }
          544  +  style_header("List Of File Name Changes");
          545  +  @ <h3>NB: Experimental Page</h3>
          546  +  @ <table border="1" width="100%%">
          547  +  @ <tr><th>Date &amp; Time</th>
          548  +  @ <th>Old Name</th>
          549  +  @ <th>New Name</th>
          550  +  @ <th>Check-in</th></tr>
          551  +  db_prepare(&q, zRenameQuery);
          552  +  while( db_step(&q)==SQLITE_ROW ){
          553  +    const char *zDate = db_column_text(&q, 0);
          554  +    const char *zOld = db_column_text(&q, 1);
          555  +    const char *zNew = db_column_text(&q, 2);
          556  +    const char *zUuid = db_column_text(&q, 3);
          557  +    @ <tr>
          558  +    @ <td>%z(href("%R/timeline?c=%t",zDate))%s(zDate)</a></td>
          559  +    @ <td>%z(href("%R/finfo?name=%t",zOld))%h(zOld)</a></td>
          560  +    @ <td>%z(href("%R/finfo?name=%t",zNew))%h(zNew)</a></td>
          561  +    @ <td>%z(href("%R/info/%s",zUuid))%S(zUuid)</a></td></tr>
          562  +  }
          563  +  @ </table>
          564  +  db_finalize(&q);
          565  +  style_footer();
          566  +}