Fossil with Commonmark

Changes On Branch use-d-type
Login

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

Changes In Branch use-d-type Excluding Merge-Ins

This is equivalent to a diff from 1c39f113d1 to e1bcc99da3

2014-02-24
10:56
Speedup "fossil extras" and other commands which traverse the local filesystem. See: [http://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg14697.html]. Thanks to Samuel Debionne for the suggestion. check-in: 3fbdaa243d user: jan.nijtmans tags: trunk
10:22
Same optimization in "fossil reconstruct" Closed-Leaf check-in: e1bcc99da3 user: jan.nijtmans tags: use-d-type
10:14
If pEntry->d_type==DT_LNK, then it could be a link to a directory or to a file, so handle that the same as DT_UNKNOWN. check-in: eb2dc8faac user: jan.nijtmans tags: use-d-type
2014-02-21
04:59
Keep track of versionable and text-area based settings using discrete fields of the stControlSettings structure. check-in: 9b2d565931 user: mistachkin tags: trunk
2014-02-20
15:19
(experiment) Use d_type field of dirent structure for speedup. check-in: 0c7834c77b user: jan.nijtmans tags: use-d-type
10:01
Fix [a56db55924]: Crash on STASH DIFF command check-in: 1c39f113d1 user: jan.nijtmans tags: trunk
09:42
Unnecessary blob_zero() calls: the following prompt_user() call already does a blob_zero() call internally. check-in: 14768c24e5 user: jan.nijtmans tags: trunk

Changes to src/rebuild.c.

856
857
858
859
860
861
862




863



864
865
866
867
868
869
870
856
857
858
859
860
861
862
863
864
865
866

867
868
869
870
871
872
873
874
875
876







+
+
+
+
-
+
+
+








      if( pEntry->d_name[0]=='.' ){
        continue;
      }
      zUtf8Name = fossil_filename_to_utf8(pEntry->d_name);
      zSubpath = mprintf("%s/%s", zPath, zUtf8Name);
      fossil_filename_free(zUtf8Name);
#ifdef _DIRENT_HAVE_D_TYPE
      if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
          ? (file_isdir(zSubpath)==1) : (pEntry->d_type==DT_DIR) )
#else
      if( file_isdir(zSubpath)==1 ){
      if( file_isdir(zSubpath)==1 )
#endif
      {
        recon_read_dir(zSubpath);
      }else{
        blob_init(&path, 0, 0);
        blob_appendf(&path, "%s", zSubpath);
        if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){
          fossil_fatal("some unknown error occurred while reading \"%s\"",
                       blob_str(&path));

Changes to src/vfile.c.

484
485
486
487
488
489
490




491

492
493
494




495

496
497
498
499
500
501
502
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512







+
+
+
+

+



+
+
+
+

+







      }
      zUtf8 = fossil_filename_to_utf8(pEntry->d_name);
      blob_appendf(pPath, "/%s", zUtf8);
      zPath = blob_str(pPath);
      if( glob_match(pIgnore1, &zPath[nPrefix+1]) ||
          glob_match(pIgnore2, &zPath[nPrefix+1]) ){
        /* do nothing */
#ifdef _DIRENT_HAVE_D_TYPE
      }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
          ? (file_wd_isdir(zPath)==1) : (pEntry->d_type==DT_DIR) ){
#else
      }else if( file_wd_isdir(zPath)==1 ){
#endif
        if( !vfile_top_of_checkout(zPath) ){
          vfile_scan(pPath, nPrefix, scanFlags, pIgnore1, pIgnore2);
        }
#ifdef _DIRENT_HAVE_D_TYPE
      }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
          ? (file_wd_isfile_or_link(zPath)) : (pEntry->d_type==DT_REG) ){
#else
      }else if( file_wd_isfile_or_link(zPath) ){
#endif
        if( (scanFlags & SCAN_TEMP)==0 || is_temporary_file(zUtf8) ){
          db_bind_text(&ins, ":file", &zPath[nPrefix+1]);
          db_step(&ins);
          db_reset(&ins);
        }
      }
      fossil_filename_free(zUtf8);
591
592
593
594
595
596
597




598

599
600
601
602
603
604
605
606
607
608
609




610

611
612
613
614
615
616
617
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637







+
+
+
+

+











+
+
+
+

+







      zUtf8 = fossil_filename_to_utf8(pEntry->d_name);
      blob_appendf(pPath, "/%s", zUtf8);
      zPath = blob_str(pPath);
      if( glob_match(pIgnore1, &zPath[nPrefix+1]) ||
          glob_match(pIgnore2, &zPath[nPrefix+1]) ||
          glob_match(pIgnore3, &zPath[nPrefix+1]) ){
        /* do nothing */
#ifdef _DIRENT_HAVE_D_TYPE
      }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
          ? (file_wd_isdir(zPath)==1) : (pEntry->d_type==DT_DIR) ){
#else
      }else if( file_wd_isdir(zPath)==1 ){
#endif
        if( (scanFlags & SCAN_NESTED) || !vfile_top_of_checkout(zPath) ){
          char *zSavePath = mprintf("%s", zPath);
          int count = vfile_dir_scan(pPath, nPrefix, scanFlags, pIgnore1,
                                     pIgnore2, pIgnore3);
          db_bind_text(&ins, ":file", &zSavePath[nPrefix+1]);
          db_bind_int(&ins, ":count", count);
          db_step(&ins);
          db_reset(&ins);
          fossil_free(zSavePath);
          result += count; /* found X normal files? */
        }
#ifdef _DIRENT_HAVE_D_TYPE
      }else if( (pEntry->d_type==DT_UNKNOWN || pEntry->d_type==DT_LNK)
          ? (file_wd_isfile_or_link(zPath)) : (pEntry->d_type==DT_REG) ){
#else
      }else if( file_wd_isfile_or_link(zPath) ){
#endif
        db_bind_text(&upd, ":file", zOrigPath);
        db_step(&upd);
        db_reset(&upd);
        result++; /* found 1 normal file */
      }
      fossil_filename_free(zUtf8);
      blob_resize(pPath, origSize);