Fossil

Check-in [fa6311a5]
Login

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

Overview
Comment:make "fossil rm FOO" work as expected on case-insensitive file systems, where committed files "foo/*" exist.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:fa6311a5078112d1fcb92f93859f54b2dddd9e11
User & Date: jan.nijtmans 2013-06-05 08:12:36
Context
2013-06-10
07:07
A typo in help screen (reported by Sergei Gavrikov) check-in: b894afad user: jan.nijtmans tags: trunk
2013-06-08
02:37
Merge updates from trunk. Closed-Leaf check-in: b8919a55 user: edward tags: berner-nt
01:34
Merge updates from trunk. Leaf check-in: 7872db85 user: edward tags: long-double-bug
2013-06-06
12:16
merge trunk check-in: cf3d716e user: jan.nijtmans tags: cleanX-no-clean-glob
06:31
Teach config.h to recognize Sun's C compiler. Leaf check-in: 57b58527 user: edward tags: sun-compiler
2013-06-05
08:12
make "fossil rm FOO" work as expected on case-insensitive file systems, where committed files "foo/*" exist. check-in: fa6311a5 user: jan.nijtmans tags: trunk
2013-05-31
17:41
Avoid SQL errors when the "fossil ticket" command is misused to try to append icomment text. Ticket [d4378c258d9fc6b] check-in: 878f7008 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/add.c.

344
345
346
347
348
349
350
351
352
353

354
355
356
357
358
359
360
...
647
648
649
650
651
652
653
654
655
656

657
658
659
660
661
662
663

    file_tree_name(g.argv[i], &treeName, 1);
    zTreeName = blob_str(&treeName);
    db_multi_exec(
       "INSERT OR IGNORE INTO sfile"
       " SELECT pathname FROM vfile"
       "  WHERE (pathname=%Q %s"
       "     OR (pathname>'%q/' AND pathname<'%q0'))"
       "    AND NOT deleted",
       zTreeName, filename_collation(), zTreeName, zTreeName

    );
    blob_reset(&treeName);
  }
  
  db_prepare(&loop, "SELECT x FROM sfile");
  while( db_step(&loop)==SQLITE_ROW ){
    fossil_print("DELETED %s\n", db_column_text(&loop, 0));
................................................................................
      int nOrig;
      file_tree_name(g.argv[i], &orig, 1);
      zOrig = blob_str(&orig);
      nOrig = blob_size(&orig);
      db_prepare(&q,
         "SELECT pathname FROM vfile"
         " WHERE vid=%d"
         "   AND (pathname='%q' %s OR (pathname>'%q/' AND pathname<'%q0'))"
         " ORDER BY 1",
         vid, zOrig, filename_collation(), zOrig, zOrig

      );
      while( db_step(&q)==SQLITE_ROW ){
        const char *zPath = db_column_text(&q, 0);
        int nPath = db_column_bytes(&q, 0);
        const char *zTail;
        if( nPath==nOrig ){
          zTail = file_tail(zPath);







|

|
>







 







|

|
>







344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
...
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665

    file_tree_name(g.argv[i], &treeName, 1);
    zTreeName = blob_str(&treeName);
    db_multi_exec(
       "INSERT OR IGNORE INTO sfile"
       " SELECT pathname FROM vfile"
       "  WHERE (pathname=%Q %s"
       "     OR (pathname>'%q/' %s AND pathname<'%q0' %s))"
       "    AND NOT deleted",
       zTreeName, filename_collation(), zTreeName,
       filename_collation(), zTreeName, filename_collation()
    );
    blob_reset(&treeName);
  }
  
  db_prepare(&loop, "SELECT x FROM sfile");
  while( db_step(&loop)==SQLITE_ROW ){
    fossil_print("DELETED %s\n", db_column_text(&loop, 0));
................................................................................
      int nOrig;
      file_tree_name(g.argv[i], &orig, 1);
      zOrig = blob_str(&orig);
      nOrig = blob_size(&orig);
      db_prepare(&q,
         "SELECT pathname FROM vfile"
         " WHERE vid=%d"
         "   AND (pathname='%q' %s OR (pathname>'%q/' %s AND pathname<'%q0' %s))"
         " ORDER BY 1",
         vid, zOrig, filename_collation(), zOrig, filename_collation(),
         zOrig, filename_collation()
      );
      while( db_step(&q)==SQLITE_ROW ){
        const char *zPath = db_column_text(&q, 0);
        int nPath = db_column_bytes(&q, 0);
        const char *zTail;
        if( nPath==nOrig ){
          zTail = file_tail(zPath);