Fossil

Check-in [cf3d716e2f]
Login

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

Overview
Comment:merge trunk
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | cleanX-no-clean-glob
Files: files | file ages | folders
SHA1: cf3d716e2fd8cb8ee3f49f5634c34f03c43c717b
User & Date: jan.nijtmans 2013-06-06 12:16:09.730
Context
2013-06-19
07:14
rebase ... (check-in: cbf9660369 user: jan.nijtmans tags: cleanX-no-clean-glob)
2013-06-06
12:16
merge trunk ... (check-in: cf3d716e2f user: jan.nijtmans tags: cleanX-no-clean-glob)
2013-06-05
08:12
make "fossil rm FOO" work as expected on case-insensitive file systems, where committed files "foo/*" exist. ... (check-in: fa6311a507 user: jan.nijtmans tags: trunk)
2013-06-04
14:07
remove unused variable ... (check-in: 3da761fce1 user: jan.nijtmans tags: cleanX-no-clean-glob)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/add.c.
334
335
336
337
338
339
340
341
342
343

344
345
346
347
348
349
350

    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));







|

|
>







334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351

    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));
628
629
630
631
632
633
634
635
636
637

638
639
640
641
642
643
644
      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);







|

|
>







629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
      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);
Changes to src/checkin.c.
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
  if( file_tree_name(g.zRepositoryName, &repo, 0) ){
    db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
  }
  db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
  while( db_step(&q)==SQLITE_ROW ){
    const char *zName = db_column_text(&q, 0);
    if( glob_match(pKeep, zName+n) ){
      fossil_print("WARNING: KEPT file \"%s\" not removed\n");
      continue;
    }
    if( !allFlag && (!extremeFlag || !glob_match(pIgnore, zName+n)) ){
      Blob ans;
      char cReply;
      char *prompt = mprintf("Remove unmanaged file \"%s\" (a=all/y/N)? ",
                             zName+n);







|







487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
  if( file_tree_name(g.zRepositoryName, &repo, 0) ){
    db_multi_exec("DELETE FROM sfile WHERE x=%B", &repo);
  }
  db_multi_exec("DELETE FROM sfile WHERE x IN (SELECT pathname FROM vfile)");
  while( db_step(&q)==SQLITE_ROW ){
    const char *zName = db_column_text(&q, 0);
    if( glob_match(pKeep, zName+n) ){
      fossil_print("WARNING: KEPT file \"%s\" not removed\n", zName+n);
      continue;
    }
    if( !allFlag && (!extremeFlag || !glob_match(pIgnore, zName+n)) ){
      Blob ans;
      char cReply;
      char *prompt = mprintf("Remove unmanaged file \"%s\" (a=all/y/N)? ",
                             zName+n);