Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From trunk To release
2024-03-28
| ||
20:57 | Fix to the "fossil git status" command as suggested by forum post e15631f21e16f0b6. ... (Leaf check-in: 00283039 user: drh tags: trunk) | |
10:40 | Make the shunned/unshunned list legible (not blue on black) in the xekri skin. ... (check-in: dbbc4800 user: stephan tags: trunk) | |
2023-11-02
| ||
19:37 | For the "fossil sync" command if the -v option is repeated, then the HTTP_VERBOSE flag is set on the http_exchange() call, resulting in additional debugging output for the wire protocol. ... (check-in: 80896224 user: drh tags: trunk) | |
12:44 | Check if markdown paragraphs contains lists. Fixes issue reported in b598ac56defddb2a. ... (Closed-Leaf check-in: 25028896 user: preben tags: markdown-multiple-sublists) | |
2023-11-01
| ||
18:56 | Version 2.23 ... (check-in: 47362306 user: drh tags: trunk, release, version-2.23) | |
14:13 | Update the built-in SQLite to version 3.44.0. ... (check-in: 72e14351 user: drh tags: trunk) | |
Changes to Dockerfile.
︙ | |||
79 80 81 82 83 84 85 | 79 80 81 82 83 84 85 86 87 88 89 90 | - + - + - | ## --------------------------------------------------------------------- ## RUN! ## --------------------------------------------------------------------- ENV PATH "/bin" EXPOSE 8080/tcp USER fossil |
Changes to VERSION.
| 1 | - + |
|
Changes to auto.def.
︙ | |||
453 454 455 456 457 458 459 | 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | - - | } } } if {$found} { define FOSSIL_ENABLE_SSL define-append EXTRA_CFLAGS $cflags define-append EXTRA_LDFLAGS $ldflags |
︙ | |||
655 656 657 658 659 660 661 | 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | - | } set version $tclconfig(TCL_VERSION)$tclconfig(TCL_PATCH_LEVEL) msg-result "Found Tcl $version at $tclconfig(TCL_PREFIX)" if {!$tclprivatestubs} { define-append LIBS $libs } define-append EXTRA_CFLAGS $cflags |
︙ |
Changes to autosetup/autosetup-find-tclsh.
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - + | #!/bin/sh # Looks for a suitable tclsh or jimsh in the PATH # If not found, builds a bootstrap jimsh from source # Prefer $autosetup_tclsh if is set in the environment d=`dirname "$0"` { "$d/jimsh0" "$d/autosetup-test-tclsh"; } 2>/dev/null && exit 0 PATH="$PATH:$d"; export PATH for tclsh in $autosetup_tclsh jimsh tclsh tclsh8.5 tclsh8.6; do { $tclsh "$d/autosetup-test-tclsh"; } 2>/dev/null && exit 0 done echo 1>&2 "No installed jimsh or tclsh, building local bootstrap jimsh0" for cc in ${CC_FOR_BUILD:-cc} gcc; do |
Changes to extsrc/pikchr.c.
1 | 1 2 3 4 5 6 7 8 9 | - + - | /* This file is automatically generated by Lemon from input grammar |
︙ | |||
318 319 320 321 322 323 324 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | - | PPoint with; /* Position constraint from WITH clause */ char eWith; /* Type of heading point on WITH clause */ char cw; /* True for clockwise arc */ char larrow; /* Arrow at beginning (<- or <->) */ char rarrow; /* Arrow at end (-> or <->) */ char bClose; /* True if "close" is seen */ char bChop; /* True if "chop" is seen */ |
︙ | |||
490 491 492 493 494 495 496 | 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 | - + | static void pik_behind(Pik*,PObj*); static PObj *pik_assert(Pik*,PNum,PToken*,PNum); static PObj *pik_position_assert(Pik*,PPoint*,PToken*,PPoint*); static PNum pik_dist(PPoint*,PPoint*); static void pik_add_macro(Pik*,PToken *pId,PToken *pCode); |
︙ | |||
634 635 636 637 638 639 640 | 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 | - - - - - | ** zero the stack is dynamically sized using realloc() ** pik_parserARG_SDECL A static variable declaration for the %extra_argument ** pik_parserARG_PDECL A parameter declaration for the %extra_argument ** pik_parserARG_PARAM Code to pass %extra_argument as a subroutine parameter ** pik_parserARG_STORE Code to store %extra_argument into yypParser ** pik_parserARG_FETCH Code to extract %extra_argument from yypParser ** pik_parserCTX_* As pik_parserARG_ except for %extra_context |
︙ | |||
679 680 681 682 683 684 685 | 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 | - - - - - - - - - - - - - - - - - - - - - | #define YYSTACKDEPTH 100 #endif #define pik_parserARG_SDECL #define pik_parserARG_PDECL #define pik_parserARG_PARAM #define pik_parserARG_FETCH #define pik_parserARG_STORE |
︙ | |||
1276 1277 1278 1279 1280 1281 1282 | 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 | + - - - + + + + + + + | int yyhwm; /* High-water mark of the stack */ #endif #ifndef YYNOERRORRECOVERY int yyerrcnt; /* Shifts left before out of the error */ #endif pik_parserARG_SDECL /* A place to hold %extra_argument */ pik_parserCTX_SDECL /* A place to hold %extra_context */ #if YYSTACKDEPTH<=0 |
︙ | |||
1622 1623 1624 1625 1626 1627 1628 | 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 | - + - - - - - - + + + + + - - + - + - - + + - - - - + + + + - + - - + - - + + - - - - - + + - - + + + + + + + + + + | /* 153 */ "edge ::= RIGHT", /* 154 */ "edge ::= LEFT", /* 155 */ "object ::= objectname", }; #endif /* NDEBUG */ |
︙ | |||
1743 1744 1745 1746 1747 1748 1749 | 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 | - + - + - + - + | ** Note: during a reduce, the only symbols destroyed are those ** which appear on the RHS of the rule, but which are *not* used ** inside the C code. */ /********* Begin destructor definitions ***************************************/ case 100: /* statement_list */ { |
︙ | |||
1788 1789 1790 1791 1792 1793 1794 | 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 | - - - - - + - - - - - - - - - - - - - + - - + | } /* ** Clear all secondary memory allocations from the parser */ void pik_parserFinalize(void *p){ yyParser *pParser = (yyParser*)p; |
︙ | |||
1989 1990 1991 1992 1993 1994 1995 | 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 | - + - + | fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt); } #endif while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser); /* Here code is inserted which will execute if the parser ** stack every overflows */ /******** Begin %stack_overflow code ******************************************/ |
︙ | |||
2036 2037 2038 2039 2040 2041 2042 | 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 | + + - - + + + + + + - - + + | yypParser->yytos++; #ifdef YYTRACKMAXSTACKDEPTH if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ yypParser->yyhwm++; assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) ); } #endif #if YYSTACKDEPTH>0 if( yypParser->yytos>yypParser->yystackEnd ){ |
︙ | |||
2417 2418 2419 2420 2421 2422 2423 | 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | ** { ... } // User supplied code ** #line <lineno> <thisfile> ** break; */ /********** Begin reduce actions **********************************************/ YYMINORTYPE yylhsminor; case 0: /* document ::= statement_list */ |
︙ | |||
3128 3129 3130 3131 3132 3133 3134 | 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 | - + - + | int yymajor, /* The major type of the error token */ pik_parserTOKENTYPE yyminor /* The minor type of the error token */ ){ pik_parserARG_FETCH pik_parserCTX_FETCH #define TOKEN yyminor /************ Begin %syntax_error code ****************************************/ |
︙ | |||
3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 | 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 | + + + + + + + | #ifdef YYTRACKMAXSTACKDEPTH if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){ yypParser->yyhwm++; assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack)); } #endif #if YYSTACKDEPTH>0 if( yypParser->yytos>=yypParser->yystackEnd ){ yyStackOverflow(yypParser); break; } #else if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){ if( yyGrowStack(yypParser) ){ yyStackOverflow(yypParser); break; } } #endif } yyact = yy_reduce(yypParser,yyruleno,yymajor,yyminor pik_parserCTX_PARAM); }else if( yyact <= YY_MAX_SHIFTREDUCE ){ yy_shift(yypParser,yyact,(YYCODETYPE)yymajor,yyminor); #ifndef YYNOERRORRECOVERY yypParser->yyerrcnt--; #endif |
︙ | |||
3405 3406 3407 3408 3409 3410 3411 | 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 | - + | assert( iToken<(int)(sizeof(yyFallback)/sizeof(yyFallback[0])) ); return yyFallback[iToken]; #else (void)iToken; return 0; #endif } |
︙ | |||
3600 3601 3602 3603 3604 3605 3606 | 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 | - - | { "charwid", 0.08 }, { "circlerad", 0.25 }, { "color", 0.0 }, { "cylht", 0.5 }, { "cylrad", 0.075 }, { "cylwid", 0.75 }, { "dashwid", 0.05 }, |
︙ | |||
3982 3983 3984 3985 3986 3987 3988 | 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | pik_append_dis(p," r=\"", r, "\""); pik_append_style(p,pObj,2); pik_append(p,"\" />\n", -1); } pik_append_txt(p, pObj, 0); } |
︙ | |||
4421 4422 4423 4424 4425 4426 4427 | 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 | - - - - - - - - - - - | /* xNumProp */ 0, /* xCheck */ 0, /* xChop */ boxChop, /* xOffset */ cylinderOffset, /* xFit */ cylinderFit, /* xRender */ cylinderRender }, |
︙ | |||
5199 5200 5201 5202 5203 5204 5205 | 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 | - + | int iErrCol; /* Column of the error token on its line */ int iStart; /* Start position of the error context */ int iEnd; /* End position of the error context */ int iLineno; /* Line number of the error */ int iFirstLineno; /* Line number of start of error context */ int i; /* Loop counter */ int iBump = 0; /* Bump the location of the error cursor */ |
︙ | |||
6360 6361 6362 6363 6364 6365 6366 | 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 | - - + - - - - + | pik_error(0, pFit, "no text to fit to"); return; } if( pObj->type->xFit==0 ) return; pik_bbox_init(&bbox); pik_compute_layout_settings(p); pik_append_txt(p, pObj, &bbox); |
︙ | |||
8238 8239 8240 8241 8242 8243 8244 | 8141 8142 8143 8144 8145 8146 8147 8148 | - + | return TCL_OK; } #endif /* PIKCHR_TCL */ |
Changes to extsrc/pikchr.js.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + + - + - + | var initPikchrModule = (() => { var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; return ( |
︙ | |||
33 34 35 36 37 38 39 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | - + - - + + - + - + - + - + - + - + + - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + | function locateFile(path) { if (Module["locateFile"]) { return Module["locateFile"](path, scriptDirectory); } return scriptDirectory + path; } |
︙ | |||
177 178 179 180 181 182 183 | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 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 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | + - + + + - + + - - + + + + - + - - + - - + + - - - - - - - - - - - + + + + + + + + + + + + + + + - + - + - + - + - - - - - + - - - - - - - + + + - - - - - + - - + - - - - + - - - - + - - - + + + + + - + - - - - - - - - + + + + + + + + + - - - - + + + + + + + + + + + + - - + - - - - - + + + + + + + + - - - + + + - - + - - - - - - - - - + - - - + + - - - - + - + - - + - - + - - - + - - - + + - - - - - + + + + + + - - - - - - + - + - - + - - + - - + - - - + - - - - - - - - + - - - + - - - - - - + + + - + - - - - - - - + - - - - - - - + - - - - - - - + + + - - - - - - - + + + + + - - + + + + - - + - - - + - - - - - + + + + + + + + + + - - - - - - + + + + + + + - - - - - - - - - + - - - - + + + - - + + + - - - - - + + - - + - - - - - + + + + + + - - - - - + + + - - - - + + - - - + + + - - - - - - + + + + + + + + + + + - - - - + + - - - + - - - + + - - - - - - - + + + - - - - - + - - - + - - - - + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - + - - - - - - + + - - - + + - - - - - + + + - + | var runDependencyWatcher = null; var dependenciesFulfilled = null; function addRunDependency(id) { runDependencies++; if (Module["monitorRunDependencies"]) { |
︙ | |||
605 606 607 608 609 610 611 | 596 597 598 599 600 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 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 | - - - + + - - - - - + + + - - - - - - + + + + + + - + - + + + - + + + - + + + - - + + - + - + + + - + + | var ret = func.apply(null, cArgs); function onDone(ret) { if (stack !== 0) stackRestore(stack); return convertReturnValue(ret); } ret = onDone(ret); return ret; |
︙ | |||
700 701 702 703 704 705 706 | 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 | - + + + - + | Module["preInit"].pop()(); } } run(); |
Changes to extsrc/pikchr.wasm.
cannot compute difference between binary files
Changes to extsrc/shell.c.
︙ | |||
248 249 250 251 252 253 254 255 256 257 | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | + + - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - | #endif #undef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #include <windows.h> /* string conversion routines only needed on Win32 */ extern char *sqlite3_win32_unicode_to_utf8(LPCWSTR); extern char *sqlite3_win32_mbcs_to_utf8_v2(const char *, int); extern char *sqlite3_win32_utf8_to_mbcs_v2(const char *, int); extern LPWSTR sqlite3_win32_utf8_to_unicode(const char *zText); #endif |
︙ | |||
1358 1359 1360 1361 1362 1363 1364 | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 | - - - - + + + + | ** Print the timing results. */ static void endTimer(void){ if( enableTimer ){ sqlite3_int64 iEnd = timeOfDay(); struct rusage sEnd; getrusage(RUSAGE_SELF, &sEnd); |
︙ | |||
1437 1438 1439 1440 1441 1442 1443 | 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 | - - - - + + + + | ** Print the timing results. */ static void endTimer(void){ if( enableTimer && getProcessTimesAddr){ FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd; sqlite3_int64 ftWallEnd = timeOfDay(); getProcessTimesAddr(hProcess,&ftCreation,&ftExit,&ftKernelEnd,&ftUserEnd); |
︙ | |||
1477 1478 1479 1480 1481 1482 1483 | 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | + + + + + + + + + + + + + + + + + + + - - - + + + | /* ** Treat stdin as an interactive input if the following variable ** is true. Otherwise, assume stdin is connected to a file or pipe. */ static int stdin_is_interactive = 1; /* ** If build is for non-RT Windows, without 3rd-party line editing, ** console input and output may be done in a UTF-8 compatible way, ** if the OS is capable of it and the --no-utf8 option is not seen. */ #if (defined(_WIN32) || defined(WIN32)) && SHELL_USE_LOCAL_GETLINE \ && !defined(SHELL_OMIT_WIN_UTF8) && !SQLITE_OS_WINRT # define SHELL_WIN_UTF8_OPT 1 /* Record whether to do UTF-8 console I/O translation per stream. */ static int console_utf8_in = 0; static int console_utf8_out = 0; /* Record whether can do UTF-8 or --no-utf8 seen in invocation. */ static int mbcs_opted = 1; /* Assume cannot do until shown otherwise. */ #else # define console_utf8_in 0 # define console_utf8_out 0 # define SHELL_WIN_UTF8_OPT 0 #endif /* |
︙ | |||
1601 1602 1603 1604 1605 1606 1607 | 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 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 | - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + | shell_strncpy(dynPrompt.dynamicPrompt, "(..", 4); }else if( dynPrompt.inParenLevel<0 ){ shell_strncpy(dynPrompt.dynamicPrompt, ")x!", 4); }else{ shell_strncpy(dynPrompt.dynamicPrompt, "(x.", 4); dynPrompt.dynamicPrompt[2] = (char)('0'+dynPrompt.inParenLevel); } |
︙ | |||
1643 1644 1645 1646 1647 1648 1649 | 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 | - + - + - + - + - + - + | static void SQLITE_CDECL iotracePrintf(const char *zFormat, ...){ va_list ap; char *z; if( iotrace==0 ) return; va_start(ap, zFormat); z = sqlite3_vmprintf(zFormat, ap); va_end(ap); |
︙ | |||
1733 1734 1735 1736 1737 1738 1739 | 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 | - - + + - + | /* ** Return open FILE * if zFile exists, can be opened for read ** and is an ordinary file or a character stream source. ** Otherwise return 0. */ static FILE * openChrSource(const char *zFile){ |
︙ | |||
1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 | 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 | + + + + + + + + + + + + + + + + + | if( n>0 && zLine[n-1]=='\n' ){ n--; if( n>0 && zLine[n-1]=='\r' ) n--; zLine[n] = 0; break; } } #if defined(_WIN32) || defined(WIN32) /* For interactive input on Windows systems, with -no-utf8, ** translate the multi-byte characterset characters into UTF-8. ** This is the translation that predates console UTF-8 input. */ if( stdin_is_interactive && in==stdin && !console_utf8_in ){ char *zTrans = sqlite3_win32_mbcs_to_utf8_v2(zLine, 0); if( zTrans ){ i64 nTrans = strlen(zTrans)+1; if( nTrans>nLine ){ zLine = realloc(zLine, nTrans); shell_check_oom(zLine); } memcpy(zLine, zTrans, nTrans); sqlite3_free(zTrans); } } #endif /* defined(_WIN32) || defined(WIN32) */ return zLine; } /* ** Retrieve a single line of input text. ** ** If in==0 then read from standard input and prompt before each line. |
︙ | |||
1822 1823 1824 1825 1826 1827 1828 | 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 | - + | char *zPrompt; char *zResult; if( in!=0 ){ zResult = local_getline(zPrior, in); }else{ zPrompt = isContinuation ? CONTINUATION_PROMPT : mainPrompt; #if SHELL_USE_LOCAL_GETLINE |
︙ | |||
2069 2070 2071 2072 2073 2074 2075 | 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 | - + | sqlite3_value **apVal ){ double r = sqlite3_value_double(apVal[0]); int n = nVal>=2 ? sqlite3_value_int(apVal[1]) : 26; char z[400]; if( n<1 ) n = 1; if( n>350 ) n = 350; |
︙ | |||
5727 5728 5729 5730 5731 5732 5733 | 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 | - + - - - + + - - + - - - + - - + + | #ifndef SQLITE_OMIT_VIRTUALTABLE /* ** Return that member of a generate_series(...) sequence whose 0-based ** index is ix. The 0th member is given by smBase. The sequence members ** progress per ix increment by smStep. */ |
︙ | |||
13804 13805 13806 13807 13808 13809 13810 | 13057 13058 13059 13060 13061 13062 13063 13064 13065 13066 13067 13068 13069 13070 13071 | - + | #endif /* Copy the entire schema of database [db] into [dbm]. */ if( rc==SQLITE_OK ){ sqlite3_stmt *pSql = 0; rc = idxPrintfPrepareStmt(pNew->db, &pSql, pzErrmsg, "SELECT sql FROM sqlite_schema WHERE name NOT LIKE 'sqlite_%%'" |
︙ | |||
14006 14007 14008 14009 14010 14011 14012 | 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | } } #endif /* ifndef SQLITE_OMIT_VIRTUALTABLE */ /************************* End ../ext/expert/sqlite3expert.c ********************/ |
︙ | |||
15968 15969 15970 15971 15972 15973 15974 | 14103 14104 14105 14106 14107 14108 14109 14110 14111 14112 14113 14114 14115 14116 | - | iOff += nPointer; /* Load the "byte of payload including overflow" field */ if( bNextPage || iOff>pCsr->nPage ){ bNextPage = 1; }else{ iOff += dbdataGetVarintU32(&pCsr->aPage[iOff], &nPayload); |
︙ | |||
19285 19286 19287 19288 19289 19290 19291 | 17419 17420 17421 17422 17423 17424 17425 17426 17427 17428 17429 17430 17431 17432 | - | u8 scanstatsOn; /* True to display scan stats before each finalize */ u8 openMode; /* SHELL_OPEN_NORMAL, _APPENDVFS, or _ZIPFILE */ u8 doXdgOpen; /* Invoke start/open/xdg-open in output_reset() */ u8 nEqpLevel; /* Depth of the EQP output graph */ u8 eTraceType; /* SHELL_TRACE_* value for type of trace */ u8 bSafeMode; /* True to prohibit unsafe operations */ u8 bSafeModePersist; /* The long-term value of bSafeMode */ |
︙ | |||
19479 19480 19481 19482 19483 19484 19485 | 17612 17613 17614 17615 17616 17617 17618 17619 17620 17621 17622 17623 17624 17625 17626 17627 17628 17629 17630 17631 17632 17633 17634 17635 17636 17637 17638 17639 17640 17641 17642 17643 17644 17645 17646 17647 17648 17649 17650 17651 17652 17653 17654 17655 17656 17657 17658 17659 17660 17661 17662 17663 | - + - + - + - + + | /* ** A callback for the sqlite3_log() interface. */ static void shellLog(void *pArg, int iErrCode, const char *zMsg){ ShellState *p = (ShellState*)pArg; if( p->pLog==0 ) return; |
︙ | |||
19683 19684 19685 19686 19687 19688 19689 | 17817 17818 17819 17820 17821 17822 17823 17824 17825 17826 17827 17828 17829 17830 17831 17832 17833 17834 17835 17836 17837 17838 17839 17840 17841 17842 17843 17844 17845 17846 17847 17848 | - + - + | memcpy(p->colSeparator, p->colSepPrior, sizeof(p->colSeparator)); memcpy(p->rowSeparator, p->rowSepPrior, sizeof(p->rowSeparator)); } /* ** Output the given string as a hex-encoded blob (eg. X'1234' ) */ |
︙ | |||
19730 19731 19732 19733 19734 19735 19736 | 17864 17865 17866 17867 17868 17869 17870 17871 17872 17873 17874 17875 17876 17877 17878 17879 17880 17881 17882 17883 17884 17885 17886 17887 17888 17889 17890 17891 17892 17893 17894 17895 17896 17897 17898 17899 17900 17901 17902 17903 17904 17905 17906 17907 17908 17909 17910 17911 17912 17913 17914 17915 17916 17917 17918 17919 17920 17921 17922 17923 17924 17925 17926 17927 17928 17929 17930 17931 17932 17933 17934 17935 17936 17937 17938 17939 17940 17941 17942 17943 17944 17945 17946 17947 17948 17949 17950 17951 17952 17953 17954 17955 17956 17957 17958 17959 17960 17961 17962 17963 17964 17965 17966 17967 17968 17969 17970 17971 17972 17973 17974 17975 17976 17977 17978 17979 17980 17981 17982 17983 17984 17985 17986 17987 17988 17989 17990 17991 17992 17993 17994 17995 17996 17997 17998 17999 18000 18001 18002 18003 18004 18005 18006 18007 18008 18009 18010 18011 18012 18013 18014 18015 18016 18017 18018 18019 18020 18021 18022 18023 18024 18025 18026 18027 18028 18029 18030 18031 18032 18033 18034 18035 18036 18037 18038 18039 18040 18041 18042 18043 18044 18045 18046 18047 18048 18049 18050 18051 18052 18053 18054 18055 18056 18057 18058 18059 18060 18061 18062 18063 18064 18065 18066 18067 18068 18069 | - + - - - + - - + - + - + - + - + - - + - - - - + - - - + - - + - + - + - + - + - + - + - + - + - + - + - - + - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - + + - - - - - + + + + - - - + + + + - - - - + + - - - - - + + + - - + + - + - - + - - + - + - - - - - - - - + - - - + + + - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - + + - - - - + + + + + + - - + - + - + - + - + - + - + - + - + | } /* ** Output the given string as a quoted string using SQL quoting conventions. ** ** See also: output_quoted_escaped_string() */ |
︙ | |||
20015 20016 20017 20018 20019 20020 20021 20022 | 18093 18094 18095 18096 18097 18098 18099 18100 18101 18102 18103 18104 18105 18106 18107 18108 18109 18110 18111 18112 18113 18114 18115 18116 18117 18118 18119 18120 18121 18122 18123 18124 18125 18126 18127 18128 | + - + - + - + - + | /* ** Output a single term of CSV. Actually, p->colSeparator is used for ** the separator, which may or may not be a comma. p->nullValue is ** the null value. Strings are quoted if necessary. The separator ** is only issued if bSep is true. */ static void output_csv(ShellState *p, const char *z, int bSep){ FILE *out = p->out; if( z==0 ){ |
︙ | |||
20143 20144 20145 20146 20147 20148 20149 | 18222 18223 18224 18225 18226 18227 18228 18229 18230 18231 18232 18233 18234 18235 18236 18237 18238 18239 18240 18241 18242 18243 18244 18245 18246 18247 18248 18249 18250 18251 18252 18253 18254 18255 18256 18257 18258 18259 18260 18261 | - + - + - + - + - + - + | }; int i; const char *az[4]; az[0] = zA1; az[1] = zA2; az[2] = zA3; az[3] = zA4; |
︙ | |||
20190 20191 20192 20193 20194 20195 20196 | 18269 18270 18271 18272 18273 18274 18275 18276 18277 18278 18279 18280 18281 18282 18283 18284 18285 18286 18287 18288 18289 18290 18291 18292 | - + - + - + - + | z = zNew; break; } sqlite3_free(zNew); } } if( sqlite3_strglob("CREATE TABLE ['\"]*", z)==0 ){ |
︙ | |||
20227 20228 20229 20230 20231 20232 20233 | 18306 18307 18308 18309 18310 18311 18312 18313 18314 18315 18316 18317 18318 18319 18320 | - + | */ static void eqp_append(ShellState *p, int iEqpId, int p2, const char *zText){ EQPGraphRow *pNew; i64 nText; if( zText==0 ) return; nText = strlen(zText); if( p->autoEQPtest ){ |
︙ | |||
20275 20276 20277 20278 20279 20280 20281 | 18354 18355 18356 18357 18358 18359 18360 18361 18362 18363 18364 18365 18366 18367 18368 18369 18370 18371 18372 18373 18374 18375 18376 18377 18378 18379 18380 18381 18382 18383 18384 18385 18386 18387 18388 18389 18390 18391 18392 18393 18394 18395 18396 18397 18398 18399 18400 18401 18402 18403 18404 18405 18406 18407 18408 18409 18410 18411 18412 18413 18414 18415 18416 18417 18418 18419 18420 18421 18422 18423 18424 18425 18426 18427 18428 18429 18430 18431 18432 18433 18434 18435 18436 18437 18438 18439 18440 18441 18442 18443 18444 18445 18446 18447 18448 18449 18450 18451 18452 18453 18454 | + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - + | static void eqp_render_level(ShellState *p, int iEqpId){ EQPGraphRow *pRow, *pNext; i64 n = strlen(p->sGraph.zPrefix); char *z; for(pRow = eqp_next_row(p, iEqpId, 0); pRow; pRow = pNext){ pNext = eqp_next_row(p, iEqpId, pRow); z = pRow->zText; utf8_printf(p->out, "%s%s%s\n", p->sGraph.zPrefix, |
︙ | |||
20390 20391 20392 20393 20394 20395 20396 | 18470 18471 18472 18473 18474 18475 18476 18477 18478 18479 18480 18481 18482 18483 18484 18485 18486 18487 | - + - - + + | case MODE_Line: { int w = 5; if( azArg==0 ) break; for(i=0; i<nArg; i++){ int len = strlen30(azCol[i] ? azCol[i] : ""); if( len>w ) w = len; } |
︙ | |||
20420 20421 20422 20423 20424 20425 20426 | 18500 18501 18502 18503 18504 18505 18506 18507 18508 18509 18510 18511 18512 18513 18514 18515 18516 18517 18518 18519 18520 18521 18522 18523 18524 18525 18526 18527 18528 18529 18530 18531 18532 18533 18534 18535 18536 18537 18538 18539 18540 18541 18542 18543 18544 18545 18546 18547 18548 18549 18550 18551 18552 18553 18554 18555 18556 18557 18558 18559 18560 18561 18562 | - - + + - - + + - + - - + + - + - + | iIndent = 3; } if( nArg>nWidth ) nArg = nWidth; /* If this is the first row seen, print out the headers */ if( p->cnt++==0 ){ for(i=0; i<nArg; i++){ |
︙ | |||
20501 20502 20503 20504 20505 20506 20507 | 18581 18582 18583 18584 18585 18586 18587 18588 18589 18590 18591 18592 18593 18594 18595 18596 18597 18598 18599 18600 18601 18602 18603 18604 18605 18606 18607 18608 18609 18610 18611 18612 18613 18614 18615 18616 18617 18618 18619 18620 18621 18622 18623 18624 18625 18626 18627 18628 18629 18630 18631 18632 18633 18634 18635 18636 18637 18638 18639 18640 18641 18642 18643 18644 18645 18646 18647 18648 18649 18650 18651 18652 18653 18654 18655 18656 18657 18658 18659 18660 18661 18662 18663 18664 18665 18666 18667 18668 18669 18670 18671 18672 18673 18674 18675 18676 18677 18678 18679 18680 18681 18682 18683 18684 18685 18686 18687 18688 18689 18690 18691 18692 18693 18694 18695 18696 18697 18698 18699 18700 18701 18702 18703 18704 18705 18706 18707 18708 18709 18710 18711 18712 18713 18714 18715 18716 18717 18718 18719 18720 18721 18722 18723 18724 18725 18726 18727 18728 18729 18730 18731 18732 18733 18734 18735 18736 18737 18738 18739 18740 18741 18742 18743 18744 18745 18746 18747 18748 18749 18750 18751 18752 18753 18754 18755 18756 18757 18758 18759 18760 18761 18762 18763 18764 18765 18766 18767 18768 18769 18770 18771 18772 18773 18774 18775 18776 18777 18778 18779 18780 18781 18782 18783 18784 18785 18786 18787 18788 18789 18790 18791 18792 18793 18794 18795 18796 18797 18798 18799 18800 18801 18802 18803 18804 18805 18806 18807 18808 18809 18810 18811 18812 18813 18814 18815 18816 18817 18818 18819 18820 18821 18822 18823 18824 18825 18826 18827 18828 18829 18830 18831 18832 18833 18834 18835 18836 18837 18838 18839 18840 18841 18842 18843 18844 | - + - + - + + - + - - + + + + + + - + - - - + + + - + - + - - - + + + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - + - - + + - + | }else if( c=='-' && z[i+1]=='-' ){ cEnd = '\n'; }else if( c=='(' ){ nParen++; }else if( c==')' ){ nParen--; if( nLine>0 && nParen==0 && j>0 ){ |
︙ | |||
20824 20825 20826 20827 20828 20829 20830 | 18909 18910 18911 18912 18913 18914 18915 18916 18917 18918 18919 18920 18921 18922 18923 | - + | "INSERT INTO [_shell$self]\n" " VALUES('run','PRAGMA integrity_check','ok');\n" "INSERT INTO selftest(tno,op,cmd,ans)" " SELECT rowid*10,op,cmd,ans FROM [_shell$self];\n" "DROP TABLE [_shell$self];" ,0,0,&zErrMsg); if( zErrMsg ){ |
︙ | |||
20927 20928 20929 20930 20931 20932 20933 | 19012 19013 19014 19015 19016 19017 19018 19019 19020 19021 19022 19023 19024 19025 19026 19027 19028 19029 19030 19031 19032 19033 19034 19035 19036 19037 19038 19039 19040 19041 19042 19043 19044 19045 19046 19047 19048 19049 19050 19051 19052 | - - + + - + - + - + - + - + + | int rc; int nResult; int i; const char *z; rc = sqlite3_prepare_v2(p->db, zSelect, -1, &pSelect, 0); if( rc!=SQLITE_OK || !pSelect ){ char *zContext = shell_error_context(zSelect, p->db); |
︙ | |||
20988 20989 20990 20991 20992 20993 20994 | 19074 19075 19076 19077 19078 19079 19080 19081 19082 19083 19084 19085 19086 19087 19088 | - + | return zErr; } #ifdef __linux__ /* ** Attempt to display I/O stats on Linux using /proc/PID/io */ |
︙ | |||
21011 21012 21013 21014 21015 21016 21017 | 19097 19098 19099 19100 19101 19102 19103 19104 19105 19106 19107 19108 19109 19110 19111 19112 19113 19114 19115 19116 19117 19118 19119 19120 19121 19122 19123 19124 19125 19126 19127 19128 19129 19130 19131 19132 19133 19134 19135 19136 19137 19138 19139 19140 19141 19142 19143 19144 19145 19146 19147 19148 19149 19150 19151 19152 19153 19154 19155 19156 19157 19158 19159 19160 19161 19162 19163 19164 19165 19166 19167 19168 19169 19170 19171 19172 19173 19174 19175 19176 19177 19178 19179 19180 19181 19182 19183 19184 19185 19186 19187 19188 19189 19190 19191 19192 19193 19194 19195 19196 19197 19198 19199 19200 19201 19202 19203 19204 19205 19206 19207 19208 19209 19210 19211 19212 19213 19214 19215 19216 19217 19218 19219 19220 19221 19222 19223 19224 19225 19226 19227 19228 19229 19230 19231 19232 19233 19234 19235 19236 19237 19238 19239 19240 19241 19242 19243 19244 19245 19246 19247 19248 19249 19250 19251 19252 19253 19254 19255 19256 19257 19258 19259 19260 19261 19262 19263 19264 19265 19266 19267 19268 19269 19270 19271 19272 19273 19274 19275 19276 19277 19278 19279 19280 19281 19282 19283 19284 19285 19286 | - + + - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - + + - + + - + + - + + - + + - + - + - + - + - + + - + + - + - + - + - + + - + - + - + - + - + | { "write_bytes: ", "Bytes written to storage:" }, { "cancelled_write_bytes: ", "Cancelled write bytes:" }, }; int i; for(i=0; i<ArraySize(aTrans); i++){ int n = strlen30(aTrans[i].zPattern); if( cli_strncmp(aTrans[i].zPattern, z, n)==0 ){ |
︙ | |||
21409 21410 21411 21412 21413 21414 21415 | 19507 19508 19509 19510 19511 19512 19513 19514 19515 19516 19517 19518 19519 19520 19521 | - + | ShellState *pArg /* Pointer to ShellState */ ){ #ifndef SQLITE_ENABLE_STMT_SCANSTATUS UNUSED_PARAMETER(db); UNUSED_PARAMETER(pArg); #else if( pArg->scanstatsOn==3 ){ |
︙ | |||
21555 21556 21557 21558 21559 21560 21561 | 19653 19654 19655 19656 19657 19658 19659 19660 19661 19662 19663 19664 19665 19666 19667 19668 19669 19670 19671 19672 19673 19674 19675 19676 19677 19678 19679 19680 19681 19682 19683 19684 19685 19686 19687 19688 19689 19690 19691 19692 19693 19694 19695 19696 19697 19698 19699 19700 | - + - + - + - - + + - - + + - + - + | #define BOX_234 "\342\224\254" /* U+252c -,- */ #define BOX_124 "\342\224\264" /* U+2534 -'- */ #define BOX_1234 "\342\224\274" /* U+253c -|- */ /* Draw horizontal line N characters long using unicode box ** characters */ |
︙ | |||
21757 21758 21759 21760 21761 21762 21763 | 19855 19856 19857 19858 19859 19860 19861 19862 19863 19864 19865 19866 19867 19868 | - | int bw = p->cmOpts.bWordWrap; const char *zEmpty = ""; const char *zShowNull = p->nullValue; rc = sqlite3_step(pStmt); if( rc!=SQLITE_ROW ) return; nColumn = sqlite3_column_count(pStmt); |
︙ | |||
21843 21844 21845 21846 21847 21848 21849 21850 21851 21852 21853 21854 21855 21856 21857 | 19940 19941 19942 19943 19944 19945 19946 19947 19948 19949 19950 19951 19952 19953 19954 19955 19956 19957 19958 19959 19960 19961 19962 19963 19964 19965 19966 19967 19968 19969 19970 19971 19972 19973 19974 19975 19976 19977 19978 19979 19980 19981 19982 19983 19984 19985 19986 19987 19988 19989 19990 19991 19992 19993 19994 19995 19996 19997 19998 19999 20000 20001 20002 20003 20004 20005 20006 20007 20008 20009 20010 20011 20012 20013 20014 20015 20016 20017 20018 20019 20020 20021 20022 20023 20024 20025 20026 20027 20028 20029 20030 20031 20032 20033 20034 20035 20036 20037 20038 20039 20040 20041 20042 20043 20044 20045 20046 20047 20048 20049 | + - + - + - - + + - - + + - + - - - + + + - + - + - + - + - + - + | z = azData[i]; if( z==0 ) z = (char*)zEmpty; n = strlenChar(z); j = i%nColumn; if( n>p->actualWidth[j] ) p->actualWidth[j] = n; } if( seenInterrupt ) goto columnar_end; if( nColumn==0 ) goto columnar_end; switch( p->cMode ){ case MODE_Column: { colSep = " "; rowSep = "\n"; if( p->showHeader ){ for(i=0; i<nColumn; i++){ w = p->actualWidth[i]; if( p->colWidth[i]<0 ) w = -w; |
︙ | |||
22076 22077 22078 22079 22080 22081 22082 22083 22084 22085 22086 22087 22088 22089 22090 22091 | 20174 20175 20176 20177 20178 20179 20180 20181 20182 20183 20184 20185 20186 20187 20188 20189 20190 20191 20192 20193 20194 20195 20196 20197 20198 20199 20200 20201 20202 20203 20204 20205 20206 20207 20208 20209 20210 20211 | + - - + + - - + + - - + + | char **pzErr ){ int rc = SQLITE_OK; sqlite3expert *p = pState->expert.pExpert; assert( p ); assert( bCancel || pzErr==0 || *pzErr==0 ); if( bCancel==0 ){ FILE *out = pState->out; int bVerbose = pState->expert.bVerbose; rc = sqlite3_expert_analyze(p, pzErr); if( rc==SQLITE_OK ){ int nQuery = sqlite3_expert_count(p); int i; if( bVerbose ){ const char *zCand = sqlite3_expert_report(p,0,EXPERT_REPORT_CANDIDATES); |
︙ | |||
22133 22134 22135 22136 22137 22138 22139 | 20232 20233 20234 20235 20236 20237 20238 20239 20240 20241 20242 20243 20244 20245 20246 20247 20248 20249 20250 20251 20252 20253 20254 20255 20256 20257 20258 20259 20260 20261 20262 20263 20264 20265 20266 | - + - + - + + - + | if( z[0]=='-' && z[1]=='-' ) z++; n = strlen30(z); if( n>=2 && 0==cli_strncmp(z, "-verbose", n) ){ pState->expert.bVerbose = 1; } else if( n>=2 && 0==cli_strncmp(z, "-sample", n) ){ if( i==(nArg-1) ){ |
︙ | |||
22479 22480 22481 22482 22483 22484 22485 | 20579 20580 20581 20582 20583 20584 20585 20586 20587 20588 20589 20590 20591 20592 20593 20594 20595 20596 20597 20598 20599 20600 20601 20602 20603 20604 20605 20606 20607 20608 20609 20610 20611 20612 20613 20614 20615 | - + - + - + - + - + | zSql = azArg[2]; if( zTable==0 ) return 0; if( zType==0 ) return 0; dataOnly = (p->shellFlgs & SHFLG_DumpDataOnly)!=0; noSys = (p->shellFlgs & SHFLG_DumpNoSys)!=0; if( cli_strcmp(zTable, "sqlite_sequence")==0 && !noSys ){ |
︙ | |||
22559 22560 22561 22562 22563 22564 22565 | 20659 20660 20661 20662 20663 20664 20665 20666 20667 20668 20669 20670 20671 20672 20673 | - + | savedDestTable = p->zDestTable; savedMode = p->mode; p->zDestTable = sTable.z; p->mode = p->cMode = MODE_Insert; rc = shell_exec(p, sSelect.z, 0); if( (rc&0xff)==SQLITE_CORRUPT ){ |
︙ | |||
22590 22591 22592 22593 22594 22595 22596 | 20690 20691 20692 20693 20694 20695 20696 20697 20698 20699 20700 20701 20702 20703 20704 20705 20706 20707 20708 20709 20710 20711 20712 20713 20714 20715 | - + - + - + | ){ int rc; char *zErr = 0; rc = sqlite3_exec(p->db, zQuery, dump_callback, p, &zErr); if( rc==SQLITE_CORRUPT ){ char *zQ2; int len = strlen30(zQuery); |
︙ | |||
22725 22726 22727 22728 22729 22730 22731 | 20825 20826 20827 20828 20829 20830 20831 20832 20833 20834 20835 20836 20837 20838 | - | #endif #ifndef SQLITE_OMIT_TEST_CONTROL ",imposter INDEX TABLE Create imposter table TABLE on index INDEX", #endif ".indexes ?TABLE? Show names of indexes", " If TABLE is specified, only show indexes for", " tables matching TABLE using the LIKE operator.", |
︙ | |||
22958 22959 22960 22961 22962 22963 22964 | 21057 21058 21059 21060 21061 21062 21063 21064 21065 21066 21067 21068 21069 21070 21071 21072 21073 21074 21075 21076 21077 21078 21079 21080 21081 21082 21083 21084 21085 21086 21087 21088 21089 21090 21091 21092 21093 21094 21095 21096 21097 21098 21099 21100 21101 21102 21103 21104 21105 21106 21107 21108 21109 21110 21111 21112 21113 21114 21115 | - + - + - + - + - + - + | break; default: hh &= ~HH_Summary; break; } if( ((hw^hh)&HH_Undoc)==0 ){ if( (hh&HH_Summary)!=0 ){ |
︙ | |||
23040 23041 23042 23043 23044 23045 23046 | 21139 21140 21141 21142 21143 21144 21145 21146 21147 21148 21149 21150 21151 21152 21153 21154 21155 21156 21157 21158 21159 21160 21161 21162 21163 21164 21165 21166 21167 21168 21169 | - + - + - + | long nIn; size_t nRead; char *pBuf; int rc; if( in==0 ) return 0; rc = fseek(in, 0, SEEK_END); if( rc!=0 ){ |
︙ | |||
23177 23178 23179 23180 23181 23182 23183 | 21276 21277 21278 21279 21280 21281 21282 21283 21284 21285 21286 21287 21288 21289 21290 21291 21292 21293 21294 21295 21296 21297 21298 21299 21300 21301 21302 21303 21304 21305 21306 21307 21308 21309 21310 21311 | - + - + | FILE *in; const char *zDbFilename = p->pAuxDb->zDbFilename; unsigned int x[16]; char zLine[1000]; if( zDbFilename ){ in = fopen(zDbFilename, "r"); if( in==0 ){ |
︙ | |||
23240 23241 23242 23243 23244 23245 23246 | 21339 21340 21341 21342 21343 21344 21345 21346 21347 21348 21349 21350 21351 21352 21353 | - + | while( fgets(zLine, sizeof(zLine), p->in)!=0 ){ nLine++; if(cli_strncmp(zLine, "| end ", 6)==0 ) break; } p->lineno = nLine; } sqlite3_free(a); |
︙ | |||
23314 23315 23316 23317 23318 23319 23320 23321 | 21413 21414 21415 21416 21417 21418 21419 21420 21421 21422 21423 21424 21425 21426 21427 21428 21429 21430 21431 21432 21433 21434 21435 21436 21437 21438 21439 21440 21441 21442 21443 21444 21445 21446 | + - - + + + - + + + - - + + - | case SHELL_OPEN_UNSPEC: case SHELL_OPEN_NORMAL: { sqlite3_open_v2(zDbFilename, &p->db, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|p->openFlags, 0); break; } } globalDb = p->db; if( p->db==0 || SQLITE_OK!=sqlite3_errcode(p->db) ){ |
︙ | |||
23435 23436 23437 23438 23439 23440 23441 | 21537 21538 21539 21540 21541 21542 21543 21544 21545 21546 21547 21548 21549 21550 21551 | - + | if( aData==0 ){ return; } rc = sqlite3_deserialize(p->db, "main", aData, nData, nData, SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE); if( rc ){ |
︙ | |||
23459 23460 23461 23462 23463 23464 23465 | 21561 21562 21563 21564 21565 21566 21567 21568 21569 21570 21571 21572 21573 21574 21575 21576 | - + + | /* ** Attempt to close the database connection. Report errors. */ void close_db(sqlite3 *db){ int rc = sqlite3_close(db); if( rc ){ |
︙ | |||
23620 23621 23622 23623 23624 23625 23626 | 21723 21724 21725 21726 21727 21728 21729 21730 21731 21732 21733 21734 21735 21736 21737 21738 | - + + | if( i>0 && zArg[i]==0 ) return (int)(integerValue(zArg) & 0xffffffff); if( sqlite3_stricmp(zArg, "on")==0 || sqlite3_stricmp(zArg,"yes")==0 ){ return 1; } if( sqlite3_stricmp(zArg, "off")==0 || sqlite3_stricmp(zArg,"no")==0 ){ return 0; } |
︙ | |||
23658 23659 23660 23661 23662 23663 23664 | 21762 21763 21764 21765 21766 21767 21768 21769 21770 21771 21772 21773 21774 21775 21776 | - + | }else if( cli_strcmp(zFile, "stderr")==0 ){ f = stderr; }else if( cli_strcmp(zFile, "off")==0 ){ f = 0; }else{ f = fopen(zFile, bTextMode ? "w" : "wb"); if( f==0 ){ |
︙ | |||
23680 23681 23682 23683 23684 23685 23686 | 21784 21785 21786 21787 21788 21789 21790 21791 21792 21793 21794 21795 21796 21797 21798 | - + | ){ ShellState *p = (ShellState*)pArg; sqlite3_stmt *pStmt; const char *zSql; i64 nSql; if( p->traceOut==0 ) return 0; if( mType==SQLITE_TRACE_CLOSE ){ |
︙ | |||
23711 23712 23713 23714 23715 23716 23717 | 21815 21816 21817 21818 21819 21820 21821 21822 21823 21824 21825 21826 21827 21828 21829 21830 21831 21832 21833 21834 | - + - + | if( zSql==0 ) return 0; nSql = strlen(zSql); if( nSql>1000000000 ) nSql = 1000000000; while( nSql>0 && zSql[nSql-1]==';' ){ nSql--; } switch( mType ){ case SQLITE_TRACE_ROW: case SQLITE_TRACE_STMT: { |
︙ | |||
23823 23824 23825 23826 23827 23828 23829 | 21927 21928 21929 21930 21931 21932 21933 21934 21935 21936 21937 21938 21939 21940 21941 21942 21943 21944 21945 21946 | + - + - - + + | || (c==EOF && pc==cQuote) ){ do{ p->n--; }while( p->z[p->n]!=cQuote ); p->cTerm = c; break; } if( pc==cQuote && c!='\r' ){ utf8_printf(stderr, "%s:%d: unescaped %c character\n", |
︙ | |||
23925 23926 23927 23928 23929 23930 23931 | 22030 22031 22032 22033 22034 22035 22036 22037 22038 22039 22040 22041 22042 22043 22044 22045 22046 22047 22048 22049 22050 22051 22052 22053 22054 22055 22056 22057 22058 22059 22060 22061 22062 22063 22064 | - - + + + - - + + + | int cnt = 0; const int spinRate = 10000; zQuery = sqlite3_mprintf("SELECT * FROM \"%w\"", zTable); shell_check_oom(zQuery); rc = sqlite3_prepare_v2(p->db, zQuery, -1, &pQuery, 0); if( rc ){ |
︙ | |||
23978 23979 23980 23981 23982 23983 23984 | 22085 22086 22087 22088 22089 22090 22091 22092 22093 22094 22095 22096 22097 22098 22099 22100 22101 22102 22103 22104 22105 22106 22107 22108 22109 22110 22111 22112 22113 22114 22115 22116 22117 | - - + + - + | SQLITE_STATIC); break; } } } /* End for */ rc = sqlite3_step(pInsert); if( rc!=SQLITE_OK && rc!=SQLITE_ROW && rc!=SQLITE_DONE ){ |
︙ | |||
24033 24034 24035 24036 24037 24038 24039 | 22140 22141 22142 22143 22144 22145 22146 22147 22148 22149 22150 22151 22152 22153 22154 22155 22156 22157 22158 22159 22160 22161 22162 22163 22164 22165 22166 22167 22168 22169 22170 22171 22172 22173 22174 22175 22176 22177 22178 22179 22180 22181 22182 22183 22184 22185 22186 22187 22188 22189 22190 22191 22192 22193 22194 22195 22196 22197 22198 22199 22200 22201 22202 22203 22204 22205 22206 22207 22208 22209 22210 22211 22212 22213 22214 22215 22216 22217 22218 22219 22220 22221 22222 22223 22224 22225 22226 22227 22228 22229 22230 22231 22232 22233 22234 22235 22236 22237 22238 22239 | - - + + + - + - + - + - - + + + - + - + - + - + - + + - - - - - - - - - - - - | char *zErrMsg = 0; zQuery = sqlite3_mprintf("SELECT name, sql FROM sqlite_schema" " WHERE %s ORDER BY rowid ASC", zWhere); shell_check_oom(zQuery); rc = sqlite3_prepare_v2(p->db, zQuery, -1, &pQuery, 0); if( rc ){ |
︙ | |||
24155 24156 24157 24158 24159 24160 24161 | 22253 22254 22255 22256 22257 22258 22259 22260 22261 22262 22263 22264 22265 22266 22267 22268 22269 22270 22271 22272 22273 22274 22275 22276 22277 22278 22279 22280 22281 22282 | - + - - - - - | "open"; #else "xdg-open"; #endif char *zCmd; zCmd = sqlite3_mprintf("%s %s", zXdgOpenCmd, p->zTempFile); if( system(zCmd) ){ |
︙ | |||
24246 24247 24248 24249 24250 24251 24252 | 22339 22340 22341 22342 22343 22344 22345 22346 22347 22348 22349 22350 22351 22352 22353 22354 22355 22356 22357 22358 22359 22360 22361 22362 22363 22364 22365 22366 22367 22368 22369 22370 22371 22372 22373 22374 22375 22376 22377 22378 22379 22380 22381 22382 22383 22384 22385 22386 22387 22388 22389 22390 22391 22392 22393 22394 22395 22396 22397 22398 22399 22400 22401 22402 22403 22404 22405 22406 22407 22408 22409 22410 22411 22412 22413 22414 | - + - + - - - - + + + + - + - - - + + + - + - + - + - + | unsigned char aHdr[100]; open_db(p, 0); if( p->db==0 ) return 1; rc = sqlite3_prepare_v2(p->db, "SELECT data FROM sqlite_dbpage(?1) WHERE pgno=1", -1, &pStmt, 0); if( rc ){ |
︙ | |||
24542 24543 24544 24545 24546 24547 24548 24549 24550 24551 24552 24553 24554 24555 | 22635 22636 22637 22638 22639 22640 22641 22642 22643 22644 22645 22646 22647 22648 22649 | + | */ static int lintFkeyIndexes( ShellState *pState, /* Current shell tool state */ char **azArg, /* Array of arguments passed to dot command */ int nArg /* Number of entries in azArg[] */ ){ sqlite3 *db = pState->db; /* Database handle to query "main" db of */ FILE *out = pState->out; /* Stream to write non-error output to */ int bVerbose = 0; /* If -verbose is present */ int bGroupByParent = 0; /* If -groupbyparent is present */ int i; /* To iterate through azArg[] */ const char *zIndent = ""; /* How much to indent CREATE INDEX by */ int rc; /* Return code */ sqlite3_stmt *pSql = 0; /* Compiled version of SQL statement below */ |
︙ | |||
24623 24624 24625 24626 24627 24628 24629 | 22717 22718 22719 22720 22721 22722 22723 22724 22725 22726 22727 22728 22729 22730 22731 22732 22733 | - + + + | bVerbose = 1; } else if( n>1 && sqlite3_strnicmp("-groupbyparent", azArg[i], n)==0 ){ bGroupByParent = 1; zIndent = " "; } else{ |
︙ | |||
24667 24668 24669 24670 24671 24672 24673 | 22763 22764 22765 22766 22767 22768 22769 22770 22771 22772 22773 22774 22775 22776 22777 22778 22779 22780 22781 22782 22783 22784 22785 22786 22787 22788 22789 22790 22791 22792 22793 22794 22795 22796 22797 22798 22799 22800 22801 22802 22803 22804 22805 22806 22807 22808 22809 22810 22811 22812 22813 22814 22815 22816 22817 22818 22819 22820 22821 22822 22823 22824 22825 22826 22827 22828 22829 22830 22831 22832 22833 22834 22835 22836 22837 22838 22839 22840 22841 22842 22843 22844 22845 22846 22847 22848 22849 22850 22851 22852 22853 22854 22855 22856 22857 22858 22859 22860 22861 22862 | - + - + - + - - + + - + - + - + - - - + + + + + - + + + + + + - + | res = zPlan!=0 && ( 0==sqlite3_strglob(zGlob, zPlan) || 0==sqlite3_strglob(zGlobIPK, zPlan)); } rc = sqlite3_finalize(pExplain); if( rc!=SQLITE_OK ) break; if( res<0 ){ |
︙ | |||
24768 24769 24770 24771 24772 24773 24774 | 22871 22872 22873 22874 22875 22876 22877 22878 22879 22880 22881 22882 22883 22884 22885 22886 22887 22888 22889 22890 22891 22892 22893 22894 22895 22896 22897 22898 22899 22900 22901 22902 22903 22904 22905 22906 22907 22908 22909 22910 22911 22912 22913 22914 22915 22916 22917 22918 22919 22920 22921 | - - + + + + + - + - + - - + | }else{ shellPrepare(db, pRc, z, ppStmt); sqlite3_free(z); } } } |
︙ | |||
24852 24853 24854 24855 24856 24857 24858 | 22957 22958 22959 22960 22961 22962 22963 22964 22965 22966 22967 22968 22969 22970 22971 22972 22973 22974 22975 | - + - + - + | */ static int arErrorMsg(ArCommand *pAr, const char *zFmt, ...){ va_list ap; char *z; va_start(ap, zFmt); z = sqlite3_vmprintf(zFmt, ap); va_end(ap); |
︙ | |||
24956 24957 24958 24959 24960 24961 24962 | 23061 23062 23063 23064 23065 23066 23067 23068 23069 23070 23071 23072 23073 23074 23075 | - + | { "dryrun", 'n', AR_SWITCH_DRYRUN, 0 }, { "glob", 'g', AR_SWITCH_GLOB, 0 }, }; int nSwitch = sizeof(aSwitch) / sizeof(struct ArSwitch); struct ArSwitch *pEnd = &aSwitch[nSwitch]; if( nArg<=1 ){ |
︙ | |||
25062 25063 25064 25065 25066 25067 25068 | 23167 23168 23169 23170 23171 23172 23173 23174 23175 23176 23177 23178 23179 23180 23181 | - + | } if( arProcessSwitch(pAr, pMatch->eSwitch, zArg) ) return SQLITE_ERROR; } } } } if( pAr->eCmd==0 ){ |
︙ | |||
25105 25106 25107 25108 25109 25110 25111 | 23210 23211 23212 23213 23214 23215 23216 23217 23218 23219 23220 23221 23222 23223 23224 | - + | z[n] = '\0'; sqlite3_bind_text(pTest, j, z, -1, SQLITE_STATIC); if( SQLITE_ROW==sqlite3_step(pTest) ){ bOk = 1; } shellReset(&rc, pTest); if( rc==SQLITE_OK && bOk==0 ){ |
︙ | |||
25172 25173 25174 25175 25176 25177 25178 | 23277 23278 23279 23280 23281 23282 23283 23284 23285 23286 23287 23288 23289 23290 23291 23292 23293 23294 23295 23296 23297 23298 23299 23300 23301 23302 23303 23304 23305 23306 23307 23308 23309 23310 23311 23312 23313 23314 23315 23316 23317 23318 23319 23320 23321 23322 23323 23324 23325 23326 23327 23328 23329 23330 23331 23332 23333 23334 23335 23336 23337 23338 23339 23340 23341 23342 23343 | - + - - - + + + + + + - + + - + - + | rc = arCheckEntries(pAr); arWhereClause(&rc, pAr, &zWhere); shellPreparePrintf(pAr->db, &rc, &pSql, zSql, azCols[pAr->bVerbose], pAr->zSrcTable, zWhere); if( pAr->bDryRun ){ |
︙ | |||
25284 25285 25286 25287 25288 25289 25290 | 23393 23394 23395 23396 23397 23398 23399 23400 23401 23402 23403 23404 23405 23406 23407 23408 23409 23410 23411 23412 23413 23414 23415 23416 23417 23418 23419 23420 23421 23422 23423 23424 23425 23426 23427 23428 23429 23430 23431 23432 23433 23434 23435 23436 23437 | - + - + - + - + | ** only for the directories. This is because the timestamps for ** extracted directories must be reset after they are populated (as ** populating them changes the timestamp). */ for(i=0; i<2; i++){ j = sqlite3_bind_parameter_index(pSql, "$dirOnly"); sqlite3_bind_int(pSql, j, i); if( pAr->bDryRun ){ |
︙ | |||
25489 25490 25491 25492 25493 25494 25495 | 23598 23599 23600 23601 23602 23603 23604 23605 23606 23607 23608 23609 23610 23611 23612 23613 23614 23615 23616 23617 23618 23619 23620 23621 23622 23623 23624 23625 23626 23627 23628 23629 23630 23631 23632 23633 | - - + + + - + + - + | || cmd.eCmd==AR_CMD_REMOVE || cmd.eCmd==AR_CMD_UPDATE ){ flags = SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE; }else{ flags = SQLITE_OPEN_READONLY; } cmd.db = 0; if( cmd.bDryRun ){ |
︙ | |||
25566 25567 25568 25569 25570 25571 25572 | 23677 23678 23679 23680 23681 23682 23683 23684 23685 23686 23687 23688 23689 23690 23691 | - + | /* ** This function is used as a callback by the recover extension. Simply ** print the supplied SQL statement to stdout. */ static int recoverSqlCb(void *pCtx, const char *zSql){ ShellState *pState = (ShellState*)pCtx; |
︙ | |||
25609 25610 25611 25612 25613 25614 25615 | 23720 23721 23722 23723 23724 23725 23726 23727 23728 23729 23730 23731 23732 23733 23734 23735 23736 23737 23738 23739 23740 23741 23742 23743 23744 23745 23746 23747 23748 23749 23750 23751 23752 23753 23754 23755 23756 23757 23758 23759 23760 23761 23762 23763 23764 23765 23766 23767 23768 23769 23770 23771 23772 23773 23774 23775 23776 23777 23778 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | i++; zLAF = azArg[i]; }else if( n<=10 && memcmp("-no-rowids", z, n)==0 ){ bRowids = 0; } else{ |
︙ | |||
25827 25828 25829 25830 25831 25832 25833 | 23904 23905 23906 23907 23908 23909 23910 23911 23912 23913 23914 23915 23916 23917 | - | if( *pDb==0 ){ if( SQLITE_OK!=sqlite3_open(zCOL_DB, pDb) ) return 0; #ifdef SHELL_COLFIX_DB if(*zCOL_DB!=':') sqlite3_exec(*pDb,"drop table if exists ColNames;" "drop view if exists RepeatedNames;",0,0,0); #endif |
︙ | |||
25888 25889 25890 25891 25892 25893 25894 | 23964 23965 23966 23967 23968 23969 23970 23971 23972 23973 23974 23975 23976 23977 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | sqlite3_finalize(pStmt); sqlite3_close(*pDb); *pDb = 0; return zColsSpec; } } |
︙ | |||
25997 25998 25999 26000 26001 26002 26003 | 24017 24018 24019 24020 24021 24022 24023 24024 24025 24026 24027 24028 24029 24030 24031 | - + | n = strlen30(azArg[0]); c = azArg[0][0]; clearTempFile(p); #ifndef SQLITE_OMIT_AUTHORIZATION if( c=='a' && cli_strncmp(azArg[0], "auth", n)==0 ){ if( nArg!=2 ){ |
︙ | |||
26044 26045 26046 26047 26048 26049 26050 | 24064 24065 24066 24067 24068 24069 24070 24071 24072 24073 24074 24075 24076 24077 24078 24079 24080 24081 24082 24083 24084 24085 24086 24087 24088 24089 24090 24091 24092 24093 24094 24095 24096 24097 24098 24099 24100 24101 24102 24103 24104 24105 24106 24107 24108 24109 24110 24111 24112 24113 24114 24115 24116 24117 24118 24119 24120 24121 24122 24123 24124 24125 24126 24127 24128 24129 24130 24131 24132 24133 24134 24135 24136 24137 24138 24139 24140 24141 24142 24143 24144 24145 24146 | - + - + - + - + - + - + - + - - + + + | if( cli_strcmp(z, "-append")==0 ){ zVfs = "apndvfs"; }else if( cli_strcmp(z, "-async")==0 ){ bAsync = 1; }else { |
︙ | |||
26135 26136 26137 26138 26139 26140 26141 | 24156 24157 24158 24159 24160 24161 24162 24163 24164 24165 24166 24167 24168 24169 24170 24171 24172 24173 24174 24175 24176 24177 24178 24179 24180 24181 24182 24183 24184 24185 24186 24187 24188 24189 24190 24191 24192 24193 24194 24195 24196 24197 24198 24199 24200 24201 24202 24203 24204 24205 24206 24207 24208 24209 24210 24211 24212 24213 24214 24215 24216 24217 24218 24219 24220 24221 24222 24223 24224 24225 24226 24227 24228 24229 24230 24231 24232 24233 24234 24235 24236 24237 24238 24239 24240 24241 24242 24243 24244 24245 24246 24247 24248 24249 24250 24251 24252 24253 24254 24255 24256 24257 24258 24259 24260 24261 24262 24263 24264 24265 24266 24267 24268 24269 24270 24271 24272 24273 24274 24275 24276 24277 24278 24279 24280 24281 24282 24283 24284 24285 24286 24287 24288 24289 24290 24291 24292 24293 24294 24295 24296 24297 24298 24299 24300 24301 24302 24303 24304 24305 24306 24307 24308 24309 24310 24311 24312 24313 24314 24315 24316 24317 24318 24319 24320 | - + - + - + - + + - - + + - + - + - + - + - + - + - + - + - + - - - + + + + + | wchar_t *z = sqlite3_win32_utf8_to_unicode(azArg[1]); rc = !SetCurrentDirectoryW(z); sqlite3_free(z); #else rc = chdir(azArg[1]); #endif if( rc ){ |
︙ | |||
26322 26323 26324 26325 26326 26327 26328 | 24346 24347 24348 24349 24350 24351 24352 24353 24354 24355 24356 24357 24358 24359 24360 24361 24362 24363 24364 24365 | - + - - + + | open_db(p, 0); for(ii=0; ii<ArraySize(aDbConfig); ii++){ if( nArg>1 && cli_strcmp(azArg[1], aDbConfig[ii].zName)!=0 ) continue; if( nArg>=3 ){ sqlite3_db_config(p->db, aDbConfig[ii].op, booleanValue(azArg[2]), 0); } sqlite3_db_config(p->db, aDbConfig[ii].op, -1, &v); |
︙ | |||
26357 26358 26359 26360 26361 26362 26363 | 24381 24382 24383 24384 24385 24386 24387 24388 24389 24390 24391 24392 24393 24394 24395 24396 24397 24398 24399 24400 24401 24402 24403 24404 24405 24406 24407 24408 24409 24410 24411 24412 24413 24414 | - - + + - + | |SHFLG_DumpDataOnly|SHFLG_DumpNoSys); for(i=1; i<nArg; i++){ if( azArg[i][0]=='-' ){ const char *z = azArg[i]+1; if( z[0]=='-' ) z++; if( cli_strcmp(z,"preserve-rowids")==0 ){ #ifdef SQLITE_OMIT_VIRTUALTABLE |
︙ | |||
26406 26407 26408 26409 26410 26411 26412 | 24430 24431 24432 24433 24434 24435 24436 24437 24438 24439 24440 24441 24442 24443 24444 24445 24446 24447 24448 24449 | - - - + + | zLike = zExpr; } } } open_db(p, 0); |
︙ | |||
26435 26436 26437 26438 26439 26440 26441 | 24458 24459 24460 24461 24462 24463 24464 24465 24466 24467 24468 24469 24470 24471 24472 24473 24474 24475 24476 24477 24478 24479 24480 24481 24482 24483 24484 24485 24486 24487 24488 24489 24490 24491 24492 24493 24494 24495 24496 | - + - - + - + - + | ); run_schema_dump_query(p,zSql); sqlite3_free(zSql); if( (p->shellFlgs & SHFLG_DumpDataOnly)==0 ){ zSql = sqlite3_mprintf( "SELECT sql FROM sqlite_schema AS o " "WHERE (%s) AND sql NOT NULL" |
︙ | |||
26491 26492 26493 26494 26495 26496 26497 | 24513 24514 24515 24516 24517 24518 24519 24520 24521 24522 24523 24524 24525 24526 24527 | - + | sqlite3_exec(p->db, "SELECT name FROM sqlite_schema LIMIT 1", 0, 0, 0); sqlite3_exec(p->db, "PRAGMA vdbe_trace=ON;", 0, 0, 0); #endif }else{ p->autoEQP = (u8)booleanValue(azArg[1]); } }else{ |
︙ | |||
26530 26531 26532 26533 26534 26535 26536 | 24552 24553 24554 24555 24556 24557 24558 24559 24560 24561 24562 24563 24564 24565 24566 24567 24568 | + - - + + | p->autoExplain = 1; } }else #ifndef SQLITE_OMIT_VIRTUALTABLE if( c=='e' && cli_strncmp(azArg[0], "expert", n)==0 ){ if( p->bSafeMode ){ raw_printf(stderr, |
︙ | |||
26587 26588 26589 26590 26591 26592 26593 | 24610 24611 24612 24613 24614 24615 24616 24617 24618 24619 24620 24621 24622 24623 24624 24625 24626 24627 24628 24629 24630 24631 24632 24633 24634 24635 24636 24637 24638 24639 24640 24641 24642 24643 24644 24645 24646 24647 24648 24649 24650 24651 | - + + - + - - + + - - + + | if( zCmd[0]=='-' && zCmd[1] ){ zCmd++; if( zCmd[0]=='-' && zCmd[1] ) zCmd++; } /* --help lists all file-controls */ if( cli_strcmp(zCmd,"help")==0 ){ |
︙ | |||
26656 26657 26658 26659 26660 26661 26662 | 24680 24681 24682 24683 24684 24685 24686 24687 24688 24689 24690 24691 24692 24693 24694 24695 24696 24697 24698 24699 24700 24701 24702 24703 24704 24705 24706 24707 24708 24709 24710 24711 24712 24713 24714 24715 24716 24717 24718 24719 24720 24721 24722 24723 24724 24725 24726 24727 24728 24729 24730 24731 24732 24733 24734 24735 | - + - + - + - + - + | break; } case SQLITE_FCNTL_TEMPFILENAME: { char *z = 0; if( nArg!=2 ) break; sqlite3_file_control(p->db, zSchema, filectrl, &z); if( z ){ |
︙ | |||
26723 26724 26725 26726 26727 26728 26729 | 24747 24748 24749 24750 24751 24752 24753 24754 24755 24756 24757 24758 24759 24760 24761 24762 24763 24764 24765 24766 24767 24768 24769 24770 24771 24772 24773 24774 24775 24776 24777 24778 24779 24780 24781 24782 24783 24784 24785 24786 24787 24788 24789 24790 24791 24792 24793 24794 24795 24796 24797 24798 24799 24800 24801 24802 24803 24804 24805 24806 | - + - + - + - + - + - + - + - + + | -1, &pStmt, 0); if( rc==SQLITE_OK ){ doStats = sqlite3_step(pStmt)==SQLITE_ROW; sqlite3_finalize(pStmt); } } if( doStats==0 ){ |
︙ | |||
26792 26793 26794 26795 26796 26797 26798 | 24817 24818 24819 24820 24821 24822 24823 24824 24825 24826 24827 24828 24829 24830 24831 24832 24833 24834 24835 24836 24837 24838 24839 24840 24841 24842 24843 24844 24845 24846 24847 24848 24849 24850 24851 24852 24853 24854 24855 24856 24857 24858 24859 24860 24861 24862 24863 24864 24865 24866 24867 24868 24869 24870 24871 24872 24873 24874 24875 24876 24877 24878 24879 24880 24881 24882 24883 24884 24885 24886 24887 24888 24889 24890 24891 24892 24893 24894 24895 24896 24897 24898 24899 24900 24901 24902 24903 24904 24905 24906 24907 24908 24909 24910 24911 24912 24913 24914 24915 24916 24917 24918 24919 24920 24921 24922 24923 24924 24925 24926 24927 24928 24929 24930 24931 24932 24933 24934 24935 24936 24937 24938 24939 24940 24941 24942 24943 24944 24945 24946 24947 24948 24949 24950 24951 24952 24953 24954 24955 24956 24957 24958 24959 24960 24961 24962 24963 24964 24965 24966 24967 24968 24969 24970 24971 24972 24973 24974 24975 24976 24977 24978 24979 24980 24981 24982 24983 24984 24985 24986 24987 24988 24989 24990 24991 24992 24993 24994 24995 24996 24997 24998 24999 25000 25001 25002 25003 25004 25005 25006 25007 25008 25009 25010 25011 25012 25013 25014 25015 25016 25017 25018 25019 25020 25021 25022 25023 25024 25025 25026 25027 25028 25029 | - + - + - - + + + - + + - + + - + - - + + - + - + - - - + + + - - + + + + + + + + + + + + + + - + - - + - - - - + + + - + + + + + - - - - - + - - - - + + - - - - - - - - - - - - - + + + + - - + + - - - - + + - - - - - + - - - - - + - - - + - + - - + + | if( z[0]=='-' && z[1]=='-' ) z++; if( z[0]!='-' ){ if( zFile==0 ){ zFile = z; }else if( zTable==0 ){ zTable = z; }else{ |
︙ | |||
27028 27029 27030 27031 27032 27033 27034 | 25043 25044 25045 25046 25047 25048 25049 25050 25051 25052 25053 25054 25055 25056 25057 25058 25059 25060 25061 25062 25063 25064 25065 25066 25067 25068 25069 25070 25071 25072 25073 25074 25075 25076 25077 25078 25079 25080 25081 25082 25083 25084 25085 25086 25087 25088 25089 25090 25091 25092 25093 25094 25095 25096 25097 25098 25099 25100 25101 25102 25103 25104 25105 25106 25107 25108 25109 25110 25111 25112 25113 25114 | - - - + + + - - + + + - - + + + - - + + - - + + - - + + | ** (If there are too few fields, it's not valid CSV anyway.) */ if( z==0 && (xRead==csv_read_one_field) && i==nCol-1 && i>0 ){ z = ""; } sqlite3_bind_text(pStmt, i+1, z, -1, SQLITE_TRANSIENT); if( i<nCol-1 && sCtx.cTerm!=sCtx.cColSep ){ |
︙ | |||
27142 27143 27144 27145 27146 27147 27148 | 25159 25160 25161 25162 25163 25164 25165 25166 25167 25168 25169 25170 25171 25172 25173 25174 25175 25176 25177 25178 25179 25180 25181 25182 25183 25184 25185 25186 25187 25188 25189 25190 25191 25192 25193 25194 25195 25196 25197 25198 25199 25200 25201 25202 25203 25204 25205 25206 25207 25208 25209 25210 25211 25212 25213 25214 25215 25216 25217 | - + - + - - - + + + + + - + - - - - - - - - - - - - - - - - + | zCollist = sqlite3_mprintf("\"%w\"", zCol); }else{ zCollist = sqlite3_mprintf("%z,\"%w\"", zCollist, zCol); } } sqlite3_finalize(pStmt); if( i==0 || tnum==0 ){ |
︙ | |||
27231 27232 27233 27234 27235 27236 27237 | 25235 25236 25237 25238 25239 25240 25241 25242 25243 25244 25245 25246 25247 25248 25249 25250 25251 25252 25253 25254 25255 25256 25257 25258 25259 25260 25261 25262 25263 25264 25265 25266 25267 25268 25269 25270 25271 25272 25273 25274 25275 25276 25277 25278 25279 25280 25281 25282 25283 25284 25285 25286 25287 25288 25289 25290 25291 25292 25293 25294 25295 25296 25297 25298 25299 25300 25301 25302 25303 25304 25305 25306 25307 25308 25309 25310 25311 25312 25313 25314 25315 25316 25317 25318 25319 25320 25321 25322 25323 25324 25325 | - - + + - + - + - - - + + + - - + + - + - + - + - - + + | { "trigger_depth", SQLITE_LIMIT_TRIGGER_DEPTH }, { "worker_threads", SQLITE_LIMIT_WORKER_THREADS }, }; int i, n2; open_db(p, 0); if( nArg==1 ){ for(i=0; i<ArraySize(aLimit); i++){ |
︙ | |||
27346 27347 27348 27349 27350 27351 27352 | 25350 25351 25352 25353 25354 25355 25356 25357 25358 25359 25360 25361 25362 25363 25364 25365 25366 25367 25368 25369 25370 25371 25372 25373 25374 25375 25376 25377 25378 25379 25380 25381 25382 25383 25384 25385 25386 25387 25388 25389 25390 | - - - - - - - + + + + + + + - + + + - - - - + + + + - + | ColModeOpts cmo = ColModeOpts_default_qbox; zMode = "box"; cmOpts = cmo; } }else if( zTabname==0 ){ zTabname = z; }else if( z[0]=='-' ){ |
︙ | |||
27429 27430 27431 27432 27433 27434 27435 | 25435 25436 25437 25438 25439 25440 25441 25442 25443 25444 25445 25446 25447 25448 25449 25450 25451 25452 25453 25454 25455 25456 25457 25458 25459 25460 25461 25462 25463 25464 25465 25466 25467 25468 25469 25470 25471 25472 25473 25474 25475 25476 25477 25478 25479 | - - - + + + - + - - + + - + | }else if( cli_strncmp(zMode,"count",n2)==0 ){ p->mode = MODE_Count; }else if( cli_strncmp(zMode,"off",n2)==0 ){ p->mode = MODE_Off; }else if( cli_strncmp(zMode,"json",n2)==0 ){ p->mode = MODE_Json; }else{ |
︙ | |||
27498 27499 27500 27501 27502 27503 27504 | 25504 25505 25506 25507 25508 25509 25510 25511 25512 25513 25514 25515 25516 25517 25518 25519 25520 25521 25522 | - + - + | openMode = SHELL_OPEN_HEXDB; }else if( optionMatch(z, "maxsize") && iName+1<nArg ){ p->szMax = integerValue(azArg[++iName]); #endif /* SQLITE_OMIT_DESERIALIZE */ }else #endif /* !SQLITE_SHELL_FIDDLE */ if( z[0]=='-' ){ |
︙ | |||
27544 27545 27546 27547 27548 27549 27550 | 25550 25551 25552 25553 25554 25555 25556 25557 25558 25559 25560 25561 25562 25563 25564 | - + | shell_check_oom(zNewFilename); }else{ zNewFilename = 0; } p->pAuxDb->zDbFilename = zNewFilename; open_db(p, OPEN_DB_KEEPALIVE); if( p->db==0 ){ |
︙ | |||
27568 27569 27570 27571 27572 27573 27574 | 25574 25575 25576 25577 25578 25579 25580 25581 25582 25583 25584 25585 25586 25587 25588 25589 25590 25591 25592 25593 25594 25595 25596 25597 25598 25599 25600 25601 25602 25603 25604 25605 25606 25607 25608 25609 25610 25611 25612 25613 25614 25615 25616 25617 25618 25619 25620 25621 25622 25623 25624 25625 25626 | - - + + + + + - + - + + - + + | || (c=='e' && n==5 && cli_strcmp(azArg[0],"excel")==0) ){ char *zFile = 0; int bTxtMode = 0; int i; int eMode = 0; int bOnce = 0; /* 0: .output, 1: .once, 2: .excel */ |
︙ | |||
27640 27641 27642 27643 27644 27645 27646 | 25651 25652 25653 25654 25655 25656 25657 25658 25659 25660 25661 25662 25663 25664 25665 25666 25667 25668 25669 25670 25671 25672 25673 25674 25675 25676 25677 25678 25679 25680 25681 25682 25683 25684 25685 25686 25687 25688 | - + - + - - - + + + + - - + - - + + - + + - - + | sqlite3_free(zFile); zFile = sqlite3_mprintf("%s", p->zTempFile); } #endif /* SQLITE_NOHAVE_SYSTEM */ shell_check_oom(zFile); if( zFile[0]=='|' ){ #ifdef SQLITE_OMIT_POPEN |
︙ | |||
27704 27705 27706 27707 27708 27709 27710 | 25715 25716 25717 25718 25719 25720 25721 25722 25723 25724 25725 25726 25727 25728 25729 25730 | - - + + | sqlite3_finalize(pStmt); pStmt = 0; if( len ){ rx = sqlite3_prepare_v2(p->db, "SELECT key, quote(value) " "FROM temp.sqlite_parameters;", -1, &pStmt, 0); while( rx==SQLITE_OK && sqlite3_step(pStmt)==SQLITE_ROW ){ |
︙ | |||
27749 27750 27751 27752 27753 27754 27755 | 25760 25761 25762 25763 25764 25765 25766 25767 25768 25769 25770 25771 25772 25773 25774 | - + | zSql = sqlite3_mprintf( "REPLACE INTO temp.sqlite_parameters(key,value)" "VALUES(%Q,%Q);", zKey, zValue); shell_check_oom(zSql); rx = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, 0); sqlite3_free(zSql); if( rx!=SQLITE_OK ){ |
︙ | |||
27778 27779 27780 27781 27782 27783 27784 | 25789 25790 25791 25792 25793 25794 25795 25796 25797 25798 25799 25800 25801 25802 25803 25804 25805 25806 | - - + + - + | parameter_syntax_error: showHelp(p->out, "parameter"); }else if( c=='p' && n>=3 && cli_strncmp(azArg[0], "print", n)==0 ){ int i; for(i=1; i<nArg; i++){ |
︙ | |||
27810 27811 27812 27813 27814 27815 27816 | 25821 25822 25823 25824 25825 25826 25827 25828 25829 25830 25831 25832 25833 25834 25835 25836 25837 25838 25839 25840 25841 25842 25843 | - + - + | } if( cli_strcmp(z,"once")==0 ){ p->flgProgress |= SHELL_PROGRESS_ONCE; continue; } if( cli_strcmp(z,"limit")==0 ){ if( i+1>=nArg ){ |
︙ | |||
27851 27852 27853 27854 27855 27856 27857 | 25862 25863 25864 25865 25866 25867 25868 25869 25870 25871 25872 25873 25874 25875 25876 25877 25878 25879 25880 25881 25882 25883 25884 25885 25886 25887 25888 25889 25890 25891 25892 25893 25894 25895 25896 | - + - + - + - + | #ifndef SQLITE_SHELL_FIDDLE if( c=='r' && n>=3 && cli_strncmp(azArg[0], "read", n)==0 ){ FILE *inSaved = p->in; int savedLineno = p->lineno; failIfSafeMode(p, "cannot run .read in safe mode"); if( nArg!=2 ){ |
︙ | |||
27898 27899 27900 27901 27902 27903 27904 | 25909 25910 25911 25912 25913 25914 25915 25916 25917 25918 25919 25920 25921 25922 25923 25924 25925 25926 25927 25928 25929 25930 25931 25932 25933 25934 25935 25936 25937 25938 25939 25940 25941 25942 25943 25944 25945 25946 25947 25948 25949 25950 25951 25952 25953 25954 25955 25956 25957 25958 25959 25960 25961 25962 25963 25964 25965 25966 25967 25968 25969 25970 25971 25972 25973 25974 25975 25976 25977 25978 25979 | - + - + - + - + - + - - + + - - - - - + | if( nArg==2 ){ zSrcFile = azArg[1]; zDb = "main"; }else if( nArg==3 ){ zSrcFile = azArg[2]; zDb = azArg[1]; }else{ |
︙ | |||
27987 27988 27989 27990 27991 27992 27993 | 25994 25995 25996 25997 25998 25999 26000 26001 26002 26003 26004 26005 26006 26007 26008 26009 26010 26011 26012 26013 26014 26015 | - + + - + | if( optionMatch(azArg[ii],"indent") ){ data.cMode = data.mode = MODE_Pretty; }else if( optionMatch(azArg[ii],"debug") ){ bDebug = 1; }else if( optionMatch(azArg[ii],"nosys") ){ bNoSystemTabs = 1; }else if( azArg[ii][0]=='-' ){ |
︙ | |||
28026 28027 28028 28029 28030 28031 28032 | 26034 26035 26036 26037 26038 26039 26040 26041 26042 26043 26044 26045 26046 26047 26048 | - + | } } if( zDiv ){ sqlite3_stmt *pStmt = 0; rc = sqlite3_prepare_v2(p->db, "SELECT name FROM pragma_database_list", -1, &pStmt, 0); if( rc ){ |
︙ | |||
28088 28089 28090 28091 28092 28093 28094 | 26096 26097 26098 26099 26100 26101 26102 26103 26104 26105 26106 26107 26108 26109 26110 26111 26112 26113 26114 26115 26116 26117 26118 26119 26120 26121 | - + - + - + | } if( bNoSystemTabs ){ appendText(&sSelect, "name NOT LIKE 'sqlite_%%' AND ", 0); } appendText(&sSelect, "sql IS NOT NULL" " ORDER BY snum, rowid", 0); if( bDebug ){ |
︙ | |||
28145 28146 28147 28148 28149 28150 28151 | 26153 26154 26155 26156 26157 26158 26159 26160 26161 26162 26163 26164 26165 26166 26167 26168 26169 26170 26171 26172 26173 26174 26175 26176 26177 26178 26179 26180 26181 26182 26183 26184 26185 26186 26187 26188 26189 26190 26191 26192 26193 26194 26195 26196 26197 26198 26199 26200 26201 26202 26203 26204 26205 26206 26207 | - + - + - - + + - + - + + | ** Invoke the sqlite3session_attach() interface to attach a particular ** table so that it is never filtered. */ if( cli_strcmp(azCmd[0],"attach")==0 ){ if( nCmd!=2 ) goto session_syntax_error; if( pSession->p==0 ){ session_not_open: |
︙ | |||
28211 28212 28213 28214 28215 28216 28217 | 26220 26221 26222 26223 26224 26225 26226 26227 26228 26229 26230 26231 26232 26233 26234 26235 26236 26237 26238 26239 26240 26241 26242 26243 26244 26245 26246 26247 26248 26249 26250 26251 26252 26253 26254 26255 26256 26257 26258 26259 26260 26261 26262 26263 26264 26265 26266 26267 26268 26269 26270 26271 26272 26273 26274 26275 26276 26277 26278 26279 26280 26281 26282 26283 26284 26285 26286 26287 26288 26289 26290 26291 26292 26293 26294 26295 26296 26297 26298 26299 26300 26301 26302 26303 26304 26305 26306 26307 26308 26309 26310 26311 26312 26313 26314 26315 26316 26317 26318 26319 26320 26321 26322 26323 | - + + - + + + + - + + - + + - + - + + - + - + | */ if( cli_strcmp(azCmd[0], "enable")==0 ){ int ii; if( nCmd>2 ) goto session_syntax_error; ii = nCmd==1 ? -1 : booleanValue(azCmd[1]); if( pAuxDb->nSession ){ ii = sqlite3session_enable(pSession->p, ii); |
︙ | |||
28317 28318 28319 28320 28321 28322 28323 | 26333 26334 26335 26336 26337 26338 26339 26340 26341 26342 26343 26344 26345 26346 26347 26348 26349 26350 26351 26352 26353 26354 26355 26356 | - + - + | /* Undocumented commands for internal testing. Subject to change ** without notice. */ if( c=='s' && n>=10 && cli_strncmp(azArg[0], "selftest-", 9)==0 ){ if( cli_strncmp(azArg[0]+9, "boolean", n-9)==0 ){ int i, v; for(i=1; i<nArg; i++){ v = booleanValue(azArg[i]); |
︙ | |||
28353 28354 28355 28356 28357 28358 28359 | 26369 26370 26371 26372 26373 26374 26375 26376 26377 26378 26379 26380 26381 26382 26383 26384 26385 | - - + + + | if( cli_strcmp(z,"-init")==0 ){ bIsInit = 1; }else if( cli_strcmp(z,"-v")==0 ){ bVerbose++; }else { |
︙ | |||
28383 28384 28385 28386 28387 28388 28389 | 26400 26401 26402 26403 26404 26405 26406 26407 26408 26409 26410 26411 26412 26413 26414 26415 26416 26417 26418 26419 26420 26421 26422 26423 26424 26425 26426 26427 26428 26429 26430 26431 26432 26433 26434 26435 26436 26437 26438 26439 26440 26441 26442 26443 26444 26445 26446 26447 26448 26449 26450 26451 26452 26453 26454 26455 26456 26457 26458 26459 26460 26461 26462 26463 26464 26465 26466 26467 26468 26469 26470 26471 | - + - + - + - + - + - - + + - - - + + + + - + - + | }else{ rc = sqlite3_prepare_v2(p->db, "VALUES(0,'memo','Missing SELFTEST table - default checks only','')," " (1,'run','PRAGMA integrity_check','ok')", -1, &pStmt, 0); } if( rc ){ |
︙ | |||
28482 28483 28484 28485 28486 28487 28488 | 26500 26501 26502 26503 26504 26505 26506 26507 26508 26509 26510 26511 26512 26513 26514 26515 26516 26517 26518 26519 26520 26521 | - + + - + | ){ iSize = atoi(&z[5]); }else if( cli_strcmp(z,"debug")==0 ){ bDebug = 1; }else { |
︙ | |||
28560 28561 28562 28563 28564 28565 28566 | 26579 26580 26581 26582 26583 26584 26585 26586 26587 26588 26589 26590 26591 26592 26593 | - + | " FROM [sha3sum$query]", sSql.z, iSize); } shell_check_oom(zSql); freeText(&sQuery); freeText(&sSql); if( bDebug ){ |
︙ | |||
28590 28591 28592 28593 28594 28595 28596 | 26609 26610 26611 26612 26613 26614 26615 26616 26617 26618 26619 26620 26621 26622 26623 26624 26625 26626 26627 26628 26629 26630 26631 26632 26633 26634 26635 26636 26637 26638 26639 26640 26641 26642 26643 26644 26645 26646 26647 26648 26649 26650 26651 26652 26653 26654 26655 26656 26657 26658 26659 26660 26661 26662 26663 26664 26665 26666 26667 26668 26669 26670 26671 26672 26673 26674 26675 26676 26677 26678 26679 26680 26681 26682 26683 26684 26685 26686 26687 26688 26689 26690 26691 26692 26693 26694 26695 26696 26697 26698 26699 26700 26701 26702 26703 26704 26705 26706 26707 26708 26709 26710 26711 26712 26713 26714 26715 26716 26717 26718 26719 26720 26721 26722 26723 26724 26725 26726 26727 26728 26729 26730 26731 26732 26733 26734 26735 26736 26737 26738 26739 26740 26741 26742 26743 26744 26745 26746 26747 26748 26749 26750 | - + - + + - - + + - + - + - - - + - + - - - - - - + + + + + + + - - - - + + + + - + - - - - - - - - - - - + + + + + + + + + + + - - + + - + - - - + + + - + | " from (select 'SELECT COUNT(*) AS bad_text_count\n" "FROM '||tname||' WHERE '\n" "||group_concat('CAST(CAST('||cname||' AS BLOB) AS TEXT)<>'||cname\n" "|| ' AND typeof('||cname||')=''text'' ',\n" "' OR ') as query, tname from tabcols group by tname)" , zRevText); shell_check_oom(zRevText); |
︙ | |||
28743 28744 28745 28746 28747 28748 28749 | 26762 26763 26764 26765 26766 26767 26768 26769 26770 26771 26772 26773 26774 26775 26776 | - + | return shellDatabaseError(p->db); } if( nArg>2 && c=='i' ){ /* It is an historical accident that the .indexes command shows an error ** when called with the wrong number of arguments whereas the .tables ** command does not. */ |
︙ | |||
28819 28820 28821 28822 28823 28824 28825 | 26838 26839 26840 26841 26842 26843 26844 26845 26846 26847 26848 26849 26850 26851 26852 26853 26854 26855 26856 26857 26858 26859 26860 26861 26862 26863 26864 26865 26866 26867 26868 26869 | + - + - + - + | } nPrintCol = 80/(maxlen+2); if( nPrintCol<1 ) nPrintCol = 1; nPrintRow = (nRow + nPrintCol - 1)/nPrintCol; for(i=0; i<nPrintRow; i++){ for(j=i; j<nRow; j+=nPrintRow){ char *zSp = j<nPrintRow ? "" : " "; utf8_printf(p->out, "%s%-*s", zSp, maxlen, |
︙ | |||
28859 28860 28861 28862 28863 28864 28865 | 26879 26880 26881 26882 26883 26884 26885 26886 26887 26888 26889 26890 26891 26892 26893 26894 26895 26896 26897 26898 26899 26900 26901 26902 26903 26904 26905 26906 26907 26908 26909 26910 26911 26912 26913 26914 26915 26916 26917 26918 26919 26920 26921 26922 26923 26924 26925 26926 26927 26928 26929 26930 26931 26932 26933 26934 26935 26936 26937 26938 26939 26940 26941 26942 26943 26944 26945 26946 26947 26948 26949 26950 26951 26952 26953 26954 26955 26956 26957 26958 26959 | - + - - + - + - - + + - - + + - - + + | } aCtrl[] = { {"always", SQLITE_TESTCTRL_ALWAYS, 1, "BOOLEAN" }, {"assert", SQLITE_TESTCTRL_ASSERT, 1, "BOOLEAN" }, /*{"benign_malloc_hooks",SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS,1, "" },*/ /*{"bitvec_test", SQLITE_TESTCTRL_BITVEC_TEST, 1, "" },*/ {"byteorder", SQLITE_TESTCTRL_BYTEORDER, 0, "" }, {"extra_schema_checks",SQLITE_TESTCTRL_EXTRA_SCHEMA_CHECKS,0,"BOOLEAN" }, |
︙ | |||
28966 28967 28968 28969 28970 28971 28972 | 26985 26986 26987 26988 26989 26990 26991 26992 26993 26994 26995 26996 26997 26998 26999 | - + | /* sqlite3_test_control(int, int, sqlite3*) */ case SQLITE_TESTCTRL_PRNG_SEED: if( nArg==3 || nArg==4 ){ int ii = (int)integerValue(azArg[2]); sqlite3 *db; if( ii==0 && cli_strcmp(azArg[2],"random")==0 ){ sqlite3_randomness(sizeof(ii),&ii); |
︙ | |||
29034 29035 29036 29037 29038 29039 29040 | 27053 27054 27055 27056 27057 27058 27059 27060 27061 27062 27063 27064 27065 27066 27067 | - + | isOk = 3; } break; case SQLITE_TESTCTRL_SEEK_COUNT: { u64 x = 0; rc2 = sqlite3_test_control(testctrl, p->db, &x); |
︙ | |||
29065 29066 29067 29068 29069 29070 29071 | 27084 27085 27086 27087 27088 27089 27090 27091 27092 27093 27094 27095 27096 27097 27098 27099 27100 27101 27102 27103 27104 27105 27106 27107 27108 27109 27110 27111 27112 27113 27114 27115 27116 27117 27118 27119 27120 27121 27122 27123 27124 27125 27126 27127 27128 27129 27130 27131 27132 27133 27134 27135 27136 27137 27138 27139 27140 27141 | - - + + - + - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + | isOk = 1; }else if( nArg==2 ){ int id = 1; while(1){ int val = 0; rc2 = sqlite3_test_control(testctrl, -id, &val); if( rc2!=SQLITE_OK ) break; |
︙ | |||
29213 29214 29215 29216 29217 29218 29219 | 27164 27165 27166 27167 27168 27169 27170 27171 27172 27173 27174 27175 27176 27177 27178 | - + | else if( optionMatch(z, "stmt") ){ mType |= SQLITE_TRACE_STMT; } else if( optionMatch(z, "close") ){ mType |= SQLITE_TRACE_CLOSE; } else { |
︙ | |||
29237 29238 29239 29240 29241 29242 29243 | 27188 27189 27190 27191 27192 27193 27194 27195 27196 27197 27198 27199 27200 27201 27202 | - + | #if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_VIRTUALTABLE) if( c=='u' && cli_strncmp(azArg[0], "unmodule", n)==0 ){ int ii; int lenOpt; char *zOpt; if( nArg<2 ){ |
︙ | |||
29259 29260 29261 29262 29263 29264 29265 | 27210 27211 27212 27213 27214 27215 27216 27217 27218 27219 27220 27221 27222 27223 27224 27225 27226 27227 27228 27229 27230 27231 27232 27233 27234 27235 27236 27237 27238 27239 27240 27241 27242 27243 27244 27245 27246 27247 27248 27249 27250 27251 27252 27253 27254 27255 27256 27257 27258 27259 27260 27261 27262 27263 27264 27265 27266 27267 27268 27269 27270 27271 27272 27273 27274 27275 27276 27277 27278 27279 27280 27281 27282 27283 27284 27285 27286 27287 27288 27289 27290 27291 27292 27293 27294 27295 27296 27297 27298 27299 27300 27301 27302 27303 27304 27305 27306 27307 27308 27309 27310 27311 27312 27313 27314 27315 27316 27317 27318 27319 27320 27321 27322 27323 27324 27325 27326 27327 27328 27329 27330 27331 27332 27333 27334 27335 27336 27337 27338 27339 27340 27341 27342 | - + - + - + - + - + - + - + - + - + - + - - + + - + - - - + + + - + - + - - - - + + + + - - - - - + + + + + - + - + | } }else #endif #if SQLITE_USER_AUTHENTICATION if( c=='u' && cli_strncmp(azArg[0], "user", n)==0 ){ if( nArg<2 ){ |
︙ | |||
29401 29402 29403 29404 29405 29406 29407 | 27352 27353 27354 27355 27356 27357 27358 27359 27360 27361 27362 27363 27364 27365 27366 27367 | - - + + | if( p->nWidth ) p->actualWidth = &p->colWidth[p->nWidth]; for(j=1; j<nArg; j++){ p->colWidth[j-1] = (int)integerValue(azArg[j]); } }else { |
︙ | |||
29556 29557 29558 29559 29560 29561 29562 | 27507 27508 27509 27510 27511 27512 27513 27514 27515 27516 27517 27518 27519 27520 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | zSql[nSql] = ';'; zSql[nSql+1] = 0; rc = sqlite3_complete(zSql); zSql[nSql] = 0; return rc; } |
︙ | |||
29674 29675 29676 29677 29678 29679 29680 | 27543 27544 27545 27546 27547 27548 27549 27550 27551 27552 27553 27554 27555 27556 27557 27558 27559 27560 27561 27562 27563 27564 27565 27566 27567 27568 27569 27570 27571 27572 | - + - + - - - + | } if( in!=0 || !stdin_is_interactive ){ sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%s near line %d:", zErrorType, startline); }else{ sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%s:", zErrorType); } |
︙ | |||
29749 29750 29751 29752 29753 29754 29755 | 27616 27617 27618 27619 27620 27621 27622 27623 27624 27625 27626 27627 27628 27629 27630 27631 27632 27633 27634 27635 27636 27637 27638 27639 27640 27641 27642 | - - + + - + | int rc; /* Error code */ int errCnt = 0; /* Number of errors seen */ i64 startline = 0; /* Line number for start of current input */ QuickScanState qss = QSS_Start; /* Accumulated line status (so far) */ if( p->inputNesting==MAX_INPUT_NESTING ){ /* This will be more informative in a later version. */ |
︙ | |||
29971 29972 29973 29974 29975 29976 29977 | 27838 27839 27840 27841 27842 27843 27844 27845 27846 27847 27848 27849 27850 27851 27852 27853 27854 27855 27856 27857 27858 27859 27860 27861 27862 27863 27864 27865 27866 27867 27868 | - - + + - + - + | if( sqliterc == NULL ){ sqliterc = find_xdg_config(); } if( sqliterc == NULL ){ home_dir = find_home_dir(0); if( home_dir==0 ){ |
︙ | |||
30037 30038 30039 30040 30041 30042 30043 30044 30045 | 27904 27905 27906 27907 27908 27909 27910 27911 27912 27913 27914 27915 27916 27917 27918 27919 27920 27921 27922 27923 27924 27925 27926 27927 27928 27929 27930 27931 27932 27933 27934 27935 27936 27937 27938 27939 27940 27941 27942 27943 27944 27945 27946 27947 27948 27949 27950 27951 27952 27953 27954 27955 27956 27957 27958 27959 27960 27961 27962 27963 27964 27965 27966 27967 27968 27969 | + + + - + + + + - - - + + + - + - + - + - - + + | #endif " -memtrace trace all memory allocations and deallocations\n" " -mmap N default mmap size set to N\n" #ifdef SQLITE_ENABLE_MULTIPLEX " -multiplex enable the multiplexor VFS\n" #endif " -newline SEP set output row separator. Default: '\\n'\n" #if SHELL_WIN_UTF8_OPT " -no-utf8 do not try to set up UTF-8 output (for legacy)\n" #endif " -nofollow refuse to open symbolic links to database files\n" " -nonce STRING set the safe-mode escape nonce\n" |
︙ | |||
30111 30112 30113 30114 30115 30116 30117 | 27984 27985 27986 27987 27988 27989 27990 27991 27992 27993 27994 27995 27996 27997 27998 27999 28000 28001 28002 28003 28004 28005 28006 28007 28008 28009 28010 28011 28012 28013 28014 28015 28016 28017 28018 28019 28020 28021 28022 28023 28024 28025 28026 28027 28028 28029 28030 28031 28032 28033 | - + - + - + - + + - + | sqlite3_snprintf(sizeof(mainPrompt), mainPrompt,"sqlite> "); sqlite3_snprintf(sizeof(continuePrompt), continuePrompt," ...> "); } /* ** Output text to the console in a font that attracts extra attention. */ |
︙ | |||
30175 30176 30177 30178 30179 30180 30181 | 28049 28050 28051 28052 28053 28054 28055 28056 28057 28058 28059 28060 28061 28062 | - | sqlite3_int64 mem_main_enter = 0; #endif char *zErrMsg = 0; #ifdef SQLITE_SHELL_FIDDLE # define data shellState #else ShellState data; |
︙ | |||
30197 30198 30199 30200 30201 30202 30203 | 28070 28071 28072 28073 28074 28075 28076 28077 28078 28079 28080 28081 28082 28083 28084 28085 28086 28087 28088 28089 28090 28091 28092 28093 28094 28095 28096 28097 28098 28099 28100 28101 28102 28103 28104 28105 28106 28107 28108 28109 28110 28111 28112 28113 28114 28115 28116 28117 28118 28119 28120 28121 28122 28123 28124 28125 28126 28127 | - - - - + + + + + + + - - + + - + - - + + | setvbuf(stderr, 0, _IONBF, 0); /* Make sure stderr is unbuffered */ #ifdef SQLITE_SHELL_FIDDLE stdin_is_interactive = 0; stdout_is_console = 1; data.wasm.zDefaultDbName = "/fiddle.sqlite3"; #else |
︙ | |||
30322 30323 30324 30325 30326 30327 30328 30329 30330 30331 30332 30333 30334 30335 30336 | 28198 28199 28200 28201 28202 28203 28204 28205 28206 28207 28208 28209 28210 28211 28212 28213 28214 28215 28216 28217 28218 28219 28220 28221 28222 28223 28224 28225 28226 28227 28228 28229 28230 | + + + + + + + + - - + + - - + | || cli_strcmp(z,"-newline")==0 || cli_strcmp(z,"-cmd")==0 ){ (void)cmdline_option_value(argc, argv, ++i); }else if( cli_strcmp(z,"-init")==0 ){ zInitFile = cmdline_option_value(argc, argv, ++i); }else if( cli_strcmp(z,"-interactive")==0 ){ /* Need to check for interactive override here to so that it can ** affect console setup (for Windows only) and testing thereof. */ stdin_is_interactive = 1; }else if( cli_strcmp(z,"-batch")==0 ){ /* Need to check for batch mode here to so we can avoid printing ** informational messages (like from process_sqliterc) before ** we do the actual processing of arguments later in a second pass. */ stdin_is_interactive = 0; }else if( cli_strcmp(z,"-utf8")==0 ){ #if SHELL_WIN_UTF8_OPT /* Option accepted, but is ignored except for this diagnostic. */ if( mbcs_opted ) fprintf(stderr, "Cannot do UTF-8 at this console.\n"); #endif /* SHELL_WIN_UTF8_OPT */ }else if( cli_strcmp(z,"-no-utf8")==0 ){ |
︙ | |||
30468 30469 30470 30471 30472 30473 30474 | 28351 28352 28353 28354 28355 28356 28357 28358 28359 28360 28361 28362 28363 28364 28365 28366 28367 28368 28369 28370 28371 28372 28373 28374 28375 28376 28377 28378 28379 28380 28381 28382 28383 28384 | - + + + + + + + + + + - + | #endif if( zVfs ){ sqlite3_vfs *pVfs = sqlite3_vfs_find(zVfs); if( pVfs ){ sqlite3_vfs_register(pVfs, 1); }else{ |
︙ | |||
30595 30596 30597 30598 30599 30600 30601 | 28487 28488 28489 28490 28491 28492 28493 28494 28495 28496 28497 28498 28499 28500 28501 28502 28503 28504 28505 28506 28507 28508 28509 28510 28511 | - - + + - + - - - - - | ** prior to sending the SQL into SQLite. Useful for injecting ** crazy bytes in the middle of SQL statements for testing and debugging. */ ShellSetFlag(&data, SHFLG_Backslash); }else if( cli_strcmp(z,"-bail")==0 ){ /* No-op. The bail_on_error flag should already be set. */ }else if( cli_strcmp(z,"-version")==0 ){ |
︙ | |||
30657 30658 30659 30660 30661 30662 30663 | 28544 28545 28546 28547 28548 28549 28550 28551 28552 28553 28554 28555 28556 28557 28558 28559 28560 28561 28562 28563 28564 28565 28566 28567 28568 28569 28570 28571 28572 28573 28574 28575 28576 28577 28578 28579 28580 28581 28582 28583 28584 28585 28586 28587 28588 | - + - + - - + + - - + + | if( z[0]=='.' ){ rc = do_meta_command(z, &data); if( rc && bail_on_error ) return rc==2 ? 0 : rc; }else{ open_db(&data, 0); rc = shell_exec(&data, z, &zErrMsg); if( zErrMsg!=0 ){ |
︙ | |||
30711 30712 30713 30714 30715 30716 30717 | 28598 28599 28600 28601 28602 28603 28604 28605 28606 28607 28608 28609 28610 28611 28612 28613 28614 28615 28616 28617 28618 28619 28620 28621 28622 28623 28624 28625 28626 28627 28628 28629 28630 28631 28632 28633 28634 28635 28636 28637 28638 28639 28640 28641 28642 28643 28644 28645 28646 28647 | - + - + + - - - + + + - + + + + + - - - + + + + - + - - + + | } }else{ open_db(&data, 0); echo_group_input(&data, azCmd[i]); rc = shell_exec(&data, azCmd[i], &zErrMsg); if( zErrMsg || rc ){ if( zErrMsg!=0 ){ |
︙ | |||
30772 30773 30774 30775 30776 30777 30778 | 28665 28666 28667 28668 28669 28670 28671 28672 28673 28674 28675 28676 28677 28678 | - - - - - | data.in = stdin; rc = process_input(&data); } } #ifndef SQLITE_SHELL_FIDDLE /* In WASM mode we have to leave the db state in place so that ** client code can "push" SQL into it after this call returns. */ |
︙ | |||
30805 30806 30807 30808 30809 30810 30811 | 28693 28694 28695 28696 28697 28698 28699 28700 28701 28702 28703 28704 28705 28706 28707 28708 | - - + + | free(data.colWidth); free(data.zNonce); /* Clear the global data structure so that valgrind will detect memory ** leaks */ memset(&data, 0, sizeof(data)); #ifdef SQLITE_DEBUG if( sqlite3_memory_used()>mem_main_enter ){ |
︙ | |||
30843 30844 30845 30846 30847 30848 30849 | 28731 28732 28733 28734 28735 28736 28737 28738 28739 28740 28741 28742 28743 28744 28745 | - + | SQLITE_FCNTL_VFS_POINTER, &pVfs); } return pVfs; } /* Only for emcc experimentation purposes. */ sqlite3 * fiddle_db_arg(sqlite3 *arg){ |
︙ | |||
30869 30870 30871 30872 30873 30874 30875 | 28757 28758 28759 28760 28761 28762 28763 28764 28765 28766 28767 28768 28769 28770 28771 28772 28773 28774 28775 28776 | - + - - - - - - - - - - - - + + | return globalDb ? sqlite3_db_filename(globalDb, zDbName ? zDbName : "main") : NULL; } /* ** Completely wipes out the contents of the currently-opened database |
︙ |
Changes to extsrc/sqlite3.c.
more than 10,000 changes
Changes to extsrc/sqlite3.h.
︙ | |||
142 143 144 145 146 147 148 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - - - + + + | ** been edited in any way since it was last checked in, then the last ** four hexadecimal digits of the hash may be modified. ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ |
︙ | |||
416 417 418 419 420 421 422 | 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | - - | ** <ul> ** <li> The application must ensure that the 1st parameter to sqlite3_exec() ** is a valid and open [database connection]. ** <li> The application must not close the [database connection] specified by ** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. ** <li> The application must not modify the SQL statement text passed into ** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. |
︙ | |||
760 761 762 763 764 765 766 | 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 | - + - + | ** <li> [SQLITE_LOCK_SHARED], ** <li> [SQLITE_LOCK_RESERVED], ** <li> [SQLITE_LOCK_PENDING], or ** <li> [SQLITE_LOCK_EXCLUSIVE]. ** </ul> ** xLock() upgrades the database file lock. In other words, xLock() moves the ** database file lock in the direction NONE toward EXCLUSIVE. The argument to |
︙ | |||
2139 2140 2141 2142 2143 2144 2145 | 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 | - - - - - - - - - - - - - - - - | ** [sqlite3_int64] parameter which is the default maximum size for an in-memory ** database created using [sqlite3_deserialize()]. This default maximum ** size can be adjusted up or down for individual databases using the ** [SQLITE_FCNTL_SIZE_LIMIT] [sqlite3_file_control|file-control]. If this ** configuration setting is never used, then the default maximum is determined ** by the [SQLITE_MEMDB_DEFAULT_MAXSIZE] compile-time option. If that ** compile-time option is not set, then the default maximum is 1073741824. |
︙ | |||
2186 2187 2188 2189 2190 2191 2192 | 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 | - | #define SQLITE_CONFIG_WIN32_HEAPSIZE 23 /* int nByte */ #define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */ #define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */ #define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */ #define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */ #define SQLITE_CONFIG_SORTERREF_SIZE 28 /* int nByte */ #define SQLITE_CONFIG_MEMDB_MAXSIZE 29 /* sqlite3_int64 */ |
︙ | |||
3301 3302 3303 3304 3305 3306 3307 | 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 | - - + + | #define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */ #define SQLITE_FUNCTION 31 /* NULL Function Name */ #define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */ #define SQLITE_COPY 0 /* No longer used */ #define SQLITE_RECURSIVE 33 /* NULL NULL */ /* |
︙ | |||
3969 3970 3971 3972 3973 3974 3975 | 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 | - + - - - + + - | ** <li> sqlite3_extended_errcode() ** <li> sqlite3_errmsg() ** <li> sqlite3_errmsg16() ** <li> sqlite3_error_offset() ** </ul> ** ** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language |
︙ | |||
5590 5591 5592 5593 5594 5595 5596 | 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 | - + - - - - + + + + - - + - - - - - - - - - - - - - - | ** are innocuous. Developers are advised to avoid using the ** SQLITE_INNOCUOUS flag for application-defined functions unless the ** function has been carefully audited and found to be free of potentially ** security-adverse side-effects and information-leaks. ** </dd> ** ** [[SQLITE_SUBTYPE]] <dt>SQLITE_SUBTYPE</dt><dd> |
︙ | |||
5815 5816 5817 5818 5819 5820 5821 | 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 | - - - - - - | ** METHOD: sqlite3_value ** ** The sqlite3_value_subtype(V) function returns the subtype for ** an [application-defined SQL function] argument V. The subtype ** information can be used to pass a limited amount of context from ** one SQL function to another. Use the [sqlite3_result_subtype()] ** routine to set the subtype for the return value of an SQL function. |
︙ | |||
5951 5952 5953 5954 5955 5956 5957 | 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 | - + - - - - + - + - - - - - | ** SQLite is free to discard the auxiliary data at any time, including: <ul> ** <li> ^(when the corresponding function parameter changes)^, or ** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the ** SQL statement)^, or ** <li> ^(when sqlite3_set_auxdata() is invoked again on the same ** parameter)^, or ** <li> ^(during the original sqlite3_set_auxdata() call when a memory |
︙ | |||
6240 6241 6242 6243 6244 6245 6246 | 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 | - - - - - - - - - - - - - - | ** The sqlite3_result_subtype(C,T) function causes the subtype of ** the result from the [application-defined SQL function] with ** [sqlite3_context] C to be the value T. Only the lower 8 bits ** of the subtype T are preserved in current versions of SQLite; ** higher order bits are discarded. ** The number of subtype bytes preserved by SQLite might increase ** in future releases of SQLite. |
︙ | |||
8054 8055 8056 8057 8058 8059 8060 | 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 | - - - + + + - - | ** In such cases, the ** mutex must be exited an equal number of times before another thread ** can enter.)^ If the same thread tries to enter any mutex other ** than an SQLITE_MUTEX_RECURSIVE more than once, the behavior is undefined. ** ** ^(Some systems (for example, Windows 95) do not support the operation ** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try() |
︙ | |||
8317 8318 8319 8320 8321 8322 8323 | 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 | - | #define SQLITE_TESTCTRL_BITVEC_TEST 8 #define SQLITE_TESTCTRL_FAULT_INSTALL 9 #define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10 #define SQLITE_TESTCTRL_PENDING_BYTE 11 #define SQLITE_TESTCTRL_ASSERT 12 #define SQLITE_TESTCTRL_ALWAYS 13 #define SQLITE_TESTCTRL_RESERVE 14 /* NOT USED */ |
︙ | |||
12831 12832 12833 12834 12835 12836 12837 | 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 12807 12808 12809 12810 12811 | - - - - - + + - - - - + + - + - - + - - + + | ** an OOM condition or IO error), an appropriate SQLite error code is ** returned. ** ** This function may be quite inefficient if used with an FTS5 table ** created with the "columnsize=0" option. ** ** xColumnText: |
︙ | |||
12896 12897 12898 12899 12900 12901 12902 | 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 | - - - - | ** phrase iPhrase of the current query is included in $p. For each ** row visited, the callback function passed as the fourth argument ** is invoked. The context and API objects passed to the callback ** function may be used to access the properties of each matched row. ** Invoking Api.xUserData() returns a copy of the pointer passed as ** the third argument to pUserData. ** |
︙ | |||
13014 13015 13016 13017 13018 13019 13020 | 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | ** xPhraseFirstColumn() may also be obtained using xPhraseFirst/xPhraseNext ** (or xInst/xInstCount). The chief advantage of this API is that it is ** significantly more efficient than those alternatives when used with ** "detail=column" tables. ** ** xPhraseNextColumn() ** See xPhraseFirstColumn above. |
︙ | |||
13084 13085 13086 13087 13088 13089 13090 | 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 | - - - - - - - | void *(*xGetAuxdata)(Fts5Context*, int bClear); int (*xPhraseFirst)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*, int*); void (*xPhraseNext)(Fts5Context*, Fts5PhraseIter*, int *piCol, int *piOff); int (*xPhraseFirstColumn)(Fts5Context*, int iPhrase, Fts5PhraseIter*, int*); void (*xPhraseNextColumn)(Fts5Context*, Fts5PhraseIter*, int *piCol); |
︙ |
Changes to skins/ardoise/css.txt.
︙ | |||
614 615 616 617 618 619 620 | 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 | - + - - + + - + - + - + - + - - - + + + | ol, p, pre, table, ul { margin-bottom: 1.5rem } |
︙ | |||
682 683 684 685 686 687 688 | 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 | - + - + - + | } .artifact_content blockquote:first-of-type { padding: 1px 20px; margin: 0 0 20px; background: #000; border-radius: 5px } |
︙ | |||
731 732 733 734 735 736 737 | 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 | - + | .mainmenu li:hover { background-color: #ff8000; border-radius: 5px } .mainmenu li:hover a { color: #000 } |
︙ |
Changes to skins/ardoise/footer.txt.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - - - - - + + + + + - + - + |
|
Changes to skins/ardoise/header.txt.
| 1 2 3 4 5 6 7 8 | - + |
|
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + | html "<a class='rss' href='$home/timeline.rss'></a>" } </th1> <small> $<title></small></h1> </div> <!-- Main Menu --> |
Changes to skins/black_and_white/css.txt.
︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | - + - + - + - + - + | color: #333; font-size: 0.8em; font-weight: bold; white-space: nowrap; } /* The header across the top of the page */ |
︙ | |||
147 148 149 150 151 152 153 | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | - + | float: left; clear: left; color: #333; white-space: nowrap; } /* The footer at the very bottom of the page */ |
︙ |
Changes to skins/black_and_white/footer.txt.
| 1 2 3 | - + - + |
|
Changes to skins/black_and_white/header.txt.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - + - - - - - + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - |
|
Changes to skins/blitz/css.txt.
︙ | |||
753 754 755 756 757 758 759 | 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 | - + - + - + - + - + - + - + - + - + | box-sizing: border-box; } /* Header * Div displayed at the top of every page. ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */ |
︙ | |||
828 829 830 831 832 833 834 | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 | - + - + | color: #002060; } /* Footer * Displayed after the middle div and forms the page bottom. ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */ |
︙ | |||
869 870 871 872 873 874 875 | 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 | - + - + - + | .mainmenu li.active { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEQAACxEBf2RfkQAAAAd0SU1FB90FDxEXAZ2XRzAAAABJSURBVCjPY2CgBzhz5sx/QmoYiTXAxMSEkWRDsLkAl0GMpHoBm0EoAlu3bmUQFxcnGAboBjEhc4gxAJtLGUmJBVwuYiTXAGSDAIx5IBObnuVxAAAAAElFTkSuQmCC); background-repeat: no-repeat; background-position: center bottom; } .mainmenu li a, |
︙ |
Changes to skins/blitz/footer.txt.
1 2 | 1 2 3 4 5 6 7 8 9 10 | - + - + | </div> <!-- end div container --> </div> <!-- end div middle max-full-width --> |
Changes to skins/blitz/header.txt.
| 1 2 3 4 5 6 7 8 | - + |
|
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - + + + + + | html "<a class='rss' href='$home/timeline.rss'></a>" } </th1> <small> $<title></small></h1> </div> <!-- Main Menu --> |
Changes to skins/darkmode/css.txt.
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + - + - + - + - + - + - + | ** the area to show as blank. The purpose is to cause the ** title to be exactly centered. */ div.leftoftitle { visibility: hidden; } /* The header across the top of the page */ |
︙ | |||
170 171 172 173 174 175 176 | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - + | margin: .2em 0 .2em 0; float: left; clear: left; white-space: nowrap; } /* The footer at the very bottom of the page */ |
︙ |
Changes to skins/darkmode/footer.txt.
| 1 2 3 4 5 6 7 8 | - + - + |
|
Changes to skins/darkmode/header.txt.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + |
|
Changes to skins/default/README.md.
| 1 2 3 4 5 | - + - - - - + - - - - + + |
|
Changes to skins/default/css.txt.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + - + + + + - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + - + - + |
|
︙ | |||
141 142 143 144 145 146 147 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | - - + + + + + + - - - - - + + + + + + + + + | white-space: nowrap; } /* Main document area; elements common to most pages. */ .content { |
︙ | |||
179 180 181 182 183 184 185 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | - + - + - + - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - | hr { color: #eee; } /* Page footer */ |
︙ | |||
461 462 463 464 465 466 467 | 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | white-space: pre-wrap; } /* Timeline */ span.timelineDetail { |
Changes to skins/default/details.txt.
| 1 2 3 4 | - - |
|
Changes to skins/default/footer.txt.
| 1 2 3 4 5 | - + - + |
|
Changes to skins/default/header.txt.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + - |
|
Changes to skins/eagle/css.txt.
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | - + - + - + - + - + | color: white; font-size: 0.8em; font-weight: bold; white-space: nowrap; } /* The header across the top of the page */ |
︙ | |||
129 130 131 132 133 134 135 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - + | margin: .2em 0 .2em 0; float: left; clear: left; white-space: nowrap; } /* The footer at the very bottom of the page */ |
︙ |
Changes to skins/eagle/footer.txt.
| 1 2 3 4 5 6 7 8 | - + |
|
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 | - + | </th1> This page was generated in about <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by <a href="$fossilUrl/">Fossil</a> version $release_version $tclVersion <a href="$fossilUrl/index.html/info/$version">$manifest_version</a> <a href="$fossilUrl/index.html/timeline?c=$fossilDate&y=ci">$manifest_date</a> |
Changes to skins/eagle/header.txt.
| 1 2 3 4 5 6 7 8 | - + |
|
︙ | |||
74 75 76 77 78 79 80 | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - - - - - + + + + + + + + - - + | <div class="status"><nobr><th1> if {[info exists login]} { puts "Logged in as $login" } else { puts "Not logged in" } </th1></nobr><small><div id="clock"></div></small></div> |
Deleted skins/etienne/README.md.
| - - - - - - - - - - - - - - |
|
Deleted skins/etienne/css.txt.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Deleted skins/etienne/details.txt.
| - - - - |
|
Deleted skins/etienne/footer.txt.
| - - - - - |
|
Deleted skins/etienne/header.txt.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to skins/khaki/css.txt.
︙ | |||
39 40 41 42 43 44 45 | 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + - + - + - + - - + + - - - - + + + + | padding: 5px 5px 0 0; font-size: 0.8em; font-weight: bold; white-space: nowrap; } /* The header across the top of the page */ |
︙ | |||
131 132 133 134 135 136 137 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + - - - - + + + + | margin: .2em 0 .2em 0; float: left; clear: left; white-space: nowrap; } /* The footer at the very bottom of the page */ |
︙ |
Changes to skins/khaki/footer.txt.
| 1 2 3 | - + - + |
|
Changes to skins/khaki/header.txt.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - + - - - - - - - + + + + + + + - - + - - - - - - - - - + + + + + + + + - - + |
|
Changes to skins/original/css.txt.
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - + - + - + - + | color: #558195; font-size: 0.8em; font-weight: bold; white-space: nowrap; } /* The header across the top of the page */ |
︙ | |||
113 114 115 116 117 118 119 | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | - + - - - - + + + + | margin: .2em 0 .2em 0; float: left; clear: left; white-space: nowrap; } /* The footer at the very bottom of the page */ |
︙ |
Changes to skins/original/footer.txt.
| 1 2 3 4 5 6 7 8 | - + |
|
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 | - + | </th1> This page was generated in about <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by <a href="$fossilUrl/">Fossil</a> version $release_version $tclVersion <a href="$fossilUrl/index.html/info/$version">$manifest_version</a> <a href="$fossilUrl/index.html/timeline?c=$fossilDate&y=ci">$manifest_date</a> |
Changes to skins/original/header.txt.
| 1 2 3 4 5 6 7 8 | - + |
|
︙ | |||
68 69 70 71 72 73 74 | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - + + + + + + + + + + + - | <div class="status"><nobr><th1> if {[info exists login]} { puts "Logged in as $login" } else { puts "Not logged in" } </th1></nobr><small><div id="clock"></div></small></div> |
Changes to skins/plain_gray/css.txt.
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + - + | vertical-align: bottom; color: #404040; font-weight: bold; white-space: nowrap; } /* The header across the top of the page */ |
︙ | |||
65 66 67 68 69 70 71 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - - + + - + | div.submenu, div.sectionmenu { padding: 3px 10px 3px 0px; font-size: 0.9em; text-align: center; background-color: #606060; color: white; } |
︙ | |||
129 130 131 132 133 134 135 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - + | margin: .2em 0 .2em 0; float: left; clear: left; white-space: nowrap; } /* The footer at the very bottom of the page */ |
︙ |
Changes to skins/plain_gray/footer.txt.
| 1 2 3 | - + - + |
|
Changes to skins/plain_gray/header.txt.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + - - - - - - - - - - - + + + + + + + + + + + - - + |
|
Changes to skins/xekri/css.txt.
︙ | |||
59 60 61 62 63 64 65 66 67 68 69 70 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | + + + + + + + + + - + - + | h2 { font-size: 1.5rem; } h3 { font-size: 1.25rem; } span[style^=background-color] { color: #000; } td[style^=background-color] { color: #000; } /************************************** * Main Area */ |
︙ | |||
135 136 137 138 139 140 141 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | - + - + - + - + | } /************************************** * Main Area: Global Menu */ |
︙ | |||
212 213 214 215 216 217 218 | 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | - + - + - + - + - + - + | stroke: white; } /************************************** * Main Area: Footer */ |
︙ | |||
562 563 564 565 566 567 568 | 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | - + | margin: 1.2rem auto 0.75rem auto; padding: 0.2rem; text-align: center; } div.sectionmenu { border-radius: 0 0 3rem 3rem; |
︙ | |||
1073 1074 1075 1076 1077 1078 1079 | 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 | - + - + | /* format for report configuration errors */ blockquote.reportError { color: #f00; font-weight: bold; } /* format for artifact lines, no longer shunned */ p.noMoreShun { |
︙ | |||
1153 1154 1155 1156 1157 1158 1159 | 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 | - - + + | } body.branch .brlist > table > tbody > tr:hover:not(.selected), body.branch .brlist > table > tbody > tr.selected { background-color: #444; } |
Changes to skins/xekri/footer.txt.
1 | 1 2 3 4 5 6 7 8 9 | - - - - - - - - + + + + + + + + | </div> |
Changes to skins/xekri/header.txt.
| 1 2 3 4 5 6 7 8 | - + |
|
︙ | |||
67 68 69 70 71 72 73 | 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + - - - - - - + + + + + - - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - | } </th1> <a href="$logourl"> <img src="$logo_image_url" border="0" alt="$project_name"> </a> </div> <div class="title">$<title></div> |
Changes to src/ajax.c.
︙ | |||
390 391 392 393 394 395 396 | 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 | - + - - - - - - - - - - + | */ void ajax_route_dispatcher(void){ const char * zName = P("name"); AjaxRoute routeName = {0,0,0,0}; const AjaxRoute * pRoute = 0; const AjaxRoute routes[] = { /* Keep these sorted by zName (for bsearch()) */ |
Changes to src/alerts.c.
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - | @ -- to the USER entry. @ -- @ -- The ssub field is a string where each character indicates a particular @ -- type of event to subscribe to. Choices: @ -- a - Announcements @ -- c - Check-ins @ -- f - Forum posts |
︙ | |||
85 86 87 88 89 90 91 | 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + | @ -- @ CREATE TABLE repository.pending_alert( @ eventid TEXT PRIMARY KEY, -- Object that changed @ sentSep BOOLEAN DEFAULT false, -- individual alert sent @ sentDigest BOOLEAN DEFAULT false, -- digest alert sent @ sentMod BOOLEAN DEFAULT false -- pending moderation alert sent @ ) WITHOUT ROWID; |
︙ | |||
874 875 876 877 878 879 880 | 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 | - + - + | */ void email_header_to(Blob *pMsg, int *pnTo, char ***pazTo){ int nTo = 0; char **azTo = 0; Blob v; char *z, *zAddr; int i; |
︙ | |||
914 915 916 917 918 919 920 | 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 | - + - + | ** From: ** Date: ** Message-Id: ** Content-Type: ** Content-Transfer-Encoding: ** MIME-Version: ** Sender: |
︙ | |||
1044 1045 1046 1047 1048 1049 1050 | 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 | - + | ** the basename for hyperlinks included in email alert text. ** Omit the trailing "/". If the repository is not intended to be ** a long-running server and will not be sending email notifications, ** then leave this setting blank. */ /* ** SETTING: email-admin width=40 |
︙ | |||
1079 1080 1081 1082 1083 1084 1085 | 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 | - + - + | ** a subscription is less than email-renew-cutoff, then now new emails ** are sent to the subscriber. ** ** email-renew-warning is the time (in days since 1970-01-01) when the ** last batch of "your subscription is about to expire" emails were ** sent out. ** |
︙ | |||
1132 1133 1134 1135 1136 1137 1138 | 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 | - + | ** SMTP server configured as a Mail Submission Agent listening on the ** designated host and port and all times. */ /* ** COMMAND: alerts* |
︙ | |||
1458 1459 1460 1461 1462 1463 1464 | 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 | - + | /* If we reach this point, all is well */ return 1; } /* ** Text of email message sent in order to confirm a subscription. */ |
︙ | |||
1741 1742 1743 1744 1745 1746 1747 | 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 | - + - + - - - - - + + + - - - - - - - - | } /* ** Either shutdown or completely delete a subscription entry given ** by the hex value zName. Then paint a webpage that explains that ** the entry has been removed. */ |
︙ | |||
1803 1804 1805 1806 1807 1808 1809 | 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 | - + | ** email and clicks on the link in the email. When a ** compilete subscriberCode is seen on the name= query parameter, ** that constitutes verification of the email address. ** ** * The sid= query parameter contains an integer subscriberId. ** This only works for the administrator. It allows the ** administrator to edit any subscription. |
︙ | |||
1933 1934 1935 1936 1937 1938 1939 | 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 | - + - + | } if( P("delete")!=0 && cgi_csrf_safe(2) ){ if( !PB("dodelete") ){ eErr = 9; zErr = mprintf("Select this checkbox and press \"Unsubscribe\" again to" " unsubscribe"); }else{ |
︙ | |||
2098 2099 2100 2101 2102 2103 2104 | 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 | - - - - | @ Ticket changes</label><br> } if( g.perm.RdWiki ){ @ <label><input type="checkbox" name="sw" %s(sw?"checked":"")>\ @ Wiki</label> } @ </td></tr> |
︙ | |||
2196 2197 2198 2199 2200 2201 2202 | 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 | - + - - - - - + - + - + - - | style_finish_page(); } /* This is the message that gets sent to describe how to change ** or modify a subscription */ |
︙ | |||
2332 2333 2334 2335 2336 2337 2338 | 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 | - + | }else{ @ <p>An email has been sent to "%h(zEAddr)" that explains how to @ unsubscribe and/or modify your subscription settings</p> } alert_sender_free(pSender); style_finish_page(); return; |
︙ | |||
2561 2562 2563 2564 2565 2566 2567 | 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 | - + | } /* ** Compute a string that is appropriate for the EmailEvent.zPriors field ** for a particular forum post. ** ** This string is an encode list of sender names and rids for all ancestors |
︙ | |||
2741 2742 2743 2744 2745 2746 2747 | 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 | - + | zUuid = db_column_text(&q, 1); zTitle = db_column_text(&q, 3); if( p->needMod ){ blob_appendf(&p->hdr, "Subject: %s Pending Moderation: %s\r\n", zSub, zTitle); }else{ blob_appendf(&p->hdr, "Subject: %s %s\r\n", zSub, zTitle); |
︙ | |||
3108 3109 3110 3111 3112 3113 3114 | 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 | - + - - - + + | " ssub," /* 2 */ " fullcap(user.cap)," /* 3 */ " suname" /* 4 */ " FROM subscriber LEFT JOIN user ON (login=suname)" " WHERE sverified" " AND NOT sdonotcall" " AND sdigest IS %s" |
︙ | |||
3168 3169 3170 3171 3172 3173 3174 | 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 | - - - - | if( blob_size(&p->hdr)>0 ){ /* This alert should be sent as a separate email */ Blob fhdr, fbody; blob_init(&fhdr, 0, 0); blob_appendf(&fhdr, "To: <%s>\r\n", zEmail); blob_append(&fhdr, blob_buffer(&p->hdr), blob_size(&p->hdr)); blob_init(&fbody, blob_buffer(&p->txt), blob_size(&p->txt)); |
︙ | |||
3198 3199 3200 3201 3202 3203 3204 | 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 | - + | } nHit++; blob_append(&body, "\n", 1); blob_append(&body, blob_buffer(&p->txt), blob_size(&p->txt)); } } if( nHit==0 ) continue; |
︙ | |||
3221 3222 3223 3224 3225 3226 3227 | 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 | - + | ** alerts that have been completely sent. */ db_multi_exec("DELETE FROM pending_alert WHERE sentDigest AND sentSep;"); /* Send renewal messages to subscribers whose subscriptions are about ** to expire. Only do this if: ** |
︙ | |||
3250 3251 3252 3253 3254 3255 3256 | 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 | - + | " AND length(sdigest)>0", iNewWarn, iOldWarn ); while( db_step(&q)==SQLITE_ROW ){ Blob hdr, body; blob_init(&hdr, 0, 0); blob_init(&body, 0, 0); |
︙ | |||
3320 3321 3322 3323 3324 3325 3326 | 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 | - + | style_set_current_feature("alerts"); if( zAdminEmail==0 || zAdminEmail[0]==0 ){ style_header("Outbound Email Disabled"); @ <p>Outbound email is disabled on this repository style_finish_page(); return; } |
︙ |
Changes to src/allrepo.c.
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + - - - + | */ static void collect_argument(Blob *pExtra,const char *zArg,const char *zShort){ const char *z = find_option(zArg, zShort, 0); if( z!=0 ){ blob_appendf(pExtra, " %s", z); } } |
︙ | |||
106 107 108 109 110 111 112 | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | - - + + | ** --verbose and --share-links options are supported. ** ** push Run a "push" on all repositories. Only the --verbose ** option is supported. ** ** rebuild Rebuild on all repositories. The command line options ** supported by the rebuild command itself, if any are |
︙ | |||
132 133 134 135 136 137 138 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + | ** ** ui Run the "ui" command on all repositories. Like "server" ** but bind to the loopback TCP address only, enable ** the --localauth option and automatically launch a ** web-browser ** ** whatis Run the "whatis" command on all repositories. Only |
︙ | |||
210 211 212 213 214 215 216 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | - - + + - - + + | if( file_isdir(zDest, ExtFILE)!=1 ){ fossil_fatal("argument to \"fossil all backup\" must be a directory"); } blob_appendf(&extra, " %$", zDest); }else if( fossil_strcmp(zCmd, "clean")==0 ){ zCmd = "clean --chdir"; collect_argument(&extra, "allckouts",0); |
︙ | |||
247 248 249 250 251 252 253 | 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + - + | }else if( fossil_strcmp(zCmd, "extras")==0 ){ if( showFile ){ zCmd = "extras --chdir"; }else{ zCmd = "extras --header --chdir"; } collect_argument(&extra, "abs-paths",0); |
︙ | |||
276 277 278 279 280 281 282 | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | - - + - + | collect_argument(&extra, "verbose","v"); }else if( fossil_strcmp(zCmd, "pull")==0 ){ zCmd = "pull -autourl -R"; collect_argument(&extra, "verbose","v"); collect_argument(&extra, "share-links",0); }else if( fossil_strcmp(zCmd, "rebuild")==0 ){ zCmd = "rebuild"; |
︙ | |||
415 416 417 418 419 420 421 | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | - - | }else if( fossil_strcmp(zCmd, "cache")==0 ){ zCmd = "cache -R"; showLabel = 1; collect_argv(&extra, 3); }else if( fossil_strcmp(zCmd, "whatis")==0 ){ zCmd = "whatis -q -R"; quiet = 1; |
︙ |
Changes to src/attach.c.
︙ | |||
748 749 750 751 752 753 754 | 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 | - + - | if( (pWiki = manifest_get(rid, CFTYPE_EVENT, 0))!=0 ){ zBody = pWiki->zWiki; } if( zBody==0 ){ fossil_fatal("technote [%s] not found",zETime); } zTarget = db_text(0, |
︙ |
Changes to src/backlink.c.
︙ | |||
247 248 249 250 251 252 253 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - + | void *opaque ){ Backlink *p = (Backlink*)opaque; char *zTarget = blob_buffer(target); int nTarget = blob_size(target); backlink_create(p, zTarget, nTarget); |
︙ |
Changes to src/backoffice.c.
︙ | |||
313 314 315 316 317 318 319 | 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | - + - + | ** we cannot prove that the process is dead, return true. */ static int backofficeProcessExists(sqlite3_uint64 pid){ #if defined(_WIN32) return pid>0 && backofficeWin32ProcessExists((DWORD)pid)!=0; #else return pid>0 && kill((pid_t)pid, 0)==0; |
︙ | |||
673 674 675 676 677 678 679 | 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 | - + | ** This might be done by a cron job or similar to make sure backoffice ** processing happens periodically. Or, the --poll option can be used ** to run this command as a daemon that will periodically invoke backoffice ** on a collection of repositories. ** ** If only a single repository is named and --poll is omitted, then the ** backoffice work is done in-process. But if there are multiple repositories |
︙ |
Changes to src/bag.c.
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + | free(p->a); bag_init(p); } /* ** The hash function */ |
︙ |
Changes to src/blob.c.
︙ | |||
1549 1550 1551 1552 1553 1554 1555 | 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 | - - - - - - - - - + + + + + + + + + - + | z[--j] = z[i]; } } } /* ** ASCII (for reference): |
︙ | |||
1663 1664 1665 1666 1667 1668 1669 | 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 | - + | blob_token(pBlob, &bad); fossil_fatal("the [%s] argument to the \"%s\" command contains " "an illegal UTF-8 character", zIn, blob_str(&bad)); } i += x-2; } |
︙ | |||
1698 1699 1700 1701 1702 1703 1704 | 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 | - - | blob_append_char(pBlob, '\\'); }else if( zIn[0]=='/' ){ blob_append_char(pBlob, '.'); } for(i=0; (c = (unsigned char)zIn[i])!=0; i++){ blob_append_char(pBlob, (char)c); if( c=='"' ) blob_append_char(pBlob, '"'); |
︙ | |||
1795 1796 1797 1798 1799 1800 1801 | 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 | - + | } #ifdef _WIN32 if( zBuf[0]=='-' && zArg[0]=='.' && zArg[1]=='\\' ) zArg += 2; #else if( zBuf[0]=='-' && zArg[0]=='.' && zArg[1]=='/' ) zArg += 2; #endif if( strcmp(zBuf, zArg)!=0 ){ |
︙ |
Changes to src/branch.c.
︙ | |||
304 305 306 307 308 309 310 | 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | - - + + + | const char *zUser ){ Blob sql; blob_init(&sql, 0, 0); brlist_create_temp_table(); /* Ignore nLimitMRU if no chronological sort requested. */ if( (brFlags & BRL_ORDERBY_MTIME)==0 ) nLimitMRU = 0; |
︙ | |||
338 339 340 341 342 343 344 | 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | - + - | blob_append_sql(&sql, "SELECT name, isprivate, mtime, mergeto FROM tmp_brlist WHERE 1" ); break; } case BRL_OPEN_ONLY: { blob_append_sql(&sql, |
︙ | |||
771 772 773 774 775 776 777 | 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 | - + | int isPriv = db_column_int(&q, 1)==1; const char *zMergeTo = db_column_text(&q, 2); int isCur = zCurrent!=0 && fossil_strcmp(zCurrent,zBr)==0; const char *zUsers = db_column_text(&q, 3); if( (brFlags & BRL_MERGED) && fossil_strcmp(zCurrent,zMergeTo)!=0 ){ continue; } |
︙ | |||
804 805 806 807 808 809 810 | 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 | - + - + - + - + | blob_reset(&txt); } db_finalize(&q); }else if( strncmp(zCmd,"new",n)==0 ){ branch_new(); }else if( strncmp(zCmd,"close",5)==0 ){ if(g.argc<4){ |
︙ | |||
885 886 887 888 889 890 891 | 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 | - + | } } if( zBgClr && zBgClr[0] && show_colors ){ @ <tr style="background-color:%s(zBgClr)"> }else{ @ <tr> } |
︙ |
Changes to src/browse.c.
︙ | |||
356 357 358 359 360 361 362 | 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 | - + | /* Generate a multi-column table listing the contents of zD[] ** directory. */ mxLen = db_int(12, "SELECT max(length(x)) FROM localfiles /*scan*/"); if( mxLen<12 ) mxLen = 12; mxLen += (mxLen+9)/10; |
︙ | |||
469 470 471 472 473 474 475 | 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | - + - | FileTreeNode *pSibling; /* Next element in the same subdirectory */ FileTreeNode *pChild; /* List of child nodes */ FileTreeNode *pLastChild; /* Last child on the pChild list */ char *zName; /* Name of this entry. The "tail" */ char *zFullName; /* Full pathname of this entry */ char *zUuid; /* Artifact hash of this file. May be NULL. */ double mtime; /* Modification time for this entry */ |
︙ | |||
507 508 509 510 511 512 513 | 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 | - + | const char *zUuid, /* Hash of the file. Might be NULL. */ double mtime, /* Modification time for this entry */ int size, /* Size for this entry */ int sortOrder /* 0: filename, 1: mtime, 2: size */ ){ int i; FileTreeNode *pParent; /* Parent (directory) of the next node to insert */ |
︙ |
Changes to src/builtin.c.
︙ | |||
519 520 521 522 523 524 525 | 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | - + - + | builtinVtab_cursor *pCur = (builtinVtab_cursor*)cur; return pCur->iRowid>count(aBuiltinFiles); } /* ** This method is called to "rewind" the builtinVtab_cursor object back ** to the first row of output. This method is always called at least |
︙ | |||
548 549 550 551 552 553 554 | 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | - + | ){ pIdxInfo->estimatedCost = (double)count(aBuiltinFiles); pIdxInfo->estimatedRows = count(aBuiltinFiles); return SQLITE_OK; } /* |
︙ | |||
575 576 577 578 579 580 581 | 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 | - + - | /* xCommit */ 0, /* xRollback */ 0, /* xFindMethod */ 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ 0, |
︙ | |||
814 815 816 817 818 819 820 | 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 | - + | ** per-page basis. In this case, all arguments are ignored! ** ** This function has an internal mapping of the dependencies for each ** of the known fossil.XYZ.js modules and ensures that the ** dependencies also get queued (recursively) and that each module is ** queued only once. ** |
︙ |
Changes to src/cache.c.
︙ | |||
311 312 313 314 315 316 317 | 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 | - + | sqlite3_exec(db, "DELETE FROM cache; DELETE FROM blob; VACUUM;",0,0,0); sqlite3_close(db); fossil_print("cache cleared\n"); }else{ fossil_print("nothing to clear; cache does not exist\n"); } }else if( strncmp(zCmd, "list", nCmd)==0 |
︙ | |||
430 431 432 433 434 435 436 | 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - + | @ hit-count: %d(sqlite3_column_int(pStmt,2)) @ last-access: %s(sqlite3_column_text(pStmt,3)) \ if( zHash ){ @ %z(href("%R/timeline?c=%S",zHash))check-in</a>\ fossil_free(zHash); } @ </p></li> |
︙ |
Changes to src/capabilities.c.
︙ | |||
399 400 401 402 403 404 405 | 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 | - + | @ <th>Unversioned Content</th></tr> while( db_step(&q)==SQLITE_ROW ){ const char *zId = db_column_text(&q, 0); const char *zCap = db_column_text(&q, 1); int n = db_column_int(&q, 3); int eType; static const char *const azType[] = { "off", "read", "write" }; |
︙ |
Changes to src/cgi.c.
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | - + | ** So, even though the name of this file implies that it only deals with ** CGI, in fact, the code in this file is used to interpret webpage requests ** received by a variety of means, and to generate well-formatted replies ** to those requests. ** ** The code in this file abstracts the web-request so that downstream ** modules that generate the body of the reply (based on the requested page) |
︙ | |||
479 480 481 482 483 484 485 | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | - + | if( iReplyStatus<=0 ){ iReplyStatus = 200; zReplyStatus = "OK"; } if( g.fullHttpReply ){ if( rangeEnd>0 |
︙ | |||
560 561 562 563 564 565 566 | 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 | - + | blob_appendf(&hdr, "Content-Encoding: gzip\r\n"); blob_appendf(&hdr, "Vary: Accept-Encoding\r\n"); } total_size = blob_size(&cgiContent[0]) + blob_size(&cgiContent[1]); if( iReplyStatus==206 ){ blob_appendf(&hdr, "Content-Range: bytes %d-%d/%d\r\n", rangeStart, rangeEnd-1, total_size); |
︙ | |||
1254 1255 1256 1257 1258 1259 1260 | 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 | - + | char * z = (char*)P("QUERY_STRING"); if( z ){ ++rc; z = fossil_strdup(z); add_param_list(z, '&'); z = (char*)P("skin"); if( z ){ |
︙ | |||
1309 1310 1311 1312 1313 1314 1315 | 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 | - + | ** / \ ** https://fossil-scm.org/forum/info/12736b30c072551a?t=c ** \___/ \____________/\____/\____________________/ \_/ ** | | | | | ** | HTTP_HOST | PATH_INFO QUERY_STRING ** | | ** REQUEST_SCHEMA SCRIPT_NAME |
︙ | |||
1346 1347 1348 1349 1350 1351 1352 | 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 | - + | zScriptName = fossil_strndup(zRequestUri,(int)(z-zRequestUri)); cgi_set_parameter("SCRIPT_NAME", zScriptName); } #ifdef _WIN32 /* The Microsoft IIS web server does not define REQUEST_URI, instead it uses ** PATH_INFO for virtually the same purpose. Define REQUEST_URI the same as |
︙ | |||
1405 1406 1407 1408 1409 1410 1411 | 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 | - + | #endif z = (char*)P("HTTP_COOKIE"); if( z ){ z = fossil_strdup(z); add_param_list(z, ';'); z = (char*)cookie_value("skin",0); if(z){ |
︙ |
Changes to src/chat.c.
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + | ** * Chat content lives in a single repository. It is never synced. ** Content expires and is deleted after a set interval (a week or so). ** ** Notification is accomplished using the "hanging GET" or "long poll" design ** in which a GET request is issued but the server does not send a reply until ** new content arrives. Newer Web Sockets and Server Sent Event protocols are ** more elegant, but are not compatible with CGI, and would thus complicate |
︙ | |||
317 318 319 320 321 322 323 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | - + | " ORDER BY msgid LIMIT 1"); if( rAge>mxDays ){ msgid = db_int(0, "SELECT msgid FROM chat" " ORDER BY msgid DESC LIMIT 1 OFFSET %d", mxCnt); if( msgid>0 ){ Stmt s; db_multi_exec("PRAGMA secure_delete=ON;"); |
︙ | |||
691 692 693 694 695 696 697 | 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | - + | } sqlite3_sleep(iDelay); nDelay--; } } /* Exit by "break" */ db_finalize(&q1); blob_append(&json, "\n]}", 3); cgi_set_content(&json); |
︙ | |||
724 725 726 727 728 729 730 | 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 | - + | if( !g.perm.Chat ) { chat_emit_permissions_error(0); return; } zChatUser = db_get("chat-timeline-user",0); chat_create_tables(); cgi_set_content_type("application/json"); |
︙ | |||
767 768 769 770 771 772 773 | 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 | - + | fossil_free(zMsg); } if( nByte==0 ){ blob_appendf(&json, "\"fsize\":0"); }else{ blob_appendf(&json, "\"fsize\":%d,\"fname\":%!j,\"fmime\":%!j", nByte, zFName, zFMime); |
︙ | |||
955 956 957 958 959 960 961 | 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 | - + | sqlite3_value **argv ){ const char *zType = (const char*)sqlite3_value_text(argv[0]); int rid = sqlite3_value_int(argv[1]); const char *zUser = (const char*)sqlite3_value_text(argv[2]); const char *zMsg = (const char*)sqlite3_value_text(argv[3]); char *zRes = 0; |
︙ | |||
1215 1216 1217 1218 1219 1220 1221 | 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 | - + - - - - - - - - | blob_appendf(&reqUri, "/chat-backup?msgid=%d", msgid); if( g.url.user && g.url.user[0] ){ zObs = obscure(g.url.user); blob_appendf(&reqUri, "&resid=%t", zObs); fossil_free(zObs); } zPw = g.url.passwd; |
︙ |
Changes to src/checkin.c.
︙ | |||
1363 1364 1365 1366 1367 1368 1369 | 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 | - - - - - - - - - + - - - - - - - + | "#\n%.78c\n" "# The following diff is excluded from the commit message:\n#\n", '#' ); diff_options(&DCfg, 0, 1); DCfg.diffFlags |= DIFF_VERBOSE; if( g.aCommitFile ){ |
︙ | |||
2533 2534 2535 2536 2537 2538 2539 | 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 | - + - + | "use --override-lock", g.ckinLockFail); }else{ fossil_fatal("Would fork. \"update\" first or use --branch or " "--allow-fork."); } } |
︙ |
Changes to src/clone.c.
︙ | |||
194 195 196 197 198 199 200 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | - + | g.argv[2]); } zRepo = mprintf("./%s.fossil", zBase); if( zWorkDir==0 ){ zWorkDir = mprintf("./%s", zBase); } fossil_free(zBase); |
︙ | |||
258 259 260 261 262 263 264 | 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | - + | "DELETE FROM config WHERE name='project-code';" ); db_protect_pop(); url_enable_proxy(0); clone_ssh_db_set_options(); url_get_password_if_needed(); g.xlinkClusterOnly = 1; |
︙ |
Changes to src/comformat.c.
︙ | |||
272 273 274 275 276 277 278 | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | - + | if( maxChars<useChars ){ zBuf[iBuf++] = ' '; break; } }else if( wordBreak && fossil_isspace(c) ){ int distUTF8; int nextIndex = comment_next_space(zLine, index, &distUTF8); |
︙ |
Changes to src/configure.c.
︙ | |||
91 92 93 94 95 96 97 | 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | - | } aConfig[] = { { "css", CONFIGSET_CSS }, { "header", CONFIGSET_SKIN }, { "mainmenu", CONFIGSET_SKIN }, { "footer", CONFIGSET_SKIN }, { "details", CONFIGSET_SKIN }, { "js", CONFIGSET_SKIN }, |
︙ | |||
869 870 871 872 873 874 875 | 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 | - + - + - + | } url_parse(zServer, URL_PROMPT_PW|URL_USE_CONFIG); if( g.url.protocol==0 ) fossil_fatal("no server URL specified"); user_select(); url_enable_proxy("via proxy: "); if( overwriteFlag ) mask |= CONFIGSET_OVERWRITE; if( strncmp(zMethod, "push", n)==0 ){ |
︙ |
Changes to src/cookies.c.
︙ | |||
211 212 213 214 215 216 217 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - - - - - - - + - - - - - + - - - + - + - - - + - - - | assert( zPName!=0 ); cookie_parse(); for(i=0; i<cookies.nParam && strcmp(zPName,cookies.aParam[i].zPName); i++){} return i<cookies.nParam ? cookies.aParam[i].zPValue : zDefault; } /* |
Changes to src/db.c.
︙ | |||
170 171 172 173 174 175 176 | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - + | void *pAuthArg; /* Argument to the authorizer */ const char *zAuthName; /* Name of the authorizer */ int bProtectTriggers; /* True if protection triggers already exist */ int nProtect; /* Slots of aProtect used */ unsigned aProtect[12]; /* Saved values of protectMask */ } db = { PROTECT_USER|PROTECT_CONFIG|PROTECT_BASELINE, /* protectMask */ |
︙ | |||
455 456 457 458 459 460 461 | 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | - + | ** be compromised by an attack. */ void db_protect_only(unsigned flags){ if( db.nProtect>=count(db.aProtect)-2 ){ fossil_panic("too many db_protect() calls"); } db.aProtect[db.nProtect++] = db.protectMask; |
︙ | |||
1555 1556 1557 1558 1559 1560 1561 | 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 | - + - + | sqlite3_create_function(db, "protected_setting", 1, SQLITE_UTF8, 0, db_protected_setting_func, 0, 0); sqlite3_create_function(db, "win_reserved", 1, SQLITE_UTF8, 0, db_win_reserved_func,0,0); sqlite3_create_function(db, "url_nouser", 1, SQLITE_UTF8, 0, url_nouser_func,0,0); sqlite3_create_function(db, "chat_msg_from_event", 4, |
︙ | |||
2487 2488 2489 2490 2491 2492 2493 | 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 | - + | db_multi_exec("ALTER TABLE undo ADD COLUMN isLink BOOLEAN DEFAULT 0"); } if( db_local_table_exists_but_lacks_column("undo_vfile", "islink") ){ db_multi_exec("ALTER TABLE undo_vfile ADD COLUMN islink BOOL DEFAULT 0"); } } |
︙ | |||
2604 2605 2606 2607 2608 2609 2610 | 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 | - + | sqlite3_stmt *pStmt = 0; sz = file_size(zDbName, ExtFILE); if( sz<16834 ) return 0; db = db_open(zDbName); if( !db ) return 0; if( !g.zVfsName && sz%512 ) return 0; |
︙ | |||
3714 3715 3716 3717 3718 3719 3720 | 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 | - + - | z = fossil_strdup(pSetting->def); }else{ z = fossil_strdup(zDefault); } } return z; } |
︙ | |||
4020 4021 4022 4023 4024 4025 4026 | 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 | - + | if( !g.localOpen ) return; zName = db_repository_filename(); } file_canonical_name(zName, &full, 0); (void)filename_collation(); /* Initialize before connection swap */ db_swap_connections(); zRepoSetting = mprintf("repo:%q", blob_str(&full)); |
︙ | |||
4097 4098 4099 4100 4101 4102 4103 | 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 | - + + + | ** "new-name.fossil". ** ** Options: ** --empty Initialize check-out as being empty, but still connected ** with the local repository. If you commit this check-out, ** it will become a new "initial" commit in the repository. ** -f|--force Continue with the open even if the working directory is |
︙ | |||
4184 4185 4186 4187 4188 4189 4190 | 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 | - + | if( keepFlag==0 && bForce==0 && (nLocal = file_directory_size(".", 0, 1))>0 && (nLocal>1 || isUri || !file_in_cwd(zRepo)) ){ fossil_fatal("directory %s is not empty\n" "use the -f (--force) option to override\n" |
︙ | |||
4390 4391 4392 4393 4394 4395 4396 | 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 | - + | ** ** When the admin-log setting is enabled, configuration changes are recorded ** in the "admin_log" table of the repository. */ /* ** SETTING: allow-symlinks boolean default=off sensitive ** |
︙ | |||
4448 4449 4450 4451 4452 4453 4454 | 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 | - + | ** When the auto-hyperlink setting is 1, the javascript that runs to set ** the href= attributes of hyperlinks delays by this many milliseconds ** after the page load. Suggested values: 50 to 200. */ /* ** SETTING: auto-hyperlink-mouseover boolean default=off ** |
︙ | |||
4483 4484 4485 4486 4487 4488 4489 | 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 | - - - | ** off,commit=pullonly Do not autosync, except do a pull before each ** "commit", presumably to avoid undesirable ** forks. ** ** The syntax is a comma-separated list of VALUE and COMMAND=VALUE entries. ** A plain VALUE entry is the default that is used if no COMMAND matches. ** Otherwise, the VALUE of the matching command is used. |
︙ | |||
4672 4673 4674 4675 4676 4677 4678 | 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 | - + | ** Note that /fileedit cannot edit binary files, so the list should not ** contain any globs for, e.g., images or PDFs. */ /* ** SETTING: forbid-delta-manifests boolean default=off ** If enabled on a client, new delta manifests are prohibited on ** commits. If enabled on a server, whenever a client attempts |
︙ | |||
5013 5014 5015 5016 5017 5018 5019 | 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 | - + | ** Defaults to "start" on windows, "open" on Mac, ** and "firefox" on Unix. */ /* ** SETTING: large-file-size width=10 default=200000000 ** Fossil considers any file whose size is greater than this value ** to be a "large file". Fossil might issue warnings if you try to |
︙ | |||
5238 5239 5240 5241 5242 5243 5244 | 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 | - + | ** optimization. FILENAME can also be the configuration database file ** (~/.fossil or ~/.config/fossil.db) or a local .fslckout or _FOSSIL_ file. ** ** The purpose of this command is for testing the WITHOUT ROWID capabilities ** of SQLite. There is no big advantage to using WITHOUT ROWID in Fossil. ** ** Options: |
︙ |
Changes to src/default.css.
︙ | |||
494 495 496 497 498 499 500 501 502 503 504 505 506 507 | 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 | + | padding: 0; width: 125px; text-align: center; border-collapse: collapse; border-spacing: 0; } table.report { border-collapse:collapse; border: 1px solid #999; margin: 1em 0 1em 0; cursor: pointer; } td.rpteditex { border-width: thin; border-color: #000000; |
︙ | |||
579 580 581 582 583 584 585 | 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | - + | line-height: 1.275/*for mobile: forum post e6f4ee7de98b55c0*/; text-size-adjust: none /* ^^^ attempt to keep mobile from inflating some text */; } table.diff pre > ins, table.diff pre > del { /* Fill platform-dependent color gaps caused by |
︙ | |||
615 616 617 618 619 620 621 622 623 624 625 626 627 628 | 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | + | } tr.diffskip.jchunk:hover { /*background-color: rgba(127,127,127,0.5); cursor: pointer;*/ } tr.diffskip > td.chunkctrl { text-align: left; font-family: monospace; } tr.diffskip > td.chunkctrl > div { display: flex; align-items: center; } tr.diffskip > td.chunkctrl > div > span.error { padding: 0.25em 0.5em; |
︙ | |||
1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 | 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 | + | margin: 0; } .flex-container.child-gap-small > * { margin: 0.25em; } #fossil-status-bar { display: block; font-family: monospace; border-width: 1px; border-style: inset; border-color: inherit; min-height: 1.5em; font-size: 1.2em; padding: 0.2em; margin: 0.25em 0; |
︙ | |||
1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 | 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 | + | table.numbered-lines { width: 100%; table-layout: fixed /* required to keep ultra-wide code from exceeding window width, and instead force a scrollbar on them. */; } table.numbered-lines > tbody > tr { font-family: monospace; line-height: 1.35; white-space: pre; } table.numbered-lines > tbody > tr > td { font-family: inherit; font-size: inherit; line-height: inherit; |
︙ | |||
1530 1531 1532 1533 1534 1535 1536 | 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 | - - - - - - - - - - - - - - - - - - - - - | } blockquote.file-content { /* file content block in the /file page */ margin: 0 1em; } |
︙ | |||
1776 1777 1778 1779 1780 1781 1782 | 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 | - - - - - - - - + - - - - - + + | body.branch .submenu > a.timeline-link { display: none; } body.branch .submenu > a.timeline-link.selected { display: inline; } |
︙ | |||
1872 1873 1874 1875 1876 1877 1878 | 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 | - - - - - - - - | /* Objects in the "desktoponly" class are invisible on mobile */ @media screen and (max-width: 600px) { .desktoponly { display: none; } } |
Changes to src/deltafunc.c.
︙ | |||
484 485 486 487 488 489 490 | 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 | - + - | /* xCommit */ 0, /* xRollback */ 0, /* xFindMethod */ 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ 0, |
︙ |
Changes to src/diff.c.
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - | ** ** This file contains code used to compute a "diff" between two ** text files. */ #include "config.h" #include "diff.h" #include <assert.h> |
︙ | |||
47 48 49 50 51 52 53 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | - - - - - - - - | #define DIFF_BROWSER 0x00008000 /* The --browser option */ #define DIFF_JSON 0x00010000 /* JSON output */ #define DIFF_DEBUG 0x00020000 /* Debugging diff output */ #define DIFF_RAW 0x00040000 /* Raw triples - for debugging */ #define DIFF_TCL 0x00080000 /* For the --tk option */ #define DIFF_INCBINARY 0x00100000 /* The --diff-binary option */ #define DIFF_SHOW_VERS 0x00200000 /* Show compared versions */ |
︙ | |||
89 90 91 92 93 94 95 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | - + - + | ** Conceptually, this object is as an encoding of the command-line options ** for the "fossil diff" command. That is not a precise description, though, ** because not all diff operations are started from the command-line. But ** the idea is sound. ** ** Information encoded by this object includes but is not limited to: ** |
︙ | |||
429 430 431 432 433 434 435 | 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | - + | A = p->aFrom; B = p->aTo; R = p->aEdit; mxr = p->nEdit; while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; } for(r=0; r<mxr; r += 3*nr){ /* Figure out how many triples to show in a single block */ |
︙ | |||
914 915 916 917 918 919 920 | 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 | - + | /* ** This is an abstract superclass for an object that accepts difference ** lines and formats them for display. Subclasses of this object format ** the diff output in different ways. ** ** To subclass, create an instance of the DiffBuilder object and fill ** in appropriate method implementations. |
︙ | |||
1099 1100 1101 1102 1103 1104 1105 | 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 | - + | blob_append_char(p->pOut, ' '); blob_append_tcl_literal(p->pOut, pX->z + x, chng.a[i].iStart1 - x); x = chng.a[i].iStart1; blob_append_char(p->pOut, ' '); blob_append_tcl_literal(p->pOut, pX->z + x, chng.a[i].iLen1); x += chng.a[i].iLen1; blob_append_char(p->pOut, ' '); |
︙ | |||
1185 1186 1187 1188 1189 1190 1191 | 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 | - + | } blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iStart1 - x); x = chng.a[i].iStart1; blob_append_char(p->pOut, ','); blob_append_json_literal(p->pOut, pX->z + x, chng.a[i].iLen1); x += chng.a[i].iLen1; blob_append_char(p->pOut, ','); |
︙ | |||
1267 1268 1269 1270 1271 1272 1273 | 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 | - + | /* "+" marks for the separator on inserted lines */ for(i=0; i<p->nPending; i++) blob_append(&p->aCol[1], "+\n", 2); /* Text of the inserted lines */ blob_append(&p->aCol[2], "<ins>", 5); blob_append_xfer(&p->aCol[2], &p->aCol[4]); blob_append(&p->aCol[2], "</ins>", 6); |
︙ | |||
2004 2005 2006 2007 2008 2009 2010 | 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 | - + | aBig = aRight; nBig = nRight; } iDivBig = nBig/2; iDivSmall = nSmall/2; if( pCfg->diffFlags & DIFF_DEBUG ){ |
︙ | |||
2230 2231 2232 2233 2234 2235 2236 | 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 | - + | B = p->aTo; R = p->aEdit; mxr = p->nEdit; while( mxr>2 && R[mxr-1]==0 && R[mxr-2]==0 ){ mxr -= 3; } for(r=0; r<mxr; r += 3*nr){ /* Figure out how many triples to show in a single block */ |
︙ | |||
3156 3157 3158 3159 3160 3161 3162 | 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 | - + - - - - - + + - - | } /* Undocumented and unsupported flags used for development ** debugging and analysis: */ if( find_option("debug",0,0)!=0 ) diffFlags |= DIFF_DEBUG; if( find_option("raw",0,0)!=0 ) diffFlags |= DIFF_RAW; } |
︙ | |||
3496 3497 3498 3499 3500 3501 3502 | 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 | - + - | } p->nVers++; cnt++; } if( p->nVers==0 ){ if( zRevision ){ |
︙ |
Changes to src/diff.tcl.
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | - + | # The "diff --tk" command outputs prepends a "set fossilcmd {...}" line # to this file, then runs this file using "tclsh" in order to display the # graphical diff in a separate window. A typical "set fossilcmd" line # looks like this: # # set fossilcmd {| "./fossil" diff --html -y -i -v} # # This header comment is stripped off by the "mkbuiltin.c" program. # set prog { package require Tk |
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ERR_FG #ee0000 PADX 5 WIDTH 80 HEIGHT 45 LB_HEIGHT 25 } |
︙ |
Changes to src/diffcmd.c.
︙ | |||
111 112 113 114 115 116 117 | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | - + | } return 0; } /* ** Print details about the compared versions - possibly the working directory ** or the undo buffer. For check-ins, show hash and commit time. |
︙ | |||
159 160 161 162 163 164 165 | 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - - - | void diff_print_filenames( const char *zLeft, /* Name of the left file */ const char *zRight, /* Name of the right file */ DiffConfig *pCfg, /* Diff configuration */ Blob *pOut /* Write to this blob, or stdout of this is NULL */ ){ u64 diffFlags = pCfg->diffFlags; |
︙ | |||
214 215 216 217 218 219 220 | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | - + - + | }else{ blob_appendf(pOut, "--- %s\n+++ %s\n", zLeft, zRight); } } /* |
︙ | |||
311 312 313 314 315 316 317 | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | @ font-weight: bold; @ } @ td.difftxt ins > ins.edit { @ background-color: #c0c0ff; @ text-decoration: none; @ font-weight: bold; @ } |
︙ | |||
514 515 516 517 518 519 520 | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | - - + - + | #ifndef _WIN32 signal(SIGINT, diff_www_interrupt); #else SetConsoleCtrlHandler(diff_console_ctrl_handler, TRUE); #endif } if( (pCfg->diffFlags & DIFF_WEBPAGE)!=0 ){ |
︙ | |||
575 576 577 578 579 580 581 | 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | - + | if( pCfg->zDiffCmd==0 ){ Blob out; /* Diff output text */ Blob file2; /* Content of zFile2 */ const char *zName2; /* Name of zFile2 for display */ /* Read content of zFile2 into memory */ blob_zero(&file2); |
︙ | |||
606 607 608 609 610 611 612 | 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - | } /* Release memory resources */ blob_reset(&file2); }else{ Blob nameFile1; /* Name of temporary file to old pFile1 content */ Blob cmd; /* Text of command to run */ |
︙ | |||
638 639 640 641 642 643 644 | 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | - - - - - - - - - - + - + | } blob_reset(&file2); } /* Construct a temporary file to hold pFile1 based on the name of ** zFile2 */ file_tempname(&nameFile1, zFile2, "orig"); |
︙ | |||
708 709 710 711 712 713 714 | 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 | - - - + - - - - - - - - - - - - + + - - + + | /* Release memory resources */ blob_reset(&out); }else{ Blob cmd; Blob temp1; Blob temp2; |
︙ | |||
873 874 875 876 877 878 879 | 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 | - - - - - - - - + - | blob_zero(&fname); file_relative_name(zPathname, &fname, 1); }else{ blob_set(&fname, g.zLocalRoot); blob_append(&fname, zPathname, -1); } zFullName = blob_str(&fname); |
︙ | |||
945 946 947 948 949 950 951 | 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 | - + | ){ Stmt q; Blob content; db_prepare(&q, "SELECT pathname, content FROM undo"); blob_init(&content, 0, 0); if( (pCfg->diffFlags & DIFF_SHOW_VERS)!=0 ){ diff_print_versions("(undo)", "(workdir)", pCfg); |
︙ | |||
1032 1033 1034 1035 1036 1037 1038 | 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 | - + - - - | manifest_file_rewind(pFrom); pFromFile = manifest_file_next(pFrom,0); pTo = manifest_get_by_name(zTo, 0); manifest_file_rewind(pTo); pToFile = manifest_file_next(pTo,0); if( (pCfg->diffFlags & DIFF_SHOW_VERS)!=0 ){ diff_print_versions(zFrom, zTo, pCfg); |
︙ | |||
1126 1127 1128 1129 1130 1131 1132 | 954 955 956 957 958 959 960 961 962 963 964 965 966 967 | - | */ void diff_tk(const char *zSubCmd, int firstArg){ int i; Blob script; const char *zTempFile = 0; char *zCmd; const char *zTclsh; |
︙ | |||
1153 1154 1155 1156 1157 1158 1159 | 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 | - - + | blob_appendf(&script, " {%/}", z); }else{ int j; blob_append(&script, " ", 1); for(j=0; z[j]; j++) blob_appendf(&script, "\\%03o", (unsigned char)z[j]); } } |
︙ | |||
1207 1208 1209 1210 1211 1212 1213 | 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 | - + | ** out. Or if the FILE arguments are omitted, show all unsaved changes ** currently in the working check-out. ** ** The default output format is a "unified patch" (the same as the ** output of "diff -u" on most unix systems). Many alternative formats ** are available. A few of the more useful alternatives: ** |
︙ | |||
1248 1249 1250 1251 1252 1253 1254 | 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 | - - + + - - - - - + + | ** as binary ** --branch BRANCH Show diff of all changes on BRANCH ** --brief Show filenames only ** -b|--browser Show the diff output in a web-browser ** --by Shorthand for "--browser -y" ** -ci|--checkin VERSION Show diff of all changes in VERSION ** --command PROG External diff program. Overrides "diff-command" |
︙ | |||
1381 1382 1383 1384 1385 1386 1387 | 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 | - + | } fossil_free(pFileDir[i].zName); } fossil_free(pFileDir); } diff_end(&DCfg, 0); if ( DCfg.diffFlags & DIFF_NUMSTAT ){ |
︙ |
Changes to src/dispatch.c.
︙ | |||
451 452 453 454 455 456 457 | 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | - + | aIndent[iLevel] = nIndent; azEnd[iLevel] = zEndUL; if( wantP ){ blob_append(pHtml,"<p>", 3); wantP = 0; } blob_append(pHtml, "<ul>\n", 5); |
︙ | |||
545 546 547 548 549 550 551 | 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 | - + - + | if( c=='[' && (x = help_is_link(zHelp+i, 100000))!=0 ){ if( i>0 ) blob_append(pText, zHelp, i); zHelp += i+2; blob_append(pText, zHelp, x-3); zHelp += x-1; i = -1; continue; |
︙ | |||
633 634 635 636 637 638 639 | 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 | - + | ** ** Show help text for commands and pages. Useful for proof-reading. ** Defaults to just the CLI commands. Specify --www to see only the ** web pages, or --everything to see both commands and pages. ** ** Options: ** -a|--aliases Show aliases |
︙ | |||
659 660 661 662 663 664 665 | 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | - + | CMDFLAG_ALIAS | CMDFLAG_SETTING | CMDFLAG_TEST; } if( find_option("settings","s",0) ){ mask = CMDFLAG_SETTING; } if( find_option("aliases","a",0) ){ mask = CMDFLAG_ALIAS; |
︙ | |||
766 767 768 769 770 771 772 | 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 | - + | iLast = FOSSIL_FIRST_CMD-1; }else{ iFirst = FOSSIL_FIRST_CMD; iLast = MX_COMMAND-1; } while( n<nArray ){ |
︙ | |||
895 896 897 898 899 900 901 | 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 | - + - | @ <li><a href="%R/help?cmd=%s(z)">%s(zBoldOn)%s(z)%s(zBoldOff)</a> /* Output aliases */ if( occHelp[aCommand[i].iHelp] > 1 ){ int j; int aliases[MX_HELP_DUP], nAliases=0; for(j=0; j<occHelp[aCommand[i].iHelp]; j++){ if( bktHelp[aCommand[i].iHelp][j] != i ){ |
︙ | |||
986 987 988 989 990 991 992 | 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 | - + | style_set_current_feature("test"); style_header("All Help Text"); @ <dl> /* Fill in help string buckets */ for(i=0; i<MX_COMMAND; i++){ if(aCommand[i].eCmdFlags & CMDFLAG_HIDDEN) continue; bktHelp[aCommand[i].iHelp][occHelp[aCommand[i].iHelp]++] = i; |
︙ | |||
1038 1039 1040 1041 1042 1043 1044 | 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 | - + | }else if( e & CMDFLAG_WEBPAGE ){ if( e & CMDFLAG_RAWCONTENT ){ zDesc = "raw-content web page"; }else{ zDesc = "web page"; } } |
︙ | |||
1117 1118 1119 1120 1121 1122 1123 | 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 | - + - + - + | /* ** Documentation on universal command-line options. */ /* @-comment: # */ static const char zOptions[] = @ Command-line options common to all commands: |
︙ | |||
1486 1487 1488 1489 1490 1491 1492 | 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 | - + - + | helptextVtab_cursor *pCur = (helptextVtab_cursor*)cur; return pCur->iRowid>=MX_COMMAND; } /* ** This method is called to "rewind" the helptextVtab_cursor object back ** to the first row of output. This method is always called at least |
︙ | |||
1515 1516 1517 1518 1519 1520 1521 | 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 | - + | ){ pIdxInfo->estimatedCost = (double)MX_COMMAND; pIdxInfo->estimatedRows = MX_COMMAND; return SQLITE_OK; } /* |
︙ | |||
1542 1543 1544 1545 1546 1547 1548 | 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 | - + - | /* xCommit */ 0, /* xRollback */ 0, /* xFindMethod */ 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ 0, |
Changes to src/doc.c.
︙ | |||
339 340 341 342 343 344 345 | 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 | - + | static char * zList = 0; static char const * zEnd = 0; static int once = 0; char * z; int tokenizerState /* 0=expecting a key, 1=skip next token, ** 2=accept next token */; if(once==0){ |
︙ | |||
727 728 729 730 731 732 733 | 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 | - + - + | ** Transfer content to the output. During the transfer, when text of ** the following form is seen: ** ** href="$ROOT/..." ** action="$ROOT/..." ** href=".../doc/$CURRENT/..." ** |
︙ | |||
828 829 830 831 832 833 834 | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 | - + - + | convert_href_and_output(pBody); if( !isPopup ){ document_emit_js(); style_finish_page(); } }else if( fossil_strcmp(zMime, "text/x-pikchr")==0 ){ style_adunit_config(ADUNIT_RIGHT_OK); |
︙ | |||
1209 1210 1211 1212 1213 1214 1215 | 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 | - + | ** ** The intended use case here is to supply an icon for the "fossil ui" ** command. For a permanent website, the recommended process is for ** the admin to set up a project-specific icon and reference that icon ** in the HTML header using a line like: ** ** <link rel="icon" href="URL-FOR-YOUR-ICON" type="MIMETYPE"/> |
︙ |
Changes to src/etag.c.
︙ | |||
98 99 100 101 102 103 104 | 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | - + - + | char zBuf[50]; assert( zETag[0]==0 ); /* Only call this routine once! */ if( etagCancelled ) return; /* By default, ETagged URLs never expire since the ETag will change * when the content changes. Approximate this policy as 10 years. */ |
︙ | |||
208 209 210 211 212 213 214 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + | /* Check to see the If-Modified-Since constraint is satisfied */ zIfModifiedSince = P("HTTP_IF_MODIFIED_SINCE"); if( zIfModifiedSince==0 ) return; x = cgi_rfc822_parsedate(zIfModifiedSince); if( x<mtime ) return; |
︙ | |||
242 243 244 245 246 247 248 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | - + | /* Return the last-modified time in seconds since 1970. Or return 0 if ** there is no last-modified time. */ sqlite3_int64 etag_mtime(void){ return iEtagMtime; } |
︙ |
Changes to src/export.c.
︙ | |||
447 448 449 450 451 452 453 | 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 | - + | }while( (rid = bag_next(vers, rid))!=0 ); } } } /* This is the original header command (and hence documentation) for ** the "fossil export" command: |
︙ | |||
1002 1003 1004 1005 1006 1007 1008 | 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 | - + | db_bind_int(&sIns, ":isfile", isFile!=0); db_step(&sIns); db_reset(&sIns); return mprintf(":%d", db_last_insert_rowid()); } /* This is the SHA3-256 hash of an empty file */ |
︙ | |||
1035 1036 1037 1038 1039 1040 1041 | 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 | - + | }else{ rc = content_get(rid, &data); if( rc==0 ){ if( bPhantomOk ){ blob_init(&data, 0, 0); gitmirror_message(VERB_EXTRA, "missing file: %s\n", zUuid); zUuid = zEmptySha3; |
︙ | |||
1348 1349 1350 1351 1352 1353 1354 | 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 | - + - + | int i; zCmd = "git symbolic-ref --short HEAD"; gitmirror_message(VERB_NORMAL, "%s\n", zCmd); xCmd = popen(zCmd, "r"); if( xCmd==0 ){ fossil_fatal("git command failed: %s", zCmd); } |
︙ | |||
1434 1435 1436 1437 1438 1439 1440 | 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 | - + | /* Make sure GIT has been initialized */ z = mprintf("%s/.git", zMirror); if( !file_isdir(z, ExtFILE) ){ zMainBr = gitmirror_init(zMirror, zMainBr); bNeedRepack = 1; } fossil_free(z); |
︙ | |||
1741 1742 1743 1744 1745 1746 1747 | 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 | - + | char *zSql; int bQuiet = 0; int bByAll = 0; /* Undocumented option meaning this command was invoked ** from "fossil all" and should modify output accordingly */ db_find_and_open_repository(0, 0); bQuiet = find_option("quiet","q",0)!=0; |
︙ | |||
1785 1786 1787 1788 1789 1790 1791 | 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 | - - - + + - - - | } } z = db_text(0, "SELECT value FROM mconfig WHERE key='autopush'"); if( z==0 ){ fossil_print("Autopush: off\n"); }else{ UrlData url; |
︙ | |||
1858 1859 1860 1861 1862 1863 1864 | 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 | - + | ** mapped into this name. "master" is used if ** this option is omitted. ** -q|--quiet Reduce output. Repeat for even less output. ** -v|--verbose More output ** ** > fossil git import MIRROR ** |
︙ |
Changes to src/file.c.
︙ | |||
2243 2244 2245 2246 2247 2248 2249 | 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 | - + | /* ** Return non-NULL if zFilename contains pathname elements that ** are reserved on Windows. The returned string is the disallowed ** path element. */ const char *file_is_win_reserved(const char *zPath){ |
︙ |
Changes to src/fileedit.c.
︙ | |||
434 435 436 437 438 439 440 | 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 | - + | ** pCI's ownership is not modified. ** ** This function validates pCI's state and fails if any validation ** fails. ** ** On error, returns false (0) and, if pErr is not NULL, writes a ** diagnostic message there. |
︙ | |||
571 572 573 574 575 576 577 | 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 | - + | && blob_size(&pCI->fileContent)>0 ){ /* Convert to the requested EOL style. Note that this inherently ** runs a risk of breaking content, e.g. string literals which ** contain embedded newlines. Note that HTML5 specifies that ** form-submitted TEXTAREA content gets normalized to CRLF-style: ** |
︙ | |||
979 980 981 982 983 984 985 | 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 | - + | char ** zRevUuid, int * pVid, const char * zFilename, int * frid){ char * zFileUuid = 0; /* file content UUID */ const int checkFile = zFilename!=0 || frid!=0; int vid = 0; |
︙ | |||
1174 1175 1176 1177 1178 1179 1180 | 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 | - + | ** ** Intended to be used only by /filepage and /filepage_commit. */ static int fileedit_setup_cimi_from_p(CheckinMiniInfo * p, Blob * pErr, int * bIsMissingArg){ char * zFileUuid = 0; /* UUID of file content */ const char * zFlag; /* generic flag */ |
︙ | |||
1369 1370 1371 1372 1373 1374 1375 | 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 | - + | if(i++){ CX(","); } CX("%!j", zFilename); } } db_finalize(&q); |
︙ | |||
1425 1426 1427 1428 1429 1430 1431 | 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 | - + - + | } } /* ** AJAX route /fileedit?ajax=commit ** ** Required query parameters: |
︙ | |||
1575 1576 1577 1578 1579 1580 1581 | 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 | - + | ** use of the name parameter. ** ** Which additional parameters are used by each distinct ajax route ** is an internal implementation detail and may change with any ** given build of this code. An unknown "name" value triggers an ** error, as documented for ajax_route_error(). */ |
︙ | |||
1668 1669 1670 1671 1672 1673 1674 | 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 | - + | ** have a common, page-specific container we can filter our CSS ** selectors, but we do have the BODY, which we can decorate with ** whatever CSS we wish... */ style_script_begin(__FILE__,__LINE__); CX("document.body.classList.add('fileedit');\n"); style_script_end(); |
︙ | |||
1696 1697 1698 1699 1700 1701 1702 | 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 | - + - - + - | "data-tab-parent='fileedit-tabs' " "data-tab-label='File Selection' " "class='hidden'" ">"); CX("<div id='fileedit-file-selector'></div>"); CX("</div>"/*#fileedit-tab-fileselect*/); } |
︙ | |||
1937 1938 1939 1940 1941 1942 1943 | 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 | - + | */ style_select_list_str("comment-mimetype", "comment_mimetype", "Comment style:", "Specify how fossil will interpret the " "comment string.", NULL, "Fossil", "text/x-fossil-wiki", |
︙ |
Changes to src/finfo.c.
︙ | |||
565 566 567 568 569 570 571 | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | - + | if( ridTo ){ zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", ridTo); zLink = href("%R/info/%!S", zUuid); blob_appendf(&title, " and check-in %z%S</a>", zLink, zUuid); fossil_free(zUuid); } }else if( ridCi ){ |
︙ |
Changes to src/foci.c.
︙ | |||
266 267 268 269 270 271 272 | 266 267 268 269 270 271 272 273 274 275 276 277 | - + - | 0, /* xCommit */ 0, /* xRollback */ 0, /* xFindFunction */ 0, /* xRename */ 0, /* xSavepoint */ 0, /* xRelease */ 0, /* xRollbackTo */ |
Changes to src/fossil.page.chat.js.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + - | /** This file contains the client-side implementation of fossil's /chat |
︙ | |||
63 64 65 66 67 68 69 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - - - - - - - - - + + + + + + - + - + | let dbg = document.querySelector('#debugMsg'); if(dbg){ /* This can inadvertently influence our flexbox layouts, so move it out of the way. */ D.append(document.body,dbg); } })(); |
︙ | |||
325 326 327 328 329 330 331 | 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | + + + + + + - + | "chat-only" mode. That mode hides the page's header and footer, leaving only the chat application visible to the user. */ chatOnlyMode: function f(yes){ if(undefined === f.elemsToToggle){ f.elemsToToggle = []; document.querySelectorAll( ["body > div.header", "body > div.mainmenu", "body > div.footer", "#debugMsg" ].join(',') |
︙ | |||
392 393 394 395 396 397 398 | 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | - - - - - | ctrl-enter both send them. */ "edit-ctrl-send": false, /* When on, the edit field starts as a single line and expands as the user types, and the relevant buttons are laid out in a compact form. When off, the edit field and buttons are larger. */ "edit-compact-mode": true, |
︙ | |||
1500 1501 1502 1503 1504 1505 1506 | 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 | - + - + - + | /* Shift-enter will run preview mode UNLESS preview mode is active AND the input field is empty, in which case it will switch back to message view. */ if(Chat.e.currentView===Chat.e.viewPreview && !text){ Chat.setCurrentView(Chat.e.viewMessages); }else if(!text){ f.$toggleCompact(compactMode); |
︙ | |||
1668 1669 1670 1671 1672 1673 1674 | 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 | - - - - - - - - + | boolValue: 'edit-widget-x', hint: [ "When enabled, chat input uses a so-called 'contenteditable' ", "field. Though generally more comfortable and modern than ", "plain-text input fields, browser-specific quirks and bugs ", "may lead to frustration. Ideal for mobile devices." ].join('') |
︙ | |||
1973 1974 1975 1976 1977 1978 1979 | 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 | - + | D.enable(elemsToEnable); } }); return false; }; btnPreview.addEventListener('click', submit, false); })()/*message preview setup*/; |
︙ |
Changes to src/fossil.page.fileedit.js.
︙ | |||
68 69 70 71 72 73 74 | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | - + - - - - - - | ); */ const E = (s)=>document.querySelector(s), D = F.dom, P = F.page; P.config = { |
︙ | |||
574 575 576 577 578 579 580 | 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 | - + | opt._finfo = finfo; if(0===f.compare(currentFinfo, finfo)){ D.attr(opt, 'selected', true); } }); } }/*P.stashWidget*/; |
︙ | |||
728 729 730 731 732 733 734 | 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | - + | } } ); //////////////////////////////////////////////////////////// // Trigger preview on Ctrl-Enter. This only works on the built-in // editor widget, not a client-provided one. P.e.taEditor.addEventListener('keydown',function(ev){ |
︙ | |||
849 850 851 852 853 854 855 | 843 844 845 846 847 848 849 850 851 852 853 854 855 856 | - - - - - - - | } ); P.fileSelectWidget.init(); P.stashWidget.init( P.e.tabs.content.lastElementChild ); |
︙ | |||
1172 1173 1174 1175 1176 1177 1178 | 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 | - + | const target = this.e.previewTarget; D.clearElement(target); if('string'===typeof c) D.parseHtml(target,c); if(F.pikchr){ F.pikchr.addSrcView(target.querySelectorAll('svg.pikchr')); } }; |
︙ |
Changes to src/fossil.page.pikchrshow.js.
︙ | |||
314 315 316 317 318 319 320 | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | - + | \u00a0 to , so...*/.split(' ').join('\u00a0')); if(needsPreview) P.preview(); else{ /*If it's from the server, it's already rendered, but this gets all labels/headers in sync.*/ P.renderPreview(); } |
︙ |
Changes to src/fossil.page.pikchrshowasm.js.
︙ | |||
390 391 392 393 394 395 396 | 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | - + | const val = ev.target.value; if(!val) return; setCurrentText(val); }, false); }/*Examples*/ /** |
︙ | |||
477 478 479 480 481 482 483 | 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 | - - - + + + | that height here. Larger than ~95% is too big for Firefox on Android, causing the input area to move off-screen. */ const appViews = EAll('.app-view'); const elemsToCount = [ /* Elements which we need to always count in the visible body size. */ |
︙ |
Changes to src/fossil.page.whistory.js.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - + - - - | /* This script adds interactivity for wiki-history webpages. * * The main code is within the 'on-click' handler of the "diff" links. * Instead of standard redirection it fills-in two hidden inputs with * the appropriate values and submits the corresponding form. * A special care should be taken if some intermediate edits are hidden. * * For the sake of compatibility with ascetic browsers the code tries * to avoid modern API and ECMAScript constructs. This makes it less * readable and may be reconsidered in the future. */ window.addEventListener( 'load', function() { |
︙ |
Changes to src/fossil.page.wikiedit.js.
︙ | |||
73 74 75 76 77 78 79 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - - - - - - - - + - - - - - - | useConfirmerButtons:{ /* If true during fossil.page setup, certain buttons will use a "confirmer" step, else they will not. The confirmer topic has been the source of much contention in the forum. */ save: false, reload: true, discardStash: true |
︙ | |||
465 466 467 468 469 470 471 | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 | - + | opt.dataset.isDeleted = true; } self._refreshStashMarks(opt); }); D.enable(sel); if(P.winfo) sel.value = P.winfo.name; }, |
︙ | |||
662 663 664 665 666 667 668 | 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | - + | }, false); D.append( parentElem, D.append(D.addClass(D.div(), 'fieldset-wrapper'), fsFilter, fsNewPage, fsLegend) ); |
︙ | |||
685 686 687 688 689 690 691 | 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 | - - - - - - - - + | if(page.isEmpty) opt.dataset.isDeleted = true; else delete opt.dataset.isDeleted; self._refreshStashMarks(opt); }else if('sandbox'!==page.type){ F.error("BUG: internal mis-handling of page object: missing OPTION for page "+page.name); } }); |
︙ | |||
932 933 934 935 936 937 938 | 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 | - + | } } ); //////////////////////////////////////////////////////////// // Trigger preview on Ctrl-Enter. This only works on the built-in // editor widget, not a client-provided one. P.e.taEditor.addEventListener('keydown',function(ev){ |
︙ | |||
1479 1480 1481 1482 1483 1484 1485 | 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 | - + | const target = this.e.previewTarget; D.clearElement(target); if('string'===typeof c) D.parseHtml(target,c); if(F.pikchr){ F.pikchr.addSrcView(target.querySelectorAll('svg.pikchr')); } }; |
︙ |
Changes to src/graph.c.
︙ | |||
309 310 311 312 313 314 315 | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | - + | dist = i - iNearto; if( dist<0 ) dist = -dist; if( dist<iBestDist ){ iBestDist = dist; iBest = i; } } |
︙ | |||
537 538 539 540 541 542 543 | 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 | - + - + | ** the aParent[] array. */ if( (tmFlags & (TIMELINE_DISJOINT|TIMELINE_XMERGE))!=0 ){ for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ for(i=1; i<pRow->nParent; i++){ GraphRow *pParent = hashFind(p, pRow->aParent[i]); if( pParent==0 ){ |
︙ | |||
938 939 940 941 942 943 944 | 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 | - + | /* The parent branch from which this branch emerges is on the ** same rail as pRow. Do not shift as that would stack a child ** branch directly above its parent. */ continue; } /* All clear. Make the translation |
︙ |
Changes to src/graph.js.
︙ | |||
132 133 134 135 136 137 138 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | - + | function hideGraphTooltip(){ /* Hide the tooltip */ document.removeEventListener('keydown',onKeyDown,/* useCapture == */true); stopCloseTimer(); tooltipObj.style.display = "none"; tooltipInfo.ixActive = -1; tooltipInfo.idNodeActive = 0; } |
︙ |
Changes to src/hbmenu.js.
︙ | |||
19 20 21 22 23 24 25 | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + - + | ** ** This was original the "js.txt" file for the default skin. It was subsequently ** moved into src/hbmenu.js so that it could be more easily reused by other skins ** using the "builtin_request_js" TH1 command. ** ** Operation: ** |
︙ |
Changes to src/hook.c.
︙ | |||
230 231 232 233 234 235 236 | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | - + | ** ** > fossil hook test [OPTIONS] ID ** ** Run the hook script given by ID for testing purposes. ** Options: ** ** --dry-run Print the script on stdout rather than run it |
︙ |
Changes to src/http.c.
︙ | |||
96 97 98 99 100 101 102 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | - + | ** sha1_shared_secret()), not the original password. So convert the ** password to its SHA1 encoding if it isn't already a SHA1 hash. ** ** We assume that a hexadecimal string of exactly 40 characters is a ** SHA1 hash, not an original password. If a user has a password which ** just happens to be a 40-character hex string, then this routine won't ** be able to distinguish it from a hash, the translation will not be |
︙ | |||
256 257 258 259 260 261 262 | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | blob_write_to_file(pSend, zUplink); if( g.fHttpTrace ){ fossil_print("RUN %s\n", zCmd); } rc = fossil_system(zCmd); if( rc ){ fossil_warning("Transport command failed: %s\n", zCmd); |
︙ | |||
423 424 425 426 427 428 429 | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 | - - - - - - - - - - | int isCompressed = 1; /* True if the reply is compressed */ if( g.zHttpCmd!=0 ){ /* Handle the --transport-command option for "fossil sync" and similar */ return http_exchange_external(pSend,pReply,mHttpFlags,zAltMimetype); } |
︙ | |||
612 613 614 615 616 617 618 | 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - | }else if( fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0 ){ isError = 1; } } } } if( iLength<0 ){ |
︙ |
Changes to src/http_ssl.c.
︙ | |||
57 58 59 60 61 62 63 | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | - + | } sException; static int sslNoCertVerify = 0; /* Do not verify SSL certs */ /* This is a self-signed cert in the PEM format that can be used when ** no other certs are available. */ |
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | - + | "G6wxc4kN9dLK+5S29q3nzl24/qzXoF8P9Re5KBCbrwaHgy+OEEceq5jkmfGFxXjw\n" "pvVCNry5uAhH5NqbXZampUWqiWtM4eTaIPo7Y2mDA1uWhuWtO6F9PsnFJlQHCnwy\n" "s/TsrXk=\n" "-----END CERTIFICATE-----\n"; /* This is the private-key corresponding to the cert above */ |
︙ | |||
204 205 206 207 208 209 210 | 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - + | "or the ssl-identity setting."); return 0; /* no cert available */ } /* ** Convert an OpenSSL ASN1_TIME to an ISO8601 timestamp. ** |
︙ | |||
410 411 412 413 414 415 416 | 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 | - + | ** Invoke this routine to disable SSL cert verification. After ** this call is made, any SSL cert that the server provides will ** be accepted. Communication will still be encrypted, but the ** client has no way of knowing whether it is talking to the ** real server or a man-in-the-middle imposter. */ void ssl_disable_cert_verification(void){ |
︙ | |||
563 564 565 566 567 568 569 | 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 | - + - + | X509_NAME_print_ex(mem, X509_get_issuer_name(cert), 0, XN_FLAG_ONELINE); BIO_printf(mem, "\n notBefore: %s", ssl_asn1time_to_iso8601(X509_get_notBefore(cert), 1)); BIO_printf(mem, "\n notAfter: %s", ssl_asn1time_to_iso8601(X509_get_notAfter(cert), 1)); BIO_printf(mem, "\n sha256: %s", zHash); desclen = BIO_get_mem_data(mem, &desc); |
︙ | |||
1183 1184 1185 1186 1187 1188 1189 | 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 | - + | /* ** Return the OpenSSL version number being used. Space to hold ** this name is obtained from fossil_malloc() and should be ** freed by the caller. */ char *fossil_openssl_version(void){ |
Changes to src/http_transport.c.
︙ | |||
129 130 131 132 133 134 135 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | - - + - - - - - - | if( pUrlData->user && pUrlData->user[0] ){ zHost = mprintf("%s@%s", pUrlData->user, pUrlData->name); blob_append_escaped_arg(&zCmd, zHost, 0); fossil_free(zHost); }else{ blob_append_escaped_arg(&zCmd, pUrlData->name, 0); } |
︙ | |||
317 318 319 320 321 322 323 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | - + | /* ** Read N bytes of content directly from the wire and write into ** the buffer. */ static int transport_fetch(UrlData *pUrlData, char *zBuf, int N){ int got; |
︙ |
Changes to src/import.c.
︙ | |||
815 816 817 818 819 820 821 | 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 | - + | gg.fromLoaded = 1; }else if( strncmp(zLine, "N ", 2)==0 ){ /* No-op */ }else if( strncmp(zLine, "property branch-nick ", 21)==0 ){ /* Breezy uses this property to store the branch name. |
︙ |
Changes to src/info.c.
︙ | |||
1222 1223 1224 1225 1226 1227 1228 | 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 | - - - - - - - - - + + | } } pTo = vdiff_parse_manifest("to", &ridTo); if( pTo==0 ) return; pFrom = vdiff_parse_manifest("from", &ridFrom); if( pFrom==0 ) return; zGlob = P("glob"); |
︙ | |||
2507 2508 2509 2510 2511 2512 2513 | 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 | - + | ) ){ if( P("ci")==0 ) cgi_set_query_parameter("ci","tip"); page_tree(); return; } /* No directory found, look for an historic version of the file ** that was subsequently deleted. */ |
︙ | |||
2805 2806 2807 2808 2809 2810 2811 | 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 | - + | } } if( strcmp(zModAction,"approve")==0 ){ moderation_approve('t', rid); } } zTktTitle = db_table_has_column("repository", "ticket", "title" ) |
︙ | |||
3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 | 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 | + | Blob ctrl; Blob comment; char *zNow; int nTags, nCancels; int i; Stmt q; if( g.argc==3 ) usage(AMEND_USAGE_STMT); fEditComment = find_option("edit-comment","e",0)!=0; zNewComment = find_option("comment","m",1); zComFile = find_option("message-file","M",1); zNewBranch = find_option("branch",0,1); zNewColor = find_option("bgcolor",0,1); zNewBrColor = find_option("branchcolor",0,1); if( zNewBrColor ){ |
︙ | |||
3837 3838 3839 3840 3841 3842 3843 | 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 | - + | ** If no VERSION is provided, describe the currently checked-out version. ** ** If VERSION and the found ancestor refer to the same commit, the last two ** components are omitted, unless --long is provided. When no fitting tagged ** ancestor is found, show only the short hash of VERSION. ** ** Options: |
︙ |
Changes to src/interwiki.c.
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + - + | ** ** { ** "base": Base URL for the remote site. ** "hash": Append this to "base" for Hash targets. ** "wiki": Append this to "base" for Wiki targets. ** } ** |
︙ | |||
80 81 82 83 84 85 86 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | - + | static Stmt q; for(i=0; fossil_isalnum(zTarget[i]); i++){} if( zTarget[i]!=':' ) return 0; nCode = i; if( nCode==4 && strncmp(zTarget,"wiki",4)==0 ) return 0; zPage = zTarget + nCode + 1; nPage = (int)strlen(zPage); |
︙ | |||
220 221 222 223 224 225 226 | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | - + | verify_all_options(); if( g.argc<4 ) usage("delete ID ..."); db_begin_write(); db_unprotect(PROTECT_CONFIG); for(i=3; i<g.argc; i++){ const char *zName = g.argv[i]; db_multi_exec( |
︙ |
Changes to src/json.c.
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - - + + - - + - | ** The JSON API's public interface is documented at: ** ** https://fossil-scm.org/fossil/doc/trunk/www/json-api/index.md ** ** Notes for hackers... ** ** Here's how command/page dispatching works: json_page_top() (in HTTP mode) or |
︙ | |||
176 177 178 179 180 181 182 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | - + - | return 0; } /* ** Convenience wrapper around cson_output() which appends the output ** to pDest. pOpt may be NULL, in which case g.json.outOpt will be used. */ |
︙ | |||
708 709 710 711 712 713 714 | 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 | - + - | login_cookie_name(), there is(?) a potential(?) login hijacking window here. We may need to change the JSON auth token to be in the form: login_cookie_name()=... Then again, the hardened cookie value helps ensure that only a proper key/value match is valid. */ |
︙ | |||
906 907 908 909 910 911 912 | 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 | - - + | assert( head != p ); zPart = (char*)fossil_malloc(len+1); memcpy(zPart, head, len); zPart[len] = 0; if(doDeHttp){ dehttpize(zPart); } |
︙ | |||
1089 1090 1091 1092 1093 1094 1095 | 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 | - + | break; } /* g.json.reqPayload exists only to simplify some of our access to the request payload. We currently only use this in the context of Object payloads, not Arrays, strings, etc. */ |
︙ | |||
1118 1119 1120 1121 1122 1123 1124 | 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 | - + | } if(!g.json.jsonp){ g.json.jsonp = json_find_option_cstr("jsonp",NULL,NULL); } if(!g.isHTTP){ |
︙ | |||
1169 1170 1171 1172 1173 1174 1175 | 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 | - + | ** Note that CLI options are not included in the command path. Use ** find_option() to get those. ** */ char const * json_command_arg(unsigned short ndx){ cson_array * ar = g.json.cmd.a; assert((NULL!=ar) && "Internal error. Was json_bootstrap_late() called?"); |
︙ | |||
1195 1196 1197 1198 1199 1200 1201 | 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 | - + - - + - | } } #undef NEXT if(g.json.cmd.offset < 0){ return NULL; }else{ ndx = g.json.cmd.offset + ndx; |
︙ | |||
1297 1298 1299 1300 1301 1302 1303 | 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 | - + - - + - | */ static cson_value * json_response_command_path(){ if(!g.json.cmd.a){ return NULL; }else{ cson_value * rc = NULL; Blob path = empty_blob; |
︙ | |||
1336 1337 1338 1339 1340 1341 1342 | 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 | - + - | */ cson_value * json_g_to_json(){ cson_object * o = NULL; cson_object * pay = NULL; pay = o = cson_new_object(); #define INT(OBJ,K) cson_object_set(o, #K, json_new_int(OBJ.K)) |
︙ | |||
1821 1822 1823 1824 1825 1826 1827 | 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 | - - - - + + + + - | cson_string * kDesc; cson_array_reserve( list, 35 ); kRC = cson_new_string("resultCode",10); kSymbol = cson_new_string("cSymbol",7); kNumber = cson_new_string("number",6); kDesc = cson_new_string("description",11); #define C(K) obj = cson_new_object(); \ |
︙ | |||
2015 2016 2017 2018 2019 2020 2021 | 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 | - + - - + | if( !g.perm.Read ){ json_set_err(FSL_JSON_E_DENIED, "Requires 'o' permissions."); return NULL; } full = json_find_option_bool("full",NULL,"f", json_find_option_bool("verbose",NULL,"v",0)); |
︙ | |||
2078 2079 2080 2081 2082 2083 2084 | 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 | - + - - - + + - + - - + - - + - - + - + - - + - | }/*full*/ n = db_int(0, "SELECT julianday('now') - (SELECT min(mtime) FROM event)" " + 0.99"); cson_object_set(jo, "ageDays", cson_value_new_integer((cson_int_t)n)); cson_object_set(jo, "ageYears", cson_value_new_double(n/365.2425)); sqlite3_snprintf(BufLen, zBuf, db_get("project-code","")); SETBUF(jo, "projectCode"); |
︙ | |||
2253 2254 2255 2256 2257 2258 2259 | 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 | - + - | cson_value * json_page_status(void); /* ** Mapping of names to JSON pages/commands. Each name is a subpath of ** /json (in CGI mode) or a subcommand of the json command in CLI mode */ static const JsonPageDef JsonPageDefs[] = { |
︙ |
Changes to src/json_artifact.c.
︙ | |||
209 210 211 212 213 214 215 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + - | } /* ** Sub-impl of /json/artifact for check-ins. */ static cson_value * json_artifact_ci( cson_object * zParent, int rid ){ if(!g.perm.Read){ |
︙ | |||
249 250 251 252 253 254 255 | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | - + - - + | ** if either the includeContent (HTTP) or -content|-c boolean flags ** (CLI) are set. */ static int json_artifact_get_content_format_flag(void){ enum { MagicValue = -9 }; int contentFormat = json_wiki_get_content_format_flag(MagicValue); if(MagicValue == contentFormat){ |
︙ | |||
380 381 382 383 384 385 386 | 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 | - + - - - + + | ); /* TODO: add a "state" flag for the file in each check-in, e.g. "modified", "new", "deleted". */ checkin_arr = cson_new_array(); cson_object_set(pay, "checkins", cson_array_value(checkin_arr)); while( (SQLITE_ROW==db_step(&q) ) ){ |
︙ |
Changes to src/json_branch.c.
︙ | |||
200 201 202 203 204 205 206 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | - + | Manifest *pParent; /* Parsed parent manifest */ Blob mcksum; /* Self-checksum on the manifest */ int bAutoColor = 0; /* Value of "--bgcolor" is "auto" */ if( fossil_strncmp(zColor, "auto", 4)==0 ) { bAutoColor = 1; zColor = 0; |
︙ | |||
333 334 335 336 337 338 339 | 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 | - + - | } if(!opt.zName){ opt.zName = json_command_arg(g.json.dispatchDepth+1); } if(!opt.zName){ |
︙ |
Changes to src/json_config.c.
︙ | |||
255 256 257 258 259 260 261 | 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | - + | } for(i=0; i<nSetting; ++i){ const Setting *pSet = &aSetting[i]; cson_object * jSet; cson_value * pVal = 0, * pSrc = 0; jSet = cson_new_object(); cson_object_set(pay, pSet->name, cson_object_value(jSet)); |
︙ | |||
290 291 292 293 294 295 296 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | - + | Blob versionedPathname; blob_zero(&versionedPathname); blob_appendf(&versionedPathname, "%s.fossil-settings/%s", g.zLocalRoot, pSet->name); if( file_size(blob_str(&versionedPathname), ExtFILE)>=0 ){ Blob content; blob_zero(&content); |
︙ |
Changes to src/json_finfo.c.
︙ | |||
34 35 36 37 38 39 40 | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | - + - - + - - + + - + | Blob sql = empty_blob; Stmt q = empty_Stmt; char const * zAfter = NULL; char const * zBefore = NULL; int limit = -1; int currentRow = 0; char const * zCheckin = NULL; |
︙ | |||
87 88 89 90 91 92 93 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + - - + - - + - - + - - - + + | ); if( zCheckin && *zCheckin ){ char * zU = NULL; int rc = name_to_uuid2( zCheckin, "ci", &zU ); /*printf("zCheckin=[%s], zU=[%s]", zCheckin, zU);*/ if(rc<=0){ |
Changes to src/json_login.c.
︙ | |||
153 154 155 156 157 158 159 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | - + - - + - | } payload = cson_value_new_object(); po = cson_value_get_object(payload); cson_object_set(po, "authToken", json_new_string(cookie)); free(cookie); cson_object_set(po, "name", json_new_string(name)); cap = db_text(NULL, "SELECT cap FROM user WHERE login=%Q", name); |
︙ |
Changes to src/json_tag.c.
︙ | |||
115 116 117 118 119 120 121 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | - + - | cson_object_set(pay, "raw", cson_value_new_bool(fRaw)); { Blob uu = empty_blob; int rc; blob_append(&uu, zName, -1); rc = name_to_uuid(&uu, 9, "*"); if(0!=rc){ |
︙ |
Changes to src/json_timeline.c.
︙ | |||
141 142 143 144 145 146 147 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - - + + | ** ** If payload is not NULL then on success its "tag" or "branch" ** property is set to the tag/branch name found in the request. ** ** Only one of "tag" or "branch" modes will work at a time, and if ** both are specified, which one takes precedence is unspecified. */ |
︙ | |||
167 168 169 170 171 172 173 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | - + - - + - | zUnhide = json_find_option_cstr("unhide",NULL,NULL); tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='sym-%q'", zTag); if(tagid<=0){ return -1; } if(pPayload){ |
︙ | |||
220 221 222 223 224 225 226 | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | - + | ** of the "after" ("a") or "before" ("b") environment parameters. ** This function gives "after" precedence over "before", and only ** applies one of them. ** ** Returns -1 if it adds a "before" clause, 1 if it adds ** an "after" clause, and 0 if adds only an order-by clause. */ |
︙ | |||
352 353 354 355 356 357 358 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 | - + - + - | cson_object_set(row, "uuid", json_new_string(db_column_text(&q,3))); if(!isNew && (flags & json_get_changed_files_ELIDE_PARENT)){ cson_object_set(row, "parent", json_new_string(db_column_text(&q,4))); } cson_object_set(row, "size", json_new_int(db_column_int(&q,5))); cson_object_set(row, "state", |
︙ | |||
506 507 508 509 510 511 512 | 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 | - + | int const rid = db_column_int(&q,0); cson_value * rowV = json_artifact_for_ci(rid, verboseFlag); cson_object * row = cson_value_get_object(rowV); if(!row){ if( !warnRowToJsonFailed ){ warnRowToJsonFailed = 1; json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED, |
︙ | |||
549 550 551 552 553 554 555 | 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | - + - - + - - | if(check){ json_set_err(check, "Query initialization failed."); goto error; } #if 0 /* only for testing! */ |
︙ | |||
595 596 597 598 599 600 601 | 589 590 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 | - + - - + - | cson_value * payV = NULL; cson_object * pay = NULL; cson_array * list = NULL; int check = 0; Stmt q = empty_Stmt; Blob sql = empty_blob; if( !g.perm.RdWiki && !g.perm.Read ){ |
︙ | |||
660 661 662 663 664 665 666 | 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 | - + - | cson_value * tmp = NULL; cson_value * listV = NULL; cson_array * list = NULL; int check = 0; Stmt q = empty_Stmt; Blob sql = empty_blob; if( !g.perm.RdTkt && !g.perm.Read ){ |
︙ | |||
733 734 735 736 737 738 739 | 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 | - + | } rowV = cson_sqlite3_row_to_object(q.pStmt); row = cson_value_get_object(rowV); if(!row){ manifest_destroy(pMan); json_warn( FSL_JSON_W_ROW_TO_JSON_FAILED, |
︙ |
Changes to src/json_user.c.
︙ | |||
168 169 170 171 172 173 174 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | - + - | ** Requires either Admin, Setup, or Password access. Non-admin/setup ** users can only change their own information. Non-setup users may ** not modify the 's' permission. Admin users without setup ** permissions may not edit any other user who has the 's' permission. ** */ int json_user_update_from_json( cson_object * pUser ){ |
︙ |
Changes to src/json_wiki.c.
︙ | |||
161 162 163 164 165 166 167 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + - | } /* ** Searches for the latest version of a wiki page with the given ** name. If found it behaves like json_get_wiki_page_by_rid(theRid, ** contentFormat), else it returns NULL. */ |
︙ | |||
258 259 260 261 262 263 264 | 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - + | } zPageName = json_find_option_cstr2("name",NULL,"n",g.json.dispatchDepth+1); zSymName = json_find_option_cstr("uuid",NULL,"u"); if((!zPageName||!*zPageName) && (!zSymName || !*zSymName)){ json_set_err(FSL_JSON_E_MISSING_ARGS, |
︙ | |||
296 297 298 299 300 301 302 | 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | - - - + + + - + - + - | zMime = cson_value_get_cstr(cson_object_get(g.json.reqPayload.o, "mimetype")); }else{ sContent = cson_value_get_string(g.json.reqPayload.v); } if(!sContent) { json_set_err(FSL_JSON_E_MISSING_ARGS, |
︙ | |||
346 347 348 349 350 351 352 | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 | - + - | char allowCreateIfNotExists){ Blob content = empty_blob; /* wiki page content */ cson_value * nameV; /* wiki page name */ char const * zPageName; /* cstr form of page name */ cson_value * contentV; /* passed-in content */ cson_value * emptyContent = NULL; /* placeholder for empty content. */ cson_value * payV = NULL; /* payload/return value */ |
︙ |
Changes to src/login.c.
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | - + | #include <time.h> /* ** Compute an appropriate Anti-CSRF token into g.zCsrfToken[]. */ static void login_create_csrf_secret(const char *zSeed){ unsigned char zResult[20]; |
︙ | |||
252 253 254 255 256 257 258 | 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | - + | const char *zLogin = db_column_text(&q,0); if( (uid = login_search_uid(&zLogin, zPasswd) ) != 0 ){ *pzUsername = fossil_strdup(zLogin); break; } } db_finalize(&q); |
︙ | |||
773 774 775 776 777 778 779 | 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 | - + | }else{ zAnonPw = 0; } @ <table class="login_out"> if( P("HTTPS")==0 ){ @ <tr><td class="form_label">Warning:</td> @ <td><span class='securityWarning'> |
︙ | |||
822 823 824 825 826 827 828 | 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 | - + | @ </tr> } @ </table> if( zAnonPw && !noAnon ){ const char *zDecoded = captcha_decode(uSeed); int bAutoCaptcha = db_get_boolean("auto-captcha", 0); char *zCaptcha = captcha_render(zDecoded); |
︙ | |||
851 852 853 854 855 856 857 | 851 852 853 854 855 856 857 858 859 860 861 862 863 864 | - - - | @ for user <b>%h(g.zLogin)</b></p> } if( db_table_exists("repository","forumpost") ){ @ <hr><p> @ <a href="%R/timeline?ss=v&y=f&vfx&u=%t(g.zLogin)">Forum @ post timeline</a> for user <b>%h(g.zLogin)</b></p> } |
︙ | |||
1030 1031 1032 1033 1034 1035 1036 | 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 | - + | uid = login_resetpw_suffix_is_valid(zName); if( uid==0 ){ @ <p><span class="loginError"> @ This password-reset URL is invalid, probably because it has expired. @ Password-reset URLs have a short lifespan. @ </span></p> style_finish_page(); |
︙ | |||
1164 1165 1166 1167 1168 1169 1170 | 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 | - + | pStmt = 0; rc = sqlite3_prepare_v2(pOther, zSQL, -1, &pStmt, 0); if( rc==SQLITE_OK && sqlite3_step(pStmt)==SQLITE_ROW ){ db_unprotect(PROTECT_USER); db_multi_exec( "UPDATE user SET cookie=%Q, cexpire=%.17g" " WHERE login=%Q", |
︙ | |||
1581 1582 1583 1584 1585 1586 1587 | 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 | - + | case 'a': p->Admin = p->RdTkt = p->WrTkt = p->Zip = p->RdWiki = p->WrWiki = p->NewWiki = p->ApndWiki = p->Hyperlink = p->Clone = p->NewTkt = p->Password = p->RdAddr = p->TktFmt = p->Attach = p->ApndTkt = p->ModWiki = p->ModTkt = p->RdForum = p->WrForum = p->ModForum = |
︙ | |||
1828 1829 1830 1831 1832 1833 1834 | 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 | - + | */ void login_insert_csrf_secret(void){ @ <input type="hidden" name="csrf" value="%s(g.zCsrfToken)"> } /* ** Check to see if the candidate username zUserID is already used. |
︙ | |||
1850 1851 1852 1853 1854 1855 1856 | 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 | - + | ** searches for a user or subscriber that has that email address. If the ** email address is used no-where in the system, return 0. If the email ** address is assigned to a particular user return the UID for that user. ** If the email address is used, but not by a particular user, return -1. */ static int email_address_in_use(const char *zEMail){ int uid; |
︙ | |||
1879 1880 1881 1882 1883 1884 1885 | 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 | - + | } return uid; } /* ** COMMAND: test-email-used ** Usage: fossil test-email-used EMAIL ... |
︙ | |||
1904 1905 1906 1907 1908 1909 1910 | 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 | - + | }else{ char *zLogin = db_text(0, "SELECT login FROM user WHERE uid=%d", uid); fossil_print("%s: UID %d (%s)\n", zEMail, uid, zLogin); fossil_free(zLogin); } } } |
︙ | |||
1996 1997 1998 1999 2000 2001 2002 | 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 | - + | zErr = "Incorrect CAPTCHA"; }else if( strlen(zUserID)<6 ){ iErrLine = 1; zErr = "User ID too short. Must be at least 6 characters."; }else if( sqlite3_strglob("*[^-a-zA-Z0-9_.]*",zUserID)==0 ){ iErrLine = 1; zErr = "User ID may not contain spaces or special characters."; |
︙ |
Changes to src/lookslike.c.
︙ | |||
268 269 270 271 272 273 274 | 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | - + | const WCHAR_T *z = (WCHAR_T *)blob_buffer(pContent); unsigned int n = blob_size(pContent); int j, c, flags = LOOK_NONE; /* Assume UTF-16 text, prove otherwise */ if( n%sizeof(WCHAR_T) ){ flags |= LOOK_ODD; /* Odd number of bytes -> binary (UTF-8?) */ } |
︙ |
Changes to src/main.c.
︙ | |||
850 851 852 853 854 855 856 | 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 | - + | zNewArgv[0] = g.argv[0]; zNewArgv[1] = "ui"; zNewArgv[2] = g.argv[1]; zNewArgv[3] = 0; g.argc = 3; g.argv = zNewArgv; #endif |
︙ | |||
1412 1413 1414 1415 1416 1417 1418 | 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 | - + | /* Remove trailing ":443" from the HOST, if any */ if( i>4 && z[i-1]=='3' && z[i-2]=='4' && z[i-3]=='4' && z[i-4]==':' ){ i -= 4; } }else{ /* Remove trailing ":80" from the HOST */ if( i>3 && z[i-1]=='0' && z[i-2]=='8' && z[i-3]==':' ) i -= 3; |
︙ | |||
1612 1613 1614 1615 1616 1617 1618 | 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 | - + | if( db_get_int("redirect-to-https",0)<iLevel ) return 0; if( P("HTTPS")!=0 ) return 0; return 1; } /* ** Redirect to the equivalent HTTPS request if the current connection is |
︙ | |||
1967 1968 1969 1970 1971 1972 1973 | 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 | - + | zPathInfo += 7; g.nExtraURL += 7; cgi_replace_parameter("PATH_INFO", zPathInfo); cgi_replace_parameter("SCRIPT_NAME", zNewScript); etag_cancel(); } |
︙ | |||
2523 2524 2525 2526 2527 2528 2529 | 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 | - + | ** the elements of the built-in skin. If LABEL does not match, ** this directive is a silent no-op. It may alternately be ** an absolute path to a directory which holds skin definition ** files (header.txt, footer.txt, etc.). If LABEL is empty, ** the skin stored in the CONFIG db table is used. */ blob_token(&line, &value); |
︙ | |||
2783 2784 2785 2786 2787 2788 2789 | 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 | - + | ** --nocompress Do not compress HTTP replies ** --nodelay Omit backoffice processing if it would delay ** process exit ** --nojail Drop root privilege but do not enter the chroot jail ** --nossl Do not do http: to https: redirects, regardless of ** the redirect-to-https setting. ** --notfound URL Use URL as the "HTTP 404, object not found" page |
︙ | |||
3063 3064 3065 3066 3067 3068 3069 | 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 | - - - + + + + - - | ** This only works for the "fossil ui" command, not the "fossil server" ** command. ** ** If REPOSITORY begins with a "HOST:" or "USER@HOST:" prefix, then ** the command is run on the remote host specified and the results are ** tunneled back to the local machine via SSH. This feature only works for ** the "fossil ui" command, not the "fossil server" command. The name of the |
︙ | |||
3140 3141 3142 3143 3144 3145 3146 | 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 | - + | ** --nojail Drop root privileges but do not enter the chroot jail ** --nossl Do not force redirects to SSL even if the repository ** setting "redirect-to-https" requests it. This is set ** by default for the "ui" command. ** --notfound URL Redirect to URL if a page is not found. ** -p|--page PAGE Start "ui" on PAGE. ex: --page "timeline?y=ci" ** --pkey FILE Read the private key used for TLS from FILE |
︙ | |||
3174 3175 3176 3177 3178 3179 3180 | 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 | - + | int fCreate = 0; /* The --create flag */ int fNoBrowser = 0; /* Do not auto-launch web-browser */ const char *zInitPage = 0; /* Start on this page. --page option */ int findServerArg = 2; /* argv index for find_server_repository() */ char *zRemote = 0; /* Remote host on which to run "fossil ui" */ const char *zJsMode; /* The --jsmode parameter */ const char *zFossilCmd =0; /* Name of "fossil" binary on remote system */ |
︙ | |||
3324 3325 3326 3327 3328 3329 3330 | 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 | - + - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - + + + + + + + - - + - | }else{ iPort = db_get_int("http-port", 8080); mxPort = iPort+100; } if( isUiCmd && !fNoBrowser ){ char *zBrowserArg; const char *zProtocol = g.httpUseSSL ? "https" : "http"; |
︙ |
Changes to src/main.mk.
︙ | |||
189 190 191 192 193 194 195 | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | - - - - | $(SRCDIR)/../skins/default/details.txt \ $(SRCDIR)/../skins/default/footer.txt \ $(SRCDIR)/../skins/default/header.txt \ $(SRCDIR)/../skins/eagle/css.txt \ $(SRCDIR)/../skins/eagle/details.txt \ $(SRCDIR)/../skins/eagle/footer.txt \ $(SRCDIR)/../skins/eagle/header.txt \ |
︙ |
Changes to src/manifest.c.
︙ | |||
1224 1225 1226 1227 1228 1229 1230 | 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 | - + | ** control artifact. Make a copy, and run it through the official ** artifact parser. This is the slow path, but it is rarely taken. */ blob_init(©, 0, 0); blob_init(&errmsg, 0, 0); blob_append(©, zIn, nIn); pManifest = manifest_parse(©, 0, &errmsg); |
︙ | |||
1336 1337 1338 1339 1340 1341 1342 | 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 | - + | id, blob_str(&err)); nErr++; }else if( !isWF && p!=0 ){ fossil_print("%d ERROR: manifest_is_well_formed() reported false " "but manifest_parse() found nothing wrong.\n", id); nErr++; } |
︙ | |||
2111 2112 2113 2114 2115 2116 2117 | 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 | - + | ** Activate EVENT triggers if they do not already exist. */ void manifest_create_event_triggers(void){ if( manifest_event_triggers_are_enabled ){ return; /* Triggers already exists. No-op. */ } alert_create_trigger(); |
︙ |
Changes to src/markdown.c.
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - + | void (*paragraph)(struct Blob *ob, struct Blob *text, void *opaque); void (*table)(struct Blob *ob, struct Blob *head_row, struct Blob *rows, void *opaque); void (*table_cell)(struct Blob *ob, struct Blob *text, int flags, void *opaque); void (*table_row)(struct Blob *ob, struct Blob *cells, int flags, void *opaque); |
︙ | |||
380 381 382 383 384 385 386 | 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | - - + | /* release the given working buffer back to the cache */ static void release_work_buffer(struct render *rndr, struct Blob *buf){ if( !buf ) return; rndr->iDepth--; blob_reset(buf); |
︙ | |||
1616 1617 1618 1619 1620 1621 1622 | 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 | - + - - - - - - - - - - - - - - - - - - - - - - - - - - + | /* parse_blockquote -- handles parsing of a blockquote fragment */ static size_t parse_blockquote( struct Blob *ob, struct render *rndr, char *data, size_t size ){ |
︙ | |||
1707 1708 1709 1710 1711 1712 1713 | 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 | - + - - - - | ** "end" is left with a value such that data[end] is one byte ** past the first '\n' or one byte past the end of the string */ if( is_empty(data+i, size-i) || (level = is_headerline(data+i, size-i))!= 0 ){ break; } |
︙ | |||
2369 2370 2371 2372 2373 2374 2375 | 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 | - + | beg += parse_blockcode(ob, rndr, txt_data, end); }else if( prefix_uli(txt_data, end) ){ beg += parse_list(ob, rndr, txt_data, end, 0); }else if( prefix_oli(txt_data, end) ){ beg += parse_list(ob, rndr, txt_data, end, MKD_LIST_ORDERED); }else if( has_table && is_tableline(txt_data, end) ){ beg += parse_table(ob, rndr, txt_data, end); |
︙ |
Changes to src/markdown_html.c.
︙ | |||
596 597 598 599 600 601 602 | 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - | }else{ html_escape(ob, blob_buffer(link), blob_size(link)); } blob_append_literal(ob, "</a>"); return 1; } |
︙ | |||
810 811 812 813 814 815 816 | 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 | - - + + | ){ char *zLink = blob_buffer(link); char *zTitle = title!=0 && blob_size(title)>0 ? blob_str(title) : 0; char zClose[20]; if( zLink==0 || zLink[0]==0 ){ zClose[0] = 0; |
︙ |
Changes to src/merge.c.
︙ | |||
134 135 136 137 138 139 140 | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | - + | /* ** Add an entry to the FV table for all files renamed between ** version N and the version specified by vid. */ static void add_renames( const char *zFnCol, /* The FV column for the filename in vid */ int vid, /* The desired version's- RID */ |
︙ | |||
266 267 268 269 270 271 272 | 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | - + | */ void test_show_vfile_cmd(void){ if( g.argc!=2 ){ fossil_fatal("unknown arguments to the %s command\n", g.argv[1]); } verify_all_options(); db_must_be_within_tree(); |
︙ | |||
373 374 375 376 377 378 379 | 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | - + | /* Undocumented --debug and --show-vfile options: ** ** When included on the command-line, --debug causes lots of state ** information to be displayed. This option is undocumented as it ** might change or be eliminated in future releases. ** |
︙ |
Changes to src/merge3.c.
︙ | |||
209 210 211 212 213 214 215 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + | int limit1, limit2; /* Sizes of aC1[] and aC2[] */ int nConflict = 0; /* Number of merge conflicts seen so far */ int useCrLf = 0; int ln1, ln2, lnPivot; /* Line numbers for all files */ DiffConfig DCfg; blob_zero(pOut); /* Merge results stored in pOut */ |
︙ |
Changes to src/name.c.
︙ | |||
208 209 210 211 212 213 214 | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - + | ** Find the RID of the most recent object with symbolic tag zTag ** and having a type that matches zType. ** ** Return 0 if there are no matches. ** ** This is a tricky query to do efficiently. ** If the tag is very common (ex: "trunk") then |
︙ | |||
511 512 513 514 515 516 517 | 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 | - - + + - + | return start_of_branch(rid, 0); } /* start:BR -> The first check-in on branch named BR */ if( strncmp(zTag, "start:", 6)==0 ){ rid = symbolic_name_to_rid(zTag+6, zType); return start_of_branch(rid, 1); |
︙ | |||
818 819 820 821 822 823 824 | 818 819 820 821 822 823 824 825 826 827 828 829 830 831 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | } return rid; } int name_to_rid(const char *zName){ return name_to_typed_rid(zName, "*"); } |
︙ | |||
1116 1117 1118 1119 1120 1121 1122 | 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 | - + | " coalesce(euser,user), coalesce(ecomment,comment)" " FROM mlink, filename, blob, event" " WHERE mlink.fid=%d" " AND filename.fnid=mlink.fnid" " AND event.objid=mlink.mid" " AND blob.rid=mlink.mid" " ORDER BY event.mtime %s /*sort*/", |
︙ | |||
1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 | 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 | + + + + + - - - - + - - - - - - - + | */ void whatis_artifact( const char *zName, /* Symbolic name or full hash */ const char *zFileName,/* Optional: original filename (in file mode) */ const char *zType, /* Artifact type filter */ int mFlags /* WHATIS_* flags */ ){ const char* zNameTitle = "name:"; int rid = symbolic_name_to_rid(zName, zType); if( zFileName ){ fossil_print("%-12s%s\n", zNameTitle, zFileName); zNameTitle = "hash:"; } if( rid<0 ){ Stmt q; int cnt = 0; if( mFlags & WHATIS_REPO ){ fossil_print("\nrepository: %s\n", g.zRepositoryName); } |
︙ |
Changes to src/patch.c.
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - | /* ** Flags passed from the main patch_cmd() routine into subfunctions used ** to implement the various subcommands. */ #define PATCH_DRYRUN 0x0001 #define PATCH_VERBOSE 0x0002 #define PATCH_FORCE 0x0004 |
︙ | |||
70 71 72 73 74 75 76 | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | - + | } /* ** mkdelta(X,Y) ** ** X is an numeric artifact id. Y is a filename. ** |
︙ | |||
131 132 133 134 135 136 137 | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - + - - | SQLITE_TRANSIENT); blob_reset(&x); } /* ** Generate a binary patch file and store it into the file |
︙ | |||
163 164 165 166 167 168 169 | 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | - + | "PRAGMA patch.page_size=512;\n" "CREATE TABLE patch.chng(\n" " pathname TEXT,\n" /* Filename */ " origname TEXT,\n" /* Name before rename. NULL if not renamed */ " hash TEXT,\n" /* Baseline hash. NULL for new files. */ " isexe BOOL,\n" /* True if executable */ " islink BOOL,\n" /* True if is a symbolic link */ |
︙ | |||
197 198 199 200 201 202 203 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | - + | ";", vid, g.zLocalRoot, g.zRepositoryName, g.zLogin); z = fossil_hostname(); if( z ){ db_multi_exec( "INSERT INTO patch.cfg(key,value)VALUES('hostname',%Q)", z); fossil_free(z); } |
︙ | |||
249 250 251 252 253 254 255 | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | - + - - + + - - + - - - - - | if( pData==0 ){ fossil_fatal("out of memory"); } #ifdef _WIN32 fflush(out); _setmode(_fileno(out), _O_BINARY); #endif |
︙ | |||
308 309 310 311 312 313 314 | 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 | - + - + | } /* ** Show a summary of the content of a patch on standard output */ void patch_view(unsigned mFlags){ Stmt q; |
︙ | |||
440 441 442 443 444 445 446 | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | - + | blob_append_escaped_arg(&cmd, g.nameOfExe, 1); if( strcmp(zType,"merge")==0 ){ blob_appendf(&cmd, " merge %s\n", db_column_text(&q,1)); }else{ blob_appendf(&cmd, " merge --%s %s\n", zType, db_column_text(&q,1)); } if( mFlags & PATCH_VERBOSE ){ |
︙ | |||
568 569 570 571 572 573 574 | 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 | - + | }else{ blob_append_escaped_arg(&cmd, g.nameOfExe, 1); blob_appendf(&cmd, " add %$\n", zPathname); if( mFlags & PATCH_VERBOSE ){ fossil_print("%-10s %s\n", "NEW", zPathname); } } |
︙ | |||
671 672 673 674 675 676 677 | 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 | - - + + - + - + - - - + - - + - - - - + - - - - - - - - - - - - - - - - - - - - | static FILE *patch_remote_command( unsigned mFlags, /* flags */ const char *zThisCmd, /* "push" or "pull" */ const char *zRemoteCmd, /* "apply" or "create" */ const char *zFossilCmd, /* Name of "fossil" on remote system */ const char *zRW /* "w" or "r" */ ){ |
︙ | |||
810 811 812 813 814 815 816 | 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 | - + | " FROM patch.chng" " ORDER BY pathname" ); while( db_step(&q)==SQLITE_ROW ){ int rid; const char *zName; Blob a, b; |
︙ | |||
832 833 834 835 836 837 838 | 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 | - - - | fossil_fatal("base artifact %S for file \"%s\" not found", zUuid, zName); } } zName = db_column_text(&q, 1); rid = db_column_int(&q, 0); |
︙ | |||
932 933 934 935 936 937 938 | 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 | - + | ** ** Command-line options: ** ** -f|--force Apply the patch even though there are unsaved ** changes in the current check-out. Unsaved ** changes will be reverted and then the patch is ** applied. |
︙ | |||
967 968 969 970 971 972 973 | 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 | - + | char *zIn; unsigned flags = 0; if( find_option("dry-run","n",0) ) flags |= PATCH_DRYRUN; if( find_option("verbose","v",0) ) flags |= PATCH_VERBOSE; if( find_option("force","f",0) ) flags |= PATCH_FORCE; zIn = patch_find_patch_filename("apply"); db_must_be_within_tree(); |
︙ | |||
996 997 998 999 1000 1001 1002 | 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 | - + - + - - + + - - - - - - - - - - - + - - - - - - - - - - + - + | return; } db_find_and_open_repository(0, 0); if( find_option("force","f",0) ) flags |= PATCH_FORCE; diff_options(&DCfg, zCmd[0]=='g', 0); verify_all_options(); zIn = patch_find_patch_filename("apply"); |
Changes to src/pikchrshow.c.
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - - - - | #include "config.h" #include <assert.h> #include <ctype.h> #include "pikchrshow.h" #if INTERFACE /* These are described in pikchr_process()'s docs. */ |
︙ | |||
137 138 139 140 141 142 143 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | - + | ) & pikFlags){ pikFlags |= PIKCHR_PROCESS_DIV; } if(!(PIKCHR_PROCESS_TH1 & pikFlags) /* If any TH1_xxx flags are set, set TH1 */ && (PIKCHR_PROCESS_TH1_NOSVG & pikFlags || thFlags!=0)){ pikFlags |= PIKCHR_PROCESS_TH1; |
︙ | |||
548 549 550 551 552 553 554 | 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | - + - - | ** ** -div-source Set the 'source' CSS class on the div, which tells ** CSS to hide the SVG and reveal the source by default. ** ** -src Store the input pikchr's source code in the output as ** a separate element adjacent to the SVG one. Implied ** by -div-source. |
︙ | |||
617 618 619 620 621 622 623 | 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | - - - | } if(find_option("div-toggle",0,0)!=0){ pikFlags |= PIKCHR_PROCESS_DIV_TOGGLE; } if(find_option("div-source",0,0)!=0){ pikFlags |= PIKCHR_PROCESS_DIV_SOURCE | PIKCHR_PROCESS_SRC; } |
︙ |
Changes to src/pqueue.c.
︙ | |||
40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | + | ** Integers must be positive. */ struct PQueue { int cnt; /* Number of entries in the queue */ int sz; /* Number of slots in a[] */ struct QueueElement { int id; /* ID of the element */ void *p; /* Content pointer */ double value; /* Value of element. Kept in ascending order */ } *a; }; #endif /* ** Initialize a PQueue structure |
︙ | |||
71 72 73 74 75 76 77 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + + - + + + | p->a = fossil_realloc(p->a, sizeof(p->a[0])*N); p->sz = N; } /* ** Insert element e into the queue. */ |
Changes to src/rebuild.c.
︙ | |||
654 655 656 657 658 659 660 661 662 663 664 665 | 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 | + - + | ** executable in a way that changes the database schema. ** ** Options: ** --analyze Run ANALYZE on the database after rebuilding ** --cluster Compute clusters for unclustered artifacts ** --compress Strive to make the database as small as possible ** --compress-only Skip the rebuilding step. Do --compress only ** --deanalyze Remove ANALYZE tables from the database ** --force Force the rebuild to complete even if errors are seen ** --ifneeded Only do the rebuild if it would change the schema version ** --index Always add in the full-text search index ** --noverify Skip the verification of changes to the BLOB table ** --noindex Always omit the full-text search index |
︙ | |||
688 689 690 691 692 693 694 | 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 | - + | int optIfNeeded; int compressOnlyFlag; omitVerify = find_option("noverify",0,0)!=0; forceFlag = find_option("force","f",0)!=0; doClustering = find_option("cluster", 0, 0)!=0; runVacuum = find_option("vacuum",0,0)!=0; |
︙ | |||
1393 1394 1395 1396 1397 1398 1399 | 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 | - + - | */ verify_cancel(); db_end_transaction(0); fossil_print("project-id: %s\n", db_get("project-code", 0)); fossil_print("server-id: %s\n", db_get("server-code", 0)); zPassword = db_text(0, "SELECT pw FROM user WHERE login=%Q", g.zLogin); |
︙ |
Changes to src/report.c.
︙ | |||
1124 1125 1126 1127 1128 1129 1130 | 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 | - + | char *zClrKey; char *zDesc; char *zMimetype; int tabs; Stmt q; char *zErr1 = 0; char *zErr2 = 0; |
︙ | |||
1366 1367 1368 1369 1370 1371 1372 | 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 | - + - | Stmt q; char *zSql; char *zErr1 = 0; char *zErr2 = 0; int count = 0; int rn; |
︙ |
Changes to src/rss.c.
︙ | |||
141 142 143 144 145 146 147 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | - - + + | blob_append_sql( &bSQL, " ORDER BY event.mtime DESC" ); cgi_set_content_type("application/rss+xml"); zProjectName = db_get("project-name", 0); if( zProjectName==0 ){ |
︙ | |||
256 257 258 259 260 261 262 | 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | - + | ** The default is "URL-PLACEHOLDER" (without quotes). */ void cmd_timeline_rss(void){ Stmt q; int nLine=0; char *zPubDate, *zProjectName, *zProjectDescr, *zFreeProjectName=0; Blob bSQL; |
︙ | |||
330 331 332 333 334 335 336 | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | - + - - - + + - + - | }else if( nTagId!=0 ){ blob_append_sql(&bSQL, " AND (EXISTS(SELECT 1 FROM tagxref" " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid))", nTagId); } if( zFilename ){ blob_append_sql(&bSQL, |
︙ |
Changes to src/search.c.
︙ | |||
581 582 583 584 585 586 587 | 581 582 583 584 585 586 587 588 589 590 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 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | - - - - - + + + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - | ** option can be used to output all matches, regardless of their search ** score. The -limit option can be used to limit the number of entries ** returned. The -width option can be used to set the output width used ** when printing matches. ** ** Options: ** -a|--all Output all matches, not just best matches |
︙ | |||
782 783 784 785 786 787 788 | 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 | - + | ** snip: A snippet for the match ** ** And the srchFlags parameter has been validated. This routine ** fills the X table with search results using a full-scan search. ** ** The companion indexed search routine is search_indexed(). */ |
︙ | |||
990 991 992 993 994 995 996 | 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 | - + | ** snip: A snippet for the match ** ** And the srchFlags parameter has been validated. This routine ** fills the X table with search results using FTS indexed search. ** ** The companion full-scan search routine is search_fullscan(). */ |
︙ | |||
1155 1156 1157 1158 1159 1160 1161 | 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 | - + | } nRow++; @ <li><p><a href='%R%s(zUrl)'>%h(zLabel)</a> if( fDebug ){ @ (%e(db_column_double(&q,3)), %s(db_column_text(&q,4)) } @ <br><span class='snippet'>%z(cleanSnippet(zSnippet)) \ |
︙ | |||
1305 1306 1307 1308 1309 1310 1311 | 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 | - - - - - - - + - - - - - - - - - - - - - - - - + + + + + + + + + + - - + - - - - - + + + + + + + + + - - + + + | } /* ** This is a helper function for search_stext(). Writing into pOut ** the search text obtained from pIn according to zMimetype. ** |
︙ | |||
1389 1390 1391 1392 1393 1394 1395 | 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 | - + | if( fossil_strcmp(zMime,"text/plain")==0 ) zMime = 0; }else if( zMime==0 || eType!=SQLITE_TEXT ){ blob_appendf(pAccum, "%s: %s |\n", zColName, db_column_text(pQuery,i)); }else{ Blob txt; blob_init(&txt, db_column_text(pQuery,i), -1); blob_appendf(pAccum, "%s: ", zColName); |
︙ | |||
1428 1429 1430 1431 1432 1433 1434 | 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 | - + | ){ blob_init(pOut, 0, 0); switch( cType ){ case 'd': { /* Documents */ Blob doc; content_get(rid, &doc); blob_to_utf8_no_bom(&doc, 0); |
︙ | |||
1450 1451 1452 1453 1454 1455 1456 | 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 | - + | blob_appendf(&wiki, "<h1>%h</h1>\n", pWiki->zThreadTitle); } blob_appendf(&wiki, "From %s:\n\n%s", pWiki->zUser, pWiki->zWiki); }else{ blob_init(&wiki, pWiki->zWiki, -1); } get_stext_by_mimetype(&wiki, wiki_filter_mimetypes(pWiki->zMimetype), |
︙ | |||
1480 1481 1482 1483 1484 1485 1486 | 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 | - + | blob_append(pOut, "\n", 1); if( isPlainText ){ db_column_blob(&q, 0, pOut); }else{ Blob x; blob_init(&x,0,0); db_column_blob(&q, 0, &x); |
︙ | |||
1591 1592 1593 1594 1595 1596 1597 | 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 | - + | */ void test_convert_stext(void){ Blob in, out; db_find_and_open_repository(0,0); if( g.argc!=4 ) usage("FILENAME MIMETYPE"); blob_read_from_file(&in, g.argv[2], ExtFILE); blob_init(&out, 0, 0); |
︙ | |||
2378 2379 2380 2381 2382 2383 2384 | 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 | - + | return rc; } /* ** Argument f should be a flag accepted by matchinfo() (a valid character |
︙ |
Changes to src/security_audit.c.
︙ | |||
334 335 336 337 338 339 340 | 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 | - + - + | } /* Anonymous users probably should not be allowed act as moderators ** for wiki or tickets. */ if( hasAnyCap(zAnonCap, "lq5") ){ @ <li><p><b>WARNING:</b> |
︙ | |||
580 581 582 583 584 585 586 | 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | - + | }else { double r = atof(db_get("max-loadavg", 0)); if( r<=0.0 ){ @ <li><p> @ Load average limiting is turned off. This can cause the server @ to bog down if many requests for expensive services (such as @ large diffs or tarballs) arrive at about the same time. |
︙ | |||
602 603 604 605 606 607 608 | 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | - + | @ <li><p> @ The server error log is disabled. @ To set up an error log, if( fossil_strcmp(g.zCmdName, "cgi")==0 ){ @ make an entry like "errorlog: <i>FILENAME</i>" in the @ CGI script at %h(P("SCRIPT_FILENAME")). }else{ |
︙ | |||
633 634 635 636 637 638 639 | 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 | - + - + | @ <li><p> CGI Extensions are enabled with a document root @ at <a href='%R/extfilelist'>%h(g.zExtRoot)</a> holding @ %d(nCgi) CGIs and %d(nFile-nCgi) static content and data files. } if( fileedit_glob()!=0 ){ @ <li><p><a href='%R/fileedit'>Online File Editing</a> is enabled |
︙ | |||
785 786 787 788 789 790 791 | 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 | - + | @ <li><p> @ If the server is running as CGI, then create a line in the CGI file @ like this: @ <blockquote><pre> @ errorlog: <i>FILENAME</i> @ </pre></blockquote> @ <li><p> |
︙ |
Changes to src/setup.c.
︙ | |||
141 142 143 144 145 146 147 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | - + | "Configure URL aliases"); if( setup_user ){ setup_menu_entry("Notification", "setup_notification", "Automatic notifications of changes via outbound email"); setup_menu_entry("Transfers", "xfersetup", "Configure the transfer system for this repository"); } |
︙ | |||
586 587 588 589 590 591 592 | 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 | - + | @ for users who are not logged in. (Property: "require-captcha")</p> @ <hr> entry_attribute("Public pages", 30, "public-pages", "pubpage", "", 0); @ <p>A comma-separated list of glob patterns for pages that are accessible @ without needing a login and using the privileges given by the |
︙ | |||
1199 1200 1201 1202 1203 1204 1205 | 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 | - + | @ choices (such as the hamburger button) to the menu that are not shown @ on this list. (Property: mainmenu) @ <p> if(P("resetMenu")!=0){ db_unset("mainmenu", 0); cgi_delete_parameter("mmenu"); } |
︙ | |||
1227 1228 1229 1230 1231 1232 1233 | 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 | - + | @ If capexpr evaluates to true, then the entry is shown. If not, @ the entry is omitted. "*" is always true. @ </ol> @ @ <p>The default value is blank, meaning no added entries. @ (Property: sitemap-extra) @ <p> |
︙ |
Changes to src/setupuser.c.
︙ | |||
808 809 810 811 812 813 814 | 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 | - + | @ subscript suffix @ indicates the privileges of <span class="usertype">anonymous</span> that @ are inherited by all logged-in users. @ </p></li> @ @ <li><p> @ The "<span class="ueditInheritDeveloper"><sub>D</sub></span>" |
︙ |
Changes to src/sha1.c.
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + - | ** ** Downloaded on 2017-03-01 then repackaged to work with Fossil ** and makeheaders. */ #if FOSSIL_HARDENED_SHA1 #if INTERFACE |
︙ |
Changes to src/sha1hard.c.
︙ | |||
71 72 73 74 75 76 77 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + | void sha1_message_expansion(uint32_t W[80]); void sha1_compression(uint32_t ihv[5], const uint32_t m[16]); void sha1_compression_W(uint32_t ihv[5], const uint32_t W[80]); void sha1_compression_states(uint32_t ihv[5], const uint32_t W[80], uint32_t states[80][5]); extern sha1_recompression_type sha1_recompression_step[80]; typedef void(*collision_block_callback)(uint64_t, const uint32_t*, const uint32_t*, const uint32_t*, const uint32_t*); typedef struct { |
︙ |
Changes to src/sha3.c.
︙ | |||
414 415 416 417 418 419 420 | 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | - + | static void SHA3Update( SHA3Context *p, const unsigned char *aData, unsigned int nData ){ unsigned int i = 0; #if SHA3_BYTEORDER==1234 |
︙ |
Changes to src/shun.c.
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - | void shun_page(void){ Stmt q; int cnt = 0; const char *zUuid = P("uuid"); const char *zShun = P("shun"); const char *zAccept = P("accept"); const char *zRcvid = P("rcvid"); |
︙ | |||
84 85 86 87 88 89 90 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + | } i++; } zCanonical[j+1] = zCanonical[j] = 0; p = zCanonical; while( *p ){ int nUuid = strlen(p); |
︙ | |||
154 155 156 157 158 159 160 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | for( p = zUuid ; *p ; p += strlen(p)+1 ){ @ <a href="%R/artifact/%s(p)">%s(p)</a><br> } @ have been shunned. They will no longer be pushed. @ They will be removed from the repository the next time the repository @ is rebuilt using the <b>fossil rebuild</b> command-line</p> } |
︙ | |||
248 249 250 251 252 253 254 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | - - - - - - | }else if( nRcvid ){ db_prepare(&q, "SELECT uuid FROM blob WHERE rcvid=%d", nRcvid); while( db_step(&q)==SQLITE_ROW ){ @ %s(db_column_text(&q, 0)) } db_finalize(&q); } |
︙ |
Changes to src/sitemap.c.
︙ | |||
79 80 81 82 83 84 85 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | - + | g.jsHref = 0; } srchFlags = search_restrict(SRCH_ALL); if( !isPopup ){ style_header("Site Map"); style_adunit_config(ADUNIT_RIGHT_OK); } |
︙ | |||
150 151 152 153 154 155 156 | 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - + | } @ <li>%z(href("%R/docsrch"))Documentation Search</a></li> } #endif if( inSublist ){ @ </ul> |
︙ |
Changes to src/skins.c.
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - - - - - - - | ** ** Implementation of the Setup page for "skins". */ #include "config.h" #include <assert.h> #include "skins.h" |
︙ | |||
50 51 52 53 54 55 56 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - | } aBuiltinSkin[] = { { "Default", "default", 0 }, { "Ardoise", "ardoise", 0 }, { "Black & White", "black_and_white", 0 }, { "Blitz", "blitz", 0 }, { "Dark Mode", "darkmode", 0 }, { "Eagle", "eagle", 0 }, |
︙ | |||
81 82 83 84 85 86 87 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + - - - - - - - - - - - - - - - - - | static char *zAltSkinDir = 0; static int iDraftSkin = 0; /* ** Used by skin_use_alternative() to store the current skin rank skin ** so that the /skins page can, if warranted, warn the user that skin ** changes won't have any effect. */ |
︙ | |||
147 148 149 150 151 152 153 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | - + - + - - + - - - - + + + - - - - - + - + - - - + - - - - - - - - - - - - - + - | ** preferred ranking, making it otherwise more invasive to tell the ** internals "the --skin flag ranks higher than a URL parameter" (the ** former gets initialized before both URL parameters and the /draft ** path determination). ** ** The rankings were initially defined in ** https://fossil-scm.org/forum/forumpost/caf8c9a8bb |
︙ | |||
263 264 265 266 267 268 269 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | - - - - - - - - - - - - - - - - | Blob x; blob_read_from_file(&x, z, ExtFILE); fossil_free(z); return blob_str(&x); } fossil_free(z); } |
︙ | |||
563 564 565 566 567 568 569 | 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 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 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | - - - - - - - - - - + - - - - - + - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - + - - - - - - - + + + + + - + - - - - - - + + + - - - - - + + - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + - - + + + + + + + + + + + + + - + + - - - - - + + - + - + - - + + - - + - | "VALUES('skin:%q',%Q,now())", zNewName, zCurrent ); db_protect_pop(); return 0; } |
︙ | |||
1032 1033 1034 1035 1036 1037 1038 | 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 | - + | DiffConfig DCfg; construct_diff_flags(1, &DCfg); DCfg.diffFlags |= DIFF_STRIP_EOLCR; if( P("sbsdiff")!=0 ) DCfg.diffFlags |= DIFF_SIDEBYSIDE; blob_init(&to, zContent, -1); blob_init(&from, skin_file_content(zBasis, zFile), -1); blob_zero(&out); |
︙ | |||
1103 1104 1105 1106 1107 1108 1109 | 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 | - - + - | } /* Publish draft iSkin */ for(i=0; i<count(azSkinFile); i++){ char *zNew = db_get_mprintf("", "draft%d-%s", iSkin, azSkinFile[i]); db_set(azSkinFile[i]/*works-like:"x"*/, zNew, 0); } |
︙ | |||
1169 1170 1171 1172 1173 1174 1175 | 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 | - - - | /* Publish the draft skin */ if( P("pub7")!=0 && PB("pub7ck1") && PB("pub7ck2") ){ skin_publish(iSkin); } style_set_current_feature("skins"); style_header("Customize Skin"); |
︙ | |||
1237 1238 1239 1240 1241 1242 1243 | 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 | - - + - | @ <a name='step3'></a> @ <h1>Step 3: Initialize The Draft</h1> @ if( !isEditor ){ @ <p>You are not allowed to initialize draft%d(iSkin). Contact @ the administrator for this repository for more information. }else{ |
︙ | |||
1350 1351 1352 1353 1354 1355 1356 | 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 | - - + + - + - - + + - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ** Show a list of all of the built-in skins, plus the responsitory skin, ** and provide the user with an opportunity to change to any of them. */ void skins_page(void){ int i; char *zBase = fossil_strdup(g.zTop); size_t nBase = strlen(zBase); |
Changes to src/smtp.c.
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | - - + + | ** ** Implementation of SMTP (Simple Mail Transport Protocol) according ** to RFC 5321. */ #include "config.h" #include "smtp.h" #include <assert.h> |
︙ |
Changes to src/sqlcmd.c.
︙ | |||
382 383 384 385 386 387 388 | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | - + | ** files_of_checkin(X) A table-valued function that returns info on ** all files contained in check-in X. Example: ** ** SELECT * FROM files_of_checkin('trunk'); ** ** helptext A virtual table with one row for each command, ** webpage, and setting together with the built-in |
︙ |
Changes to src/stash.c.
︙ | |||
425 426 427 428 429 430 431 | 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | - - - | int rid = db_column_int(&q, 0); int isRemoved = db_column_int(&q, 1); int isLink = db_column_int(&q, 3); const char *zOrig = db_column_text(&q, 4); const char *zNew = db_column_text(&q, 5); char *zOPath = mprintf("%s%s", g.zLocalRoot, zOrig); Blob a, b; |
︙ | |||
570 571 572 573 574 575 576 | 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | - + | stash_tables_exist_and_current(); if( g.argc<=2 ){ zCmd = "save"; }else{ zCmd = g.argv[2]; } nCmd = strlen(zCmd); |
︙ | |||
601 602 603 604 605 606 607 | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 | - + - + | ** we have a copy of the changes before deleting them. */ db_commit_transaction(); g.argv[1] = "revert"; revert_cmd(); fossil_print("stash %d saved\n", stashid); return; }else |
︙ | |||
668 669 670 671 672 673 674 | 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 | - + | db_reset(&q2); } } db_finalize(&q); if( verboseFlag ) db_finalize(&q2); if( n==0 ) fossil_print("empty stash\n"); }else |
︙ | |||
694 695 696 697 698 699 700 | 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 | - + | }else{ undo_begin(); undo_save_stash(0); stash_drop(stashid); undo_finish(); } }else |
︙ | |||
723 724 725 726 727 728 729 | 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 | - + - - - - - - + + + + + + - + | } fossil_free(zCom); fossil_free(zDate); fossil_free(zHash); undo_finish(); if( popped ) stash_drop(stashid); }else |
Changes to src/stat.c.
︙ | |||
555 556 557 558 559 560 561 | 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 | - + | }else{ @ <tr><td width='100%%'>%h(db_column_text(&q,0))</td> @ <td><nobr>%h(db_column_text(&q,1))</nobr></td></tr> } cnt++; } db_finalize(&q); |
︙ | |||
713 714 715 716 717 718 719 | 713 714 715 716 717 718 719 720 721 722 723 724 725 726 | - - - - - - - - - - - - - - - - | void repo_schema_page(void){ Stmt q; Blob sql; const char *zArg = P("n"); login_check_credentials(); if( !g.perm.Admin ){ login_needed(0); return; } |
︙ | |||
773 774 775 776 777 778 779 | 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - + + - - - - - + - - - - - - - - - - - | } @ </pre> db_finalize(&q); }else{ style_submenu_element("Stat1","repo_stat1"); } } |
︙ | |||
932 933 934 935 936 937 938 | 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 | - + - + - + - + - + - + - - + + - + - + | /* ** Gather statistics on artifact types, counts, and sizes. ** ** Only populate the artstat.atype field if the bWithTypes parameter is true. */ void gather_artifact_stats(int bWithTypes){ |
︙ |
Changes to src/statrep.c.
︙ | |||
128 129 130 131 132 133 134 | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | - + | const char *zNot = rc=='n' ? "NOT" : ""; statsReportTimelineYFlag = "ci"; db_multi_exec( "CREATE TEMP VIEW v_reports AS " "SELECT * FROM event WHERE type='ci' AND %s" " AND objid %s IN (SELECT cid FROM plink WHERE NOT isprim)", zTimeSpan/*safe-for-%s*/, zNot/*safe-for-%s*/ |
︙ | |||
307 308 309 310 311 312 313 | 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | - + | zTimeframe, (char)statsReportType); if( zUserName ){ cgi_printf("&u=%t", zUserName); } cgi_printf("'>%s</a>", zTimeframe); } @ </td><td>%d(nCount)</td> |
︙ | |||
738 739 740 741 742 743 744 | 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 | - + | statsReportTimelineYFlag); if( zUserName ){ cgi_printf("&u=%t",zUserName); } cgi_printf("'>%s</a></td>",zWeek); cgi_printf("<td>%d</td>",nCount); |
︙ |
Changes to src/style.c.
︙ | |||
450 451 452 453 454 455 456 | 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 | - + - + | ** or after any updates to the CSS files */ blob_appendf(&url, "?id=%x", skin_id("css")); if( P("once")!=0 && P("skin")!=0 ){ blob_appendf(&url, "&skin=%s&once", skin_in_use()); } |
︙ | |||
595 596 597 598 599 600 601 | 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 | - + | ** The text '$nonce' is replaced by style_nonce() if and whereever it ** occurs in the input string. ** ** The string returned is obtained from fossil_malloc() and ** should be released by the caller. */ char *style_csp(int toHeader){ |
︙ | |||
631 632 633 634 635 636 637 | 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 | - + - + | return zCsp; } /* ** Disable content security policy for the current page. ** WARNING: Do not do this lightly! ** |
︙ | |||
668 669 670 671 672 673 674 | 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 | - + | const char *get_default_header(){ return zDfltHeader; } /* ** The default TCL list that defines the main menu. */ |
︙ | |||
793 794 795 796 797 798 799 | 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 | - - + + | if( !login_is_nobody() ){ Th_Store("login", g.zLogin); } Th_MaybeStore("current_feature", feature_from_page_path(local_zCurrentPage) ); if( g.ftntsIssues[0] || g.ftntsIssues[1] || g.ftntsIssues[2] || g.ftntsIssues[3] ){ char buf[80]; |
︙ | |||
1283 1284 1285 1286 1287 1288 1289 | 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 | - + | ** * $basename ** * $secureurl ** * $home ** * $logo ** * $background ** ** The output from TH1 becomes the style sheet. Fossil always reports |
︙ | |||
1323 1324 1325 1326 1327 1328 1329 | 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 | - + | /* Tell CGI that the content returned by this page is considered cacheable */ g.isConst = 1; } /* ** All possible capabilities */ |
︙ | |||
1477 1478 1479 1480 1481 1482 1483 | 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 | - + | break; } default: { @ CSRF safety = unsafe<br> break; } } |
︙ | |||
1649 1650 1651 1652 1653 1654 1655 | 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 | - + | ** Example: ** ** style_select_list_int("my-grapes", "my_grapes", "Grapes", ** "Select the number of grapes", ** atoi(PD("my_field","0")), ** "", 1, "2", 2, "Three", 3, ** NULL); |
︙ | |||
1773 1774 1775 1776 1777 1778 1779 | 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 | - + | if( z[0]=='/' || z[0]=='\\' ){ zOrigin = z+1; } } CX("<script nonce='%s'>/* %s:%d */\n", style_nonce(), zOrigin, iLine); } |
︙ |
Changes to src/style.fileedit.css.
︙ | |||
75 76 77 78 79 80 81 | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | - - - | } body.fileedit #fileedit-tab-preview-wrapper > pre { margin: 0; } body.fileedit #fileedit-tab-fileselect > h1 { margin: 0; } |
︙ | |||
106 107 108 109 110 111 112 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | + - + | margin: 0.5em; } body.fileedit .tab-container > .tabs > .tab-panel > .fileedit-options > input { vertical-align: middle; margin: 0.5em; } body.fileedit .tab-container > .tabs > .tab-panel > .fileedit-options > .input-with-label { vertical-align: middle; |
︙ |
Changes to src/style.wikiedit.css.
︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | + | margin: 0.5em; } body.wikiedit .tab-container > .tabs > .tab-panel > .wikiedit-options > input { vertical-align: middle; margin: 0.5em; } body.wikiedit .tab-container > .tabs > .tab-panel > .wikiedit-options > .input-with-label { vertical-align: middle; margin: 0 0.5em 0.25em 0.5em; } body.wikiedit label { display: inline; /* some skins set label display to block! */ } body.wikiedit .wikiedit-options > div > * { margin: 0.25em; |
︙ |
Changes to src/sync.c.
︙ | |||
50 51 52 53 54 55 56 | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | - - - - + + + + - - - - - + - - - - - - + + + - - - - - - - - - - - + + - - - + - - - - + - - - + + - - - - - - - + - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - | */ static int client_sync_all_urls( unsigned syncFlags, /* Mask of SYNC_* flags */ unsigned configRcvMask, /* Receive these configuration items */ unsigned configSendMask, /* Send these configuration items */ const char *zAltPCode /* Alternative project code (usually NULL) */ ){ |
︙ | |||
168 169 170 171 172 173 174 | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | - + - + | int configSync = 0; /* configuration changes transferred */ if( g.fNoSync ){ return 0; } zAutosync = db_get_for_subsystem("autosync", zSubsys); if( zAutosync==0 ) zAutosync = "on"; /* defend against misconfig */ if( is_false(zAutosync) ) return 0; |
︙ | |||
274 275 276 277 278 279 280 | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | - - - | } } if( find_option("private",0,0)!=0 ){ *pSyncFlags |= SYNC_PRIVATE; } if( find_option("verbose","v",0)!=0 ){ *pSyncFlags |= SYNC_VERBOSE; |
︙ | |||
343 344 345 346 347 348 349 | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 | - - - - - - | if( g.url.protocol==0 ){ if( urlOptional ) fossil_exit(0); usage("URL"); } user_select(); url_enable_proxy("via proxy: "); *pConfigFlags |= configSync; |
︙ | |||
383 384 385 386 387 388 389 | 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | - + - | ** --project-code CODE Use CODE as the project code ** --proxy PROXY Use the specified HTTP proxy ** -R|--repository REPO Local repository to pull into ** --ssl-identity FILE Local SSL credentials, if requested by remote ** --ssh-command SSH Use SSH as the "ssh" command ** --transport-command CMD Use external command CMD to move messages ** between client and server |
︙ | |||
436 437 438 439 440 441 442 | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 | - + - | ** --proxy PROXY Use the specified HTTP proxy ** --private Push private branches too ** -R|--repository REPO Local repository to push from ** --ssl-identity FILE Local SSL credentials, if requested by remote ** --ssh-command SSH Use SSH as the "ssh" command ** --transport-command CMD Use external command CMD to communicate with ** the server |
︙ | |||
486 487 488 489 490 491 492 | 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - + - | ** --private Sync private branches too ** -R|--repository REPO Local repository to sync with ** --ssl-identity FILE Local SSL credentials, if requested by remote ** --ssh-command SSH Use SSH as the "ssh" command ** --transport-command CMD Use external command CMD to move message ** between the client and the server ** -u|--unversioned Also sync unversioned content |
︙ | |||
520 521 522 523 524 525 526 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - + | ** commands. */ void sync_unversioned(unsigned syncFlags){ unsigned configFlags = 0; (void)find_option("uv-noop",0,0); process_sync_args(&configFlags, &syncFlags, 1, 0); verify_all_options(); |
︙ | |||
573 574 575 576 577 578 579 | 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | - + | ** ** > fossil remote list|ls ** ** Show all remote repository URLs. ** ** > fossil remote off ** |
︙ | |||
635 636 637 638 639 640 641 | 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 | - + | ** ** The last-sync-url is called "default" for the display list. ** ** The last-sync-url might be duplicated into one of the sync-url:NAME ** entries. Thus, when doing a "fossil sync --all" or an autosync with ** autosync=all, each sync-url:NAME entry is checked to see if it is the ** same as last-sync-url and if it is then that entry is skipped. |
︙ |
Changes to src/tag.c.
︙ | |||
42 43 44 45 46 47 48 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + | PQueue queue; /* Queue of check-ins to be tagged */ Stmt s; /* Query the children of :pid to which to propagate */ Stmt ins; /* INSERT INTO tagxref */ Stmt eventupdate; /* UPDATE event */ assert( tagType==0 || tagType==2 ); pqueuex_init(&queue); |
︙ | |||
77 78 79 80 81 82 83 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | - + - + | ); } if( tagid==TAG_BGCOLOR ){ db_prepare(&eventupdate, "UPDATE event SET bgcolor=%Q WHERE objid=:rid", zValue ); } |
︙ | |||
638 639 640 641 642 643 644 | 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 | - + - + | const char *zTagPrefix = find_option("prefix","",1); int nTagType = fRaw ? -1 : 0; if( zTagType!=0 ){ int l = strlen(zTagType); if( strncmp(zTagType,"cancel",l)==0 ){ nTagType = 0; |
︙ |
Changes to src/tar.c.
︙ | |||
242 243 244 245 246 247 248 | 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | - + - | n /= 10; } /* adding the length extended the length field? */ if(blen > next10){ blen++; } /* build the string */ |
︙ |
Changes to src/terminal.c.
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - - - | #include "config.h" #include "terminal.h" #include <assert.h> #ifdef _WIN32 # include <windows.h> #else |
︙ |
Changes to src/th.c.
︙ | |||
2868 2869 2870 2871 2872 2873 2874 | 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 | - - + - - - + + + | /* ** Set the result of the interpreter to the th1 representation of ** the integer iVal and return TH_OK. */ int Th_SetResultInt(Th_Interp *interp, int iVal){ int isNegative = 0; |
︙ |
Changes to src/th_main.c.
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + - | */ #define TH_INIT_NONE ((u32)0x00000000) /* No flags. */ #define TH_INIT_NEED_CONFIG ((u32)0x00000001) /* Open configuration first? */ #define TH_INIT_FORCE_TCL ((u32)0x00000002) /* Force Tcl to be enabled? */ #define TH_INIT_FORCE_RESET ((u32)0x00000004) /* Force TH1 commands re-added? */ #define TH_INIT_FORCE_SETUP ((u32)0x00000008) /* Force eval of setup script? */ #define TH_INIT_NO_REPO ((u32)0x00000010) /* Skip opening repository. */ |
︙ |
Changes to src/th_tcl.c.
︙ | |||
1162 1163 1164 1165 1166 1167 1168 | 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 | - + - - + - | Tcl_DeleteInterp(tclInterp); /* TODO: Redundant? */ tclInterp = 0; return TH_ERROR; } tclContext->interp = tclInterp; if( Tcl_Init(tclInterp)!=TCL_OK ){ Th_ErrorMessage(interp, |
︙ | |||
1194 1195 1196 1197 1198 1199 1200 | 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 | - + - | Tcl_CallWhenDeleted(tclInterp, Th1DeleteProc, interp); Tcl_CreateObjCommand(tclInterp, "th1Eval", Th1EvalObjCmd, interp, NULL); Tcl_CreateObjCommand(tclInterp, "th1Expr", Th1ExprObjCmd, interp, NULL); /* If necessary, evaluate the custom Tcl setup script. */ setup = tclContext->setup; if( setup && Tcl_EvalEx(tclInterp, setup, -1, 0)!=TCL_OK ){ Th_ErrorMessage(interp, |
︙ |
Changes to src/timeline.c.
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - - - - - - - | */ #define TIMELINE_MODE_NONE 0 #define TIMELINE_MODE_BEFORE 1 #define TIMELINE_MODE_AFTER 2 #define TIMELINE_MODE_CHILDREN 3 #define TIMELINE_MODE_PARENTS 4 |
︙ | |||
151 152 153 154 155 156 157 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + | db_bind_int(&q, "$rid", rid); res = db_step(&q)==SQLITE_ROW; db_reset(&q); return res; } /* |
︙ | |||
364 365 366 367 368 369 370 | 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 | - + | int isClosed = 0; if( is_ticket(zTktid, &isClosed) && isClosed ){ zExtraClass = " tktTlClosed"; }else{ zExtraClass = " tktTlOpen"; } fossil_free(zTktid); |
︙ | |||
674 675 676 677 678 679 680 | 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 | - + | cgi_printf(" tags: %h", zTagList); } } if( tmFlags & TIMELINE_SHOWRID ){ int srcId = delta_source_rid(rid); if( srcId ){ |
︙ | |||
1422 1423 1424 1425 1426 1427 1428 | 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 | - + | zIntro = "regular expression "; }else/* if( matchStyle==MS_BRLIST )*/{ zStart = "tagname IN ('sym-"; zDelimiter = "','sym-"; zEnd = "')"; zPrefix = ""; zSuffix = ""; |
︙ | |||
1566 1567 1568 1569 1570 1571 1572 | 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + - - - - - - | } zEDate[j] = 0; /* It looks like this may be a date. Return it with punctuation added. */ return zEDate; } |
︙ | |||
1836 1837 1838 1839 1840 1841 1842 | 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 | - - + - | const char *zBisect = P("bid"); /* Bisect description */ int cpOnly = PB("cherrypicks"); /* Show all cherrypick checkins */ int tmFlags = 0; /* Timeline flags */ const char *zThisTag = 0; /* Suppress links to this tag */ const char *zThisUser = 0; /* Suppress links to this user */ HQuery url; /* URL for various branch links */ int from_rid = name_to_typed_rid(P("from"),"ci"); /* from= for paths */ |
︙ | |||
1918 1919 1920 1921 1922 1923 1924 | 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 | - - - - | } /* Undocumented query parameter to set JS mode */ builtin_set_js_delivery_mode(P("jsmode"),1); secondaryRid = name_to_typed_rid(P("sel2"),"ci"); selectedRid = name_to_typed_rid(P("sel1"),"ci"); |
︙ | |||
1975 1976 1977 1978 1979 1980 1981 | 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 | - - - - - - - - - - - - - - | " WHERE mlink.fid=(SELECT rid FROM blob WHERE uuid LIKE '%q%%')" " AND event.objid=mlink.mid" " ORDER BY event.mtime LIMIT 1", P("cf") ); } |
︙ | |||
2173 2174 2175 2176 2177 2178 2179 | 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 | - - - - - - - - - - - - - - - - - - - - - - + - - - - - - + | if( (tmFlags & TIMELINE_UNHIDE)==0 ){ blob_append_sql(&sql, " AND NOT EXISTS(SELECT 1 FROM tagxref" " WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", TAG_HIDDEN ); } |
︙ | |||
2277 2278 2279 2280 2281 2282 2283 | 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 | - - - - - - + - - - - - - - - - + - - - - + - - - - - - + + + + + - | } tmFlags |= TIMELINE_XMERGE | TIMELINE_FILLGAPS; db_multi_exec("%s", blob_sql_text(&sql)); if( advancedMenu ){ style_submenu_checkbox("v", "Files", (zType[0]!='a' && zType[0]!='c'),0); } nNodeOnPath = db_int(0, "SELECT count(*) FROM temp.pathnode"); |
︙ | |||
2399 2400 2401 2402 2403 2404 2405 | 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 | - + - + | } blob_appendf(&desc, " of %z%h</a>", href("%R/info?name=%h", zCiName), zCiName); if( ridBackTo ){ if( np==0 ){ blob_reset(&desc); |
︙ | |||
2668 2669 2670 2671 2672 2673 2674 | 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 | - - - - - - - - - - - - - - - - - | if( zMark ){ /* If the t=release option is used with m=UUID, then also ** include the UUID check-in in the display list */ int ridMark = name_to_rid(zMark); db_multi_exec( "INSERT OR IGNORE INTO selected_nodes(rid) VALUES(%d)", ridMark); } |
︙ | |||
2853 2854 2855 2856 2857 2858 2859 | 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 | - | } if( PB("showsql") ){ @ <pre>%h(blob_sql_text(&sql2))</pre> } db_multi_exec("%s", blob_sql_text(&sql2)); if( nEntry>0 ){ nEntry -= db_int(0,"select count(*) from timeline"); |
︙ | |||
2912 2913 2914 2915 2916 2917 2918 | 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 | - + | tmFlags |= TIMELINE_CHPICK|TIMELINE_DISJOINT; } if( zUser ){ blob_appendf(&desc, " by user %h", zUser); tmFlags |= TIMELINE_XMERGE | TIMELINE_FILLGAPS; } if( zTagSql ){ |
︙ | |||
3195 3196 3197 3198 3199 3200 3201 | 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 | - + - - - - - - - - | ** 6. mtime ** 7. branch ** 8. event-type: 'ci', 'w', 't', 'f', and so forth. ** 9. comment ** 10. user ** 11. tags */ |
︙ | |||
3303 3304 3305 3306 3307 3308 3309 | 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 | - - + + - | if( zFormat ){ char *zEntry; int nEntryLine = 0; if( nChild==0 ){ sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*LEAF* "); } |
︙ | |||
3345 3346 3347 3348 3349 3350 3351 | 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 | - - - + + + + - + | fossil_print(" DELETED %s\n",zFilename); }else{ fossil_print(" EDITED %s\n", zFilename); } nLine++; /* record another line */ } db_reset(&fchngQuery); |
︙ | |||
3393 3394 3395 3396 3397 3398 3399 | 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 | - + | @ event.type @ , coalesce(ecomment,comment) AS comment0 @ , coalesce(euser,user,'?') AS user0 @ , (SELECT case when length(x)>0 then x else '' end @ FROM (SELECT group_concat(substr(tagname,5), ', ') AS x @ FROM tag, tagxref @ WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid |
︙ | |||
3454 3455 3456 3457 3458 3459 3460 | 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 | - + - + | ** means UTC. ** ** ** Options: ** -b|--branch BRANCH Show only items on the branch named BRANCH ** -c|--current-branch Show only items on the current branch ** -F|--format Entry format. Values "oneline", "medium", and "full" |
︙ | |||
3534 3535 3536 3537 3538 3539 3540 | 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 | - - + + - - - + + - - - + + - + | fossil_fatal("not within an open check-out"); }else{ int vid = db_lget_int("checkout", 0); zBr = db_text(0, "SELECT value FROM tagxref WHERE rid=%d AND tagid=%d", vid, TAG_BRANCH); } } |
︙ |
Changes to src/tkt.c.
︙ | |||
555 556 557 558 559 560 561 | 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 | - + | case SQLITE_CREATE_VIEW: case SQLITE_CREATE_TABLE: { if( sqlite3_stricmp(z2,"main")!=0 && sqlite3_stricmp(z2,"repository")!=0 ){ goto ticket_schema_error; } |
︙ | |||
1211 1212 1213 1214 1215 1216 1217 | 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 | - + | } /* ** WEBPAGE: tkttimeline ** URL: /tkttimeline/TICKETUUID ** ** Show the change history for a single ticket in timeline format. |
︙ |
Changes to src/unicode.c.
︙ | |||
238 239 240 241 242 243 244 | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | - + - | iLo = iTest+1; }else{ iHi = iTest-1; } } assert( key>=aDia[iRes] ); if( bComplex==0 && (aChar[iRes] & 0x80) ) return c; |
︙ |
Changes to src/unversioned.c.
︙ | |||
306 307 308 309 310 311 312 | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | - + | nCmd = (int)strlen(zCmd); if( zMtime==0 ){ mtime = time(0); }else{ mtime = db_int(0, "SELECT strftime('%%s',%Q)", zMtime); if( mtime<=0 ) fossil_fatal("bad timestamp: %Q", zMtime); } |
︙ | |||
338 339 340 341 342 343 344 | 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | - + - + | } blob_init(&file,0,0); blob_read_from_file(&file, g.argv[i], ExtFILE); unversioned_write(zIn, &file, mtime); blob_reset(&file); } db_end_transaction(0); |
︙ | |||
393 394 395 396 397 398 399 | 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - + - + - + | blob_to_lf_only(&content); #endif file_delete(zTFile); if( zMtime==0 ) mtime = time(0); unversioned_write(zUVFile, &content, mtime); db_end_transaction(0); blob_reset(&content); |
︙ | |||
462 463 464 465 466 467 468 | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 | - + - - + + | db_column_text(&q,4), zNoContent ); } } db_finalize(&q); sqlite3_free(zPattern); |
︙ | |||
497 498 499 500 501 502 503 | 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | - + - + | "UPDATE unversioned" " SET hash=NULL, content=NULL, mtime=%lld, sz=0 WHERE name=%Q", mtime, g.argv[i] ); } db_unset("uv-hash", 0); db_end_transaction(0); |
︙ | |||
569 570 571 572 573 574 575 | 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 | - - - - | ); iNow = db_int64(0, "SELECT strftime('%%s','now');"); while( db_step(&q)==SQLITE_ROW ){ const char *zName = db_column_text(&q, 0); sqlite3_int64 mtime = db_column_int(&q, 1); const char *zHash = db_column_text(&q, 2); int isDeleted = zHash==0; |
︙ | |||
610 611 612 613 614 615 616 | 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 638 639 | - + - - | iTotalSz += fullSize; cnt++; @ <td> <a href='%R/uv/%T(zName)'>%h(zName)</a> </td> } @ <td data-sortkey='%016llx(-mtime)'> %s(zAge) </td> @ <td data-sortkey='%08x(fullSize)'> %s(zSzName) </td> @ <td> %h(zLogin) </td> |
︙ |
Changes to src/update.c.
︙ | |||
565 566 567 568 569 570 571 | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | - + | db_finalize(&q); db_finalize(&mtimeXfer); fossil_print("%.79c\n",'-'); if( nUpdate==0 ){ show_common_info(tid, "checkout:", 1, 0); fossil_print("%-13s None. Already up-to-date\n", "changes:"); }else{ |
︙ |
Changes to src/url.c.
︙ | |||
31 32 33 34 35 36 37 | 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - - - - - - - - + + + + + + + + - - - | #endif #endif #if INTERFACE /* ** Flags for url_parse() */ |
︙ | |||
90 91 92 93 94 95 96 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | - + - + | ** path Path name for HTTP or HTTPS. ** user Userid. ** passwd Password. ** hostname HOST:PORT or just HOST if port is the default. ** canonical The URL in canonical form, omitting the password ** ** If URL_USECONFIG is set and zUrl is NULL or "default", then parse the |
︙ | |||
160 161 162 163 164 165 166 167 168 169 170 171 172 173 | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | + + | || strncmp(zUrl, "ssh://", 6)==0 ){ int iStart; char *zLogin; char *zExe; char cQuerySep = '?'; pUrlData->isFile = 0; pUrlData->useProxy = 0; if( zUrl[4]=='s' ){ pUrlData->isHttps = 1; pUrlData->protocol = "https"; pUrlData->dfltPort = 443; iStart = 8; }else if( zUrl[0]=='s' ){ pUrlData->isSsh = 1; |
︙ | |||
254 255 256 257 258 259 260 | 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - - | while( pUrlData->path[i] && pUrlData->path[i]!='&' ){ i++; } } if( pUrlData->path[i] ){ pUrlData->path[i] = 0; i++; } if( fossil_strcmp(zName,"fossil")==0 ){ |
︙ | |||
318 319 320 321 322 323 324 | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | - + | free(zFile); zFile = 0; pUrlData->protocol = "file"; pUrlData->path = mprintf(""); pUrlData->name = mprintf("%b", &cfile); pUrlData->canonical = mprintf("file://%T", pUrlData->name); blob_reset(&cfile); |
︙ | |||
413 414 415 416 417 418 419 | 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | - - - - - - - - - | fossil_free(p->user); fossil_free(p->passwd); fossil_free(p->fossil); fossil_free(p->pwConfig); memset(p, 0, sizeof(*p)); } |
︙ | |||
464 465 466 467 468 469 470 | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | - - - - - - - - - - - - - - - - - - - - - - - - - - | ** set to the CONFIG.NAME value from which that password is taken. Otherwise, ** g.url.pwConfig is NULL. */ void url_parse(const char *zUrl, unsigned int urlFlags){ url_parse_local(zUrl, urlFlags, &g.url); } |
︙ | |||
518 519 520 521 522 523 524 | 480 481 482 483 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 513 | + + + + + + + + + + - + + + + + + + + + + | if( find_option("show-pw",0,0) ) showPw = 1; if( (fg & URL_USE_CONFIG)==0 ) showPw = 1; if( g.argc!=3 && g.argc!=4 ){ usage("URL"); } url_parse(g.argv[2], fg); for(i=0; i<2; i++){ fossil_print("g.url.isFile = %d\n", g.url.isFile); fossil_print("g.url.isHttps = %d\n", g.url.isHttps); fossil_print("g.url.isSsh = %d\n", g.url.isSsh); fossil_print("g.url.protocol = %s\n", g.url.protocol); fossil_print("g.url.name = %s\n", g.url.name); fossil_print("g.url.port = %d\n", g.url.port); fossil_print("g.url.dfltPort = %d\n", g.url.dfltPort); fossil_print("g.url.hostname = %s\n", g.url.hostname); fossil_print("g.url.path = %s\n", g.url.path); fossil_print("g.url.user = %s\n", g.url.user); |
︙ | |||
808 809 810 811 812 813 814 | 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | - + | ** Given a URL for a remote repository clone point, try to come up with a ** reasonable basename of a local clone of that repository. ** ** * If the URL has a path, use the tail of the path, with any suffix ** elided. ** ** * If the URL is just a domain name, without a path, then use the |
︙ |
Changes to src/user.c.
︙ | |||
397 398 399 400 401 402 403 | 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | - + - | } if( g.localOpen ){ db_lset("default-user", g.argv[3]); }else{ db_set("default-user", g.argv[3], 0); } } |
︙ |
Changes to src/vfile.c.
︙ | |||
408 409 410 411 412 413 414 | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | - - + | "original", "output", }; int i, j, n; if( sqlite3_strglob("ci-comment-????????????.txt", zName)==0 ) return 1; for(; zName[0]!=0; zName++){ |
︙ | |||
753 754 755 756 757 758 759 | 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 | - + | md5sum_step_text(" 0\n", -1); continue; } fseek(in, 0L, SEEK_END); sqlite3_snprintf(sizeof(zBuf), zBuf, " %ld\n", ftell(in)); fseek(in, 0L, SEEK_SET); md5sum_step_text(zBuf, -1); |
︙ | |||
1040 1041 1042 1043 1044 1045 1046 | 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 | - + - + | /* Add RID values for merged-in files */ db_multi_exec( "INSERT OR IGNORE INTO idMap(oldrid, newrid)" " SELECT vfile.mrid, blob.rid FROM vfile, blob" " WHERE blob.uuid=vfile.mhash;" ); |
︙ | |||
1068 1069 1070 1071 1072 1073 1074 | 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 | - + - - - - - - - | " UNION SELECT %d" ")" "SELECT group_concat(x,' ') FROM allrid" " WHERE x<>0 AND x NOT IN (SELECT oldrid FROM idMap);", oldVid ); if( zUnresolved[0] ){ |
︙ |
Changes to src/wiki.c.
︙ | |||
83 84 85 86 87 88 89 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | - + | } int wiki_tagid2(const char *zPrefix, const char *zPageName){ return db_int(0, "SELECT tagid FROM tag WHERE tagname='wiki-%q/%q'", zPrefix, zPageName); } /* |
︙ | |||
202 203 204 205 206 207 208 | 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | - - - - + - - - + - | }else if( fossil_strcmp(zMimetype, "text/x-markdown")==0 ){ Blob tail = BLOB_INITIALIZER; markdown_to_html(pWiki, 0, &tail); safe_html(&tail); @ %s(blob_str(&tail)) blob_reset(&tail); }else if( fossil_strcmp(zMimetype, "text/x-pikchr")==0 ){ |
︙ | |||
417 418 419 420 421 422 423 | 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 | - + | /* ** Figure out what type of wiki page we are dealing with. */ int wiki_page_type(const char *zPageName){ if( db_get_boolean("wiki-about",1)==0 ){ return WIKITYPE_NORMAL; }else |
︙ | |||
451 452 453 454 455 456 457 | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | - + | /* ** Add an appropriate style_header() for either the /wiki or /wikiedit page ** for zPageName. zExtra is an empty string for /wiki but has the text ** "Edit: " for /wikiedit. ** ** If the page is /wiki and the page is one of the special times (check-in, |
︙ | |||
473 474 475 476 477 478 479 | 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | - + - | } case WIKITYPE_CHECKIN: { zPageName += 8; if( zExtra[0]==0 && !P("p") ){ cgi_redirectf("%R/info/%s",zPageName); }else{ style_header("Notes About Check-in %S", zPageName); |
︙ | |||
556 557 558 559 560 561 562 | 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | - | int isPopup = P("popup")!=0; char *zBody = mprintf("%s","<i>Empty Page</i>"); int noSubmenu = P("nsm")!=0 || g.isHome; login_check_credentials(); if( !g.perm.RdWiki ){ login_needed(g.anon.RdWiki); return; } zPageName = P("name"); |
︙ | |||
749 750 751 752 753 754 755 | 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 | - + | ** Note that the sandbox is a special case: it is a pseudo-page with ** no rid and the /wikiajax API does not allow anyone to actually save ** a sandbox page, but it is reported as writable here (with rid 0). */ static int wiki_ajax_can_write(const char *zPageName, int * pRid){ int rid = 0; const char * zErr = 0; |
︙ | |||
772 773 774 775 776 777 778 | 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 | - + | }else if(!rid && !g.perm.NewWiki){ zErr = "Requires new-wiki permissions."; }else{ zErr = "Cannot happen! Please report this as a bug."; } } ajax_route_error(403, "%s", zErr); |
︙ | |||
1018 1019 1020 1021 1022 1023 1024 | 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 | - + | ** ** Responds with JSON. On error, an object in the form documented by ** ajax_route_error(). On success, an object in the form documented ** for wiki_ajax_emit_page_object(). */ static void wiki_ajax_route_fetch(void){ const char * zPageName = P("page"); |
︙ | |||
1209 1210 1211 1212 1213 1214 1215 | 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 | - + | } /* ** WEBPAGE: wikiajax hidden ** ** An internal dispatcher for wiki AJAX operations. Not for direct ** client use. All routes defined by this interface are app-internal, |
︙ | |||
1254 1255 1256 1257 1258 1259 1260 | 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 | - - - - - - - - - - - - - - - - | "Referer headers is enabled for XHR " "connections)."); return; } pRoute->xCallback(); } |
︙ | |||
1333 1334 1335 1336 1337 1338 1339 | 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 | - + - + | "Status messages will go here.</div>\n" /* will be moved into the tab container via JS */); CX("<div id='wikiedit-edit-status''>" "<span class='name'></span>" "<span class='links'></span>" "</div>"); |
︙ | |||
1393 1394 1395 1396 1397 1398 1399 | 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 | - + | "<div class='help-buttonlet'>" "Reload the file from the server, discarding " "any local edits. To help avoid accidental loss of " "edits, it requires confirmation (a second click) within " "a few seconds or it will not reload." "</div>" "</div>"); |
︙ | |||
1911 1912 1913 1914 1915 1916 1917 | 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 | - + | ** wsort Sort names by this label ** wrid rid of the most recent version of the page ** wmtime time most recent version was created ** wcnt Number of versions of this wiki page ** ** The wrid value is zero for deleted wiki pages. */ |
︙ | |||
2139 2140 2141 2142 2143 2144 2145 | 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 | - - - - + + + + - + - - + + | if( !rid ) { /* ** At present, technote tags are prefixed with 'sym-', which shouldn't ** be the case, so we check for both with and without the prefix until ** such time as tags have the errant prefix dropped. */ rid = db_int(0, "SELECT e.objid" |
︙ | |||
2488 2489 2490 2491 2492 2493 2494 | 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 | - + | } while( db_step(&q)==SQLITE_ROW ){ const char *zName = db_column_text(&q, 0); const int wrid = db_column_int(&q, 2); if(!showAll && !wrid){ continue; } |
︙ |
Changes to src/wikiformat.c.
︙ | |||
458 459 460 461 462 463 464 | 458 459 460 461 462 463 464 465 466 467 468 469 470 471 | - | int state; /* Flag that govern rendering */ unsigned renderFlags; /* Flags from the client */ int wikiList; /* Current wiki list type */ int inVerbatim; /* True in <verbatim> mode */ int preVerbState; /* Value of state prior to verbatim */ int wantAutoParagraph; /* True if a <p> is desired */ int inAutoParagraph; /* True if within an automatic paragraph */ |
︙ | |||
1780 1781 1782 1783 1784 1785 1786 | 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 | - | }else if( markup.iType==MUTYPE_TD ){ if( backupToType(p, MUTYPE_TABLE|MUTYPE_TR) ){ if( stackTopType(p)==MUTYPE_TABLE ){ pushStack(p, MARKUP_TR); blob_append_string(p->pOut, "<tr>"); } |
︙ | |||
1873 1874 1875 1876 1877 1878 1879 | 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 | - - - - - - - - | ** Options: ** --buttons Set the WIKI_BUTTONS flag ** --htmlonly Set the WIKI_HTMLONLY flag ** --linksonly Set the WIKI_LINKSONLY flag ** --nobadlinks Set the WIKI_NOBADLINKS flag ** --inline Set the WIKI_INLINE flag ** --noblock Set the WIKI_NOBLOCK flag |
︙ | |||
2227 2228 2229 2230 2231 2232 2233 | 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 | - + | iMatchCnt = 1; }else if( n==1 && zStart[0]=='=' && iMatchCnt==1 ){ iMatchCnt = 2; }else if( iMatchCnt==2 ){ if( (zStart[0]=='"' || zStart[0]=='\'') && zStart[n-1]==zStart[0] ){ zStart++; n -= 2; |
︙ |
Changes to src/winhttp.c.
︙ | |||
666 667 668 669 670 671 672 | 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 | - + | fossil_panic("unable to get path to the temporary directory."); } /* Use a subdirectory for temp files (can then be excluded from virus scan) */ zTempSubDirPath = mprintf("%s%s\\",fossil_path_to_utf8(zTmpPath),zTempSubDir); if ( !file_mkdir(zTempSubDirPath, ExtFILE, 0) || file_isdir(zTempSubDirPath, ExtFILE)==1 ){ wcscpy(zTmpPath, fossil_utf8_to_path(zTempSubDirPath, 1)); |
︙ | |||
1370 1371 1372 1373 1374 1375 1376 | 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 | - - - - - - + + + + + + | if( !hScm ) winhttp_fatal("start", zSvcName, win32_get_last_errmsg()); hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS); if( !hSvc ) winhttp_fatal("start", zSvcName, win32_get_last_errmsg()); QueryServiceStatus(hSvc, &sstat); if( sstat.dwCurrentState!=SERVICE_RUNNING ){ fossil_print("Starting service '%s'", zSvcName); |
︙ |
Changes to src/xfer.c.
︙ | |||
353 354 355 356 357 358 359 | 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | - + | } }else{ nullContent = 1; } /* The isWriter flag must be true in order to land the new file */ if( !isWriter ){ |
︙ | |||
1187 1188 1189 1190 1191 1192 1193 | 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 | - + | /* ** The CGI/HTTP preprocessor always redirects requests with a content-type ** of application/x-fossil or application/x-fossil-debug to this page, ** regardless of what path was specified in the HTTP header. This allows ** clone clients to specify a URL that omits default pathnames, such ** as "http://fossil-scm.org/" instead of "http://fossil-scm.org/index.cgi". ** |
︙ | |||
1582 1583 1584 1585 1586 1587 1588 | 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 | - + | xfer.nextIsPrivate = 1; } }else /* pragma NAME VALUE... ** |
︙ | |||
1832 1833 1834 1835 1836 1837 1838 | 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 | - + | const char *zArg = db_column_text(&q, 1); i64 iMtime = db_column_int64(&q, 2); memset(&x, 0, sizeof(x)); url_parse_local(zUrl, URL_OMIT_USER, &x); if( x.name!=0 && sqlite3_strlike("%localhost%", x.name, 0)!=0 ){ @ pragma link %F(x.canonical) %F(zArg) %lld(iMtime) } |
︙ | |||
1857 1858 1859 1860 1861 1862 1863 | 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 | - + | ** ** Usage: %fossil test-xfer ?OPTIONS? XFERFILE ** ** Pass the sync-protocol input file XFERFILE into the server-side sync ** protocol handler. Generate a reply on standard output. ** ** This command was original created to help debug the server side of |
︙ | |||
1925 1926 1927 1928 1929 1930 1931 | 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 | - | #define SYNC_UV_TRACE 0x00400 /* Describe UV activities */ #define SYNC_UV_DRYRUN 0x00800 /* Do not actually exchange files */ #define SYNC_IFABLE 0x01000 /* Inability to sync is not fatal */ #define SYNC_CKIN_LOCK 0x02000 /* Lock the current check-in */ #define SYNC_NOHTTPCOMPRESS 0x04000 /* Do not compression HTTP messages */ #define SYNC_ALLURL 0x08000 /* The --all flag - sync to all URLs */ #define SYNC_SHARE_LINKS 0x10000 /* Request alternate repo links */ |
︙ | |||
1947 1948 1949 1950 1951 1952 1953 | 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 | - + - | ** are pulled if pullFlag is true. A full sync occurs if both are ** true. */ int client_sync( unsigned syncFlags, /* Mask of SYNC_* flags */ unsigned configRcvMask, /* Receive these configuration items */ unsigned configSendMask, /* Send these configuration items */ |
︙ | |||
1988 1989 1990 1991 1992 1993 1994 | 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 | - | int nUvFileRcvd = 0; /* Number of uvfile cards received on this cycle */ sqlite3_int64 mtime; /* Modification time on a UV file */ int autopushFailed = 0; /* Autopush following commit failed if true */ const char *zCkinLock; /* Name of check-in to lock. NULL for none */ const char *zClientId; /* A unique identifier for this check-out */ unsigned int mHttpFlags;/* Flags for the http_exchange() subsystem */ |
︙ | |||
2261 2262 2263 2264 2265 2266 2267 | 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 | - + - - - - - | ** messages unique so that that the login-card nonce will always ** be unique. */ zRandomness = db_text(0, "SELECT hex(randomblob(20))"); blob_appendf(&send, "# %s\n", zRandomness); free(zRandomness); |
︙ | |||
2528 2529 2530 2531 2532 2533 2534 | 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 | - + | if( iStatus>=4 && uvPullOnly==1 ){ fossil_warning( "Warning: uv-pull-only \n" " Unable to push unversioned content because you lack\n" " sufficient permission on the server\n" ); uvPullOnly = 2; |
︙ | |||
2645 2646 2647 2648 2649 2650 2651 | 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 | - + - + | ** The server can send pragmas to try to convey meta-information to ** the client. These are informational only. Unknown pragmas are ** silently ignored. */ if( blob_eq(&xfer.aToken[0], "pragma") && xfer.nToken>=2 ){ /* pragma server-version VERSION ?DATE? ?TIME? ** |
︙ | |||
2852 2853 2854 2855 2856 2857 2858 | 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 | - | }else{ manifest_crosslink_end(MC_PERMIT_HOOKS); content_enable_dephantomize(1); } db_end_transaction(0); }; transport_stats(&nSent, &nRcvd, 1); |
︙ | |||
2883 2884 2885 2886 2887 2888 2889 | 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 | - - | zOpType, nSent, nRcvd, g.zIpAddr); } } if( syncFlags & SYNC_VERBOSE ){ fossil_print( "Uncompressed payload sent: %lld received: %lld\n", nUncSent, nUncRcvd); } |
︙ |
Changes to src/xfersetup.c.
︙ | |||
78 79 80 81 82 83 84 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + | @ <input type="submit" name="sync" value="%h(zButton)"> @ </div></form> @ if( P("sync") ){ user_select(); url_enable_proxy(0); @ <pre class="xfersetup"> |
︙ |
Changes to src/zip.c.
︙ | |||
136 137 138 139 140 141 142 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + | return 512; } static int archiveDeviceCharacteristics(sqlite3_file *pFile){ return 0; } static int archiveOpen( |
︙ | |||
245 246 247 248 249 250 251 | 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | - - + + | ** Append a single file to a growing ZIP archive. ** ** pFile is the file to be appended. zName is the name ** that the file should be saved as. */ static void zip_add_file_to_zip( Archive *p, |
︙ | |||
372 373 374 375 376 377 378 | 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 | - - + + - + - + - - + + | put16(&zExTime[2], 5); blob_append(&toc, zExTime, 9); nEntry++; } static void zip_add_file_to_sqlar( Archive *p, |
︙ | |||
435 436 437 438 439 440 441 | 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 | - + - + - + - - + + | sqlite3_bind_int(p->pInsert, 4, 0); sqlite3_bind_null(p->pInsert, 5); }else{ sqlite3_bind_text(p->pInsert, 1, zName, nName, SQLITE_STATIC); if( mPerm==PERM_LNK ){ sqlite3_bind_int(p->pInsert, 2, 0120755); sqlite3_bind_int(p->pInsert, 4, -1); |
︙ | |||
784 785 786 787 788 789 790 | 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 | - + | " || substr(blob.uuid, 1, 10)" " FROM event, blob" " WHERE event.objid=%d" " AND blob.rid=%d", db_get("project-name", "unnamed"), rid, rid ); } |
︙ | |||
945 946 947 948 949 950 951 | 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 | - + - + | zInclude = P("in"); if( zInclude ) pInclude = glob_create(zInclude); zExclude = P("ex"); if( zExclude ) pExclude = glob_create(zExclude); if( zInclude==0 && zExclude==0 ){ etag_check_for_invariant_name(z); } |
︙ |
Changes to test/amend.test.
︙ | |||
304 305 306 307 308 309 310 311 312 313 | 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | + - - - | set t5exp "*" foreach tag $tagt { lappend tags -tag $tag lappend cancels -cancel $tag } foreach res $result { append t1exp ", $res" append t2exp "sym-$res*" append t3exp "Add*tag*\"$res\".*" append t5exp "Cancel*tag*\"$res\".*" } |
︙ |
Changes to test/commit-warning.test.
︙ | |||
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 | + + + + + + + + + + + + | # of source files that MUST NEVER BE TEXT. # test_block_in_checkout pre-commit-warnings-fossil-1 { fossil test-commit-warning --no-settings } { test pre-commit-warnings-fossil-1 {[normalize_result] eq \ [subst -nocommands -novariables [string trim { 1\tart/branching.odp\tbinary data 1\tart/concept1.dia\tbinary data 1\tart/concept2.dia\tbinary data 1\tcompat/zlib/contrib/blast/test.pk\tbinary data 1\tcompat/zlib/contrib/dotzlib/DotZLib.build\tCR/LF line endings 1\tcompat/zlib/contrib/dotzlib/DotZLib.chm\tbinary data 1\tcompat/zlib/contrib/dotzlib/DotZLib.sln\tCR/LF line endings 1\tcompat/zlib/contrib/dotzlib/DotZLib/AssemblyInfo.cs\tCR/LF line endings 1\tcompat/zlib/contrib/dotzlib/DotZLib/ChecksumImpl.cs\tinvalid UTF-8 1\tcompat/zlib/contrib/dotzlib/DotZLib/CircularBuffer.cs\tinvalid UTF-8 1\tcompat/zlib/contrib/dotzlib/DotZLib/CodecBase.cs\tinvalid UTF-8 1\tcompat/zlib/contrib/dotzlib/DotZLib/Deflater.cs\tinvalid UTF-8 1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.cs\tinvalid UTF-8 1\tcompat/zlib/contrib/dotzlib/DotZLib/DotZLib.csproj\tCR/LF line endings 1\tcompat/zlib/contrib/dotzlib/DotZLib/GZipStream.cs\tinvalid UTF-8 1\tcompat/zlib/contrib/dotzlib/DotZLib/Inflater.cs\tinvalid UTF-8 1\tcompat/zlib/contrib/dotzlib/DotZLib/UnitTests.cs\tCR/LF line endings 1\tcompat/zlib/contrib/dotzlib/LICENSE_1_0.txt\tCR/LF line endings 1\tcompat/zlib/contrib/dotzlib/readme.txt\tCR/LF line endings 1\tcompat/zlib/contrib/gcc_gvmat64/gvmat64.S\tCR/LF line endings 1\tcompat/zlib/contrib/masmx64/bld_ml64.bat\tCR/LF line endings 1\tcompat/zlib/contrib/masmx64/gvmat64.asm\tCR/LF line endings 1\tcompat/zlib/contrib/masmx64/inffas8664.c\tCR/LF line endings 1\tcompat/zlib/contrib/masmx64/inffasx64.asm\tCR/LF line endings 1\tcompat/zlib/contrib/masmx64/readme.txt\tCR/LF line endings 1\tcompat/zlib/contrib/masmx86/bld_ml32.bat\tCR/LF line endings 1\tcompat/zlib/contrib/masmx86/inffas32.asm\tCR/LF line endings 1\tcompat/zlib/contrib/masmx86/match686.asm\tCR/LF line endings 1\tcompat/zlib/contrib/masmx86/readme.txt\tCR/LF line endings 1\tcompat/zlib/contrib/puff/zeros.raw\tbinary data 1\tcompat/zlib/contrib/testzlib/testzlib.c\tCR/LF line endings 1\tcompat/zlib/contrib/testzlib/testzlib.txt\tCR/LF line endings 1\tcompat/zlib/contrib/vstudio/readme.txt\tCR/LF line endings 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj\tCR/LF line endings 1\tcompat/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters\tCR/LF line endings 1\tcompat/zlib/contrib/vstudio/vc10/minizip.vcxproj\tCR/LF line endings |
︙ | |||
229 230 231 232 233 234 235 | 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | - + | 1\tcompat/zlib/contrib/vstudio/vc9/zlibstat.vcproj\tCR/LF line endings 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.def\tCR/LF line endings 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.sln\tCR/LF line endings 1\tcompat/zlib/contrib/vstudio/vc9/zlibvc.vcproj\tCR/LF line endings 1\tcompat/zlib/win32/zlib.def\tCR/LF line endings 1\tcompat/zlib/zlib.3.pdf\tbinary data 1\tcompat/zlib/zlib.map\tCR/LF line endings |
︙ |
Changes to test/delta1.test.
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | # Use test script files as the basis for this test. # # For each test, copy the file intact to "./t1". Make # some random changes in "./t2". Then call test-delta on the # two files to make sure that deltas between these two files # work properly. # |
︙ |
Changes to test/diff.test.
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | test diff-file5-1 {[normalize_result] eq {Index: file5.dat ================================================================== --- file5.dat +++ file5.dat cannot compute difference between binary files}} |
Changes to test/fake-editor.tcl.
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | - - - - - | return "" } ############################################################################### set fileName [lindex $argv 0] |
︙ |
Changes to test/json.test.
︙ | |||
175 176 177 178 179 180 181 | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | - - - - - - - - | proc test_json_payload {testname okfields badfields} { test_dict_keys $testname [dict get $::JR payload] $okfields $badfields } #### VERSION AKA HAI # The JSON API generally assumes we have a respository, so let it have one. |
︙ | |||
282 283 284 285 286 287 288 | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 | - + | test_json_payload json-login-a {authToken name capabilities loginCookieName} {} set AuthAnon [dict get $JR payload] proc test_hascaps {testname need caps} { foreach n [split $need {}] { test $testname-$n {[string first $n $caps] >= 0} } } |
︙ | |||
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 | 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 | + - - - - - - | # Fossil repository db file could not be found. fossil close fossil_json HAI -expectError test json-RC-4102-CLI-exit {$CODE != 0} test_json_envelope json-RC-4102-CLI-exit {fossil timestamp command procTimeUs \ procTimeMs resultCode resultText} {payload} test json-RC-4102 {[dict get $JR resultCode] eq "FOSSIL-4102"} fossil open .rep.fossil # FOSSIL-4103 FSL_JSON_E_DB_NOT_VALID # Fossil repository db file is not valid. write_file nope.fossil { This is not a fossil repo. It ought to be a SQLite db with a well-known schema, but it is actually just a block of text. } fossil_json HAI -R nope.fossil -expectError test json-RC-4103-CLI-exit {$CODE != 0} if { $JR ne "" } { test_json_envelope json-RC-4103-CLI {fossil timestamp command procTimeUs \ procTimeMs resultCode resultText} {payload} test json-RC-4103 {[dict get $JR resultCode] eq "FOSSIL-4103"} } else { test json-RC-4103 0 knownBug } ############################################################################### test_cleanup |
Changes to test/merge1.test.
︙ | |||
71 72 73 74 75 76 77 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + - + - + - + - + - + - + - + - + - + | 111 - This is line one OF the demo program - 1111 222 - The second line program line in code - 2222 333 - This is a test of the merging algohm - 3333 444 - If all goes well, we will be pleased - 4444 555 - we think it well and other stuff too - 5555 } write_file_indented t23 { |
︙ | |||
156 157 158 159 160 161 162 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - - + + - + - + - + - + - - + + - + - + | write_file_indented t3 { 222 - The second line program line in code - 2222 333 - This is a test of the merging algohm - 3333 444 - If all goes well, we will be pleased - 4444 555 - we think it well and other stuff too - 5555 } write_file_indented t32 { |
︙ | |||
295 296 297 298 299 300 301 | 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | - + - + - + - + - + | KLMN OPQR STUV XYZ. } write_file_indented t23 { abcd |
︙ | |||
363 364 365 366 367 368 369 | 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 | - + - + - + - + - + | KLMN OPQR STUV XYZ. } write_file_indented t23 { abcd |
Changes to test/merge2.test.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | - + | ############################################################################ # # Tests of the delta mechanism. # test_setup "" |
︙ |
Changes to test/merge3.test.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - + - + - - - + + - - + - - - + - - - + - | ############################################################################ # # Tests of the 3-way merge # test_setup "" |
︙ | |||
72 73 74 75 76 77 78 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | - + - + - + - + - + - + | 1 2 3 4 5 6 7 8 9 } { 1 2 3b 4b 5b 6 7 8 9 } { 1 2 3 4 5c 6 7 8 9 } { 1 2 MINE: 3b 4b 5b COM: 3 4 5 YOURS: 3 4 5c END 6 7 8 9 |
︙ | |||
145 146 147 148 149 150 151 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | - + | 1 2 3 4 5 6 7 8 9 } { 1 2 3b 4b 5 6 7 8b 9b } { 1 2 3b 4c 5 6c 7c 8 9 } { 1 2 MINE: 3b 4b COM: 3 4 YOURS: 3b 4c END 5 6c 7c 8b 9b |
︙ | |||
200 201 202 203 204 205 206 | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - + - + | 1 2 3 4 5 6 7 8 9 } { 1 6 7 8 9 } { 1 2 3 4 9 } { 1 MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9 |
︙ | |||
255 256 257 258 259 260 261 | 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | - + - + | 1 2 3 4 5 6 7 8 9 } { 1 2 3 4 9 } { 1 6 7 8 9 } { 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END 9 |
︙ | |||
310 311 312 313 314 315 316 | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | - + - + | 2 3 4 5 6 7 8 } { 6 7 8 } { 2 3 4 } { MINE: 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END |
︙ | |||
364 365 366 367 368 369 370 | 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | - + - + | 2 3 4 5 6 7 8 } { 2 3 4 } { 6 7 8 } { MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 6 7 8 END |
︙ | |||
419 420 421 422 423 424 425 | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | - + - + | 1 2 3 4 5 6 7 8 9 } { 1 2b 3b 4b 5b 6 7 8 9 } { 1 2 3 4 9 } { 1 MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END 9 |
︙ | |||
474 475 476 477 478 479 480 | 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 | - + - + | 1 2 3 4 5 6 7 8 9 } { 1 2 3 4 9 } { 1 2b 3b 4b 5b 6 7 8 9 } { 1 MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END 9 |
︙ | |||
529 530 531 532 533 534 535 | 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 | - + - + | 2 3 4 5 6 7 8 } { 2b 3b 4b 5b 6 7 8 } { 2 3 4 } { MINE: 2b 3b 4b 5b 6 7 8 COM: 2 3 4 5 6 7 8 YOURS: 2 3 4 END |
︙ | |||
584 585 586 587 588 589 590 | 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 | - + - + | 2 3 4 5 6 7 8 } { 2 3 4 } { 2b 3b 4b 5b 6 7 8 } { MINE: 2 3 4 COM: 2 3 4 5 6 7 8 YOURS: 2b 3b 4b 5b 6 7 8 END |
︙ | |||
630 631 632 633 634 635 636 | 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 | - + - + | 1 2 3 4 5 6 7 8 9 } { 1 2 3 4 5 7 8 9b } { 1 2 3 4 5 7 8 9b a b c d e } { 1 2 3 4 5 7 8 MINE: 9b COM: 9 YOURS: 9b a b c d e END |
Changes to test/merge4.test.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + - - + + - - + + - - + + | ############################################################################ # # Tests of the 3-way merge # test_setup "" |
︙ | |||
59 60 61 62 63 64 65 | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | - + | 1 2b 3b 4b 5 6b 7b 8b 9 } { 1 2 3 4c 5c 6c 7 8 9 } { 1 > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < 9 } { 1 > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < 9 |
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | - + | 2b 3b 4b 5 6b 7b 8b } { 2 3 4c 5c 6c 7 8 } { > 2b 3b 4b 5 6b 7b 8b = 2 3 4c 5c 6c 7 8 < } { > 2 3 4c 5c 6c 7 8 = 2b 3b 4b 5 6b 7b 8b < |
︙ |
Changes to test/merge5.test.
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | - - + - | # http://www.hwaci.com/drh/ # ############################################################################ # # Tests of the "merge" command # |
︙ |
Changes to test/merge_renames.test.
︙ | |||
260 261 262 263 264 265 266 | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | - + - - + - + - - + | fossil update trunk write_file f1 "f1.2" fossil add f1 fossil commit -b b2 -m "add f1" fossil update trunk fossil merge b1 |
︙ | |||
308 309 310 311 312 313 314 | 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | - - + + - + | ADDED f1 } test_status_list merge_renames-9-1 $RESULT $expectedMerge fossil changes test_status_list merge_renames-9-2 $RESULT " MERGED_WITH [commit_id b] ADDED_BY_MERGE f1 |
︙ | |||
368 369 370 371 372 373 374 | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | - - + + | test_status_list merge_renames-10-4 $RESULT { RENAME f1 -> f2 RENAME f2 -> f1 } test_file_contents merge_renames-10-5 f1 "f1" test_file_contents merge_renames-10-6 f2 "f2" test_status_list merge_renames-10-7 [fossil changes] " |
︙ | |||
495 496 497 498 499 500 501 | 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | - + | ADD f2 } fossil merge trunk fossil commit -m "merge trunk" --tag c4 fossil mv --hard f2 f2n test_status_list merge_renames-13-3 $RESULT " RENAME f2 f2n |
︙ |
Changes to test/merge_warn.test.
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | - + - - + - - - + + + + | write_file f4 "f4" fossil add f4 fossil commit -m "add f4" fossil update trunk write_file f1 "f1.1" write_file f3 "f3.1" |
︙ |
Changes to test/release-checklist.wiki.
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | + - - + + | <li><p> Shift-click on each of the links in [./fileage-test-1.wiki] and verify correct operation of the file-age computation. <li><p> Verify correct name-change tracking behavior (no net changes) for: <blockquote><b> |
︙ |
Changes to test/revert.test.
︙ | |||
96 97 98 99 100 101 102 | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - + - + - + | # Test with a single filename argument # revert-test 1-2 f0 { UNMANAGE f0 } -changes { DELETED f1 EDITED f2 |
︙ |
Deleted test/rewrite-test-output.tcl.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to test/set-manifest.test.
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | - + - + | test_setup #### Verify classic behavior of the manifest setting # Setting is off by default, and there are no extra files. fossil settings manifest test "set-manifest-1" {[regexp {^manifest *$} $RESULT]} |
︙ | |||
86 87 88 89 90 91 92 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | - + - + - + | # Classic behavior: FALSE value removes manifest and manifest.uuid set falses [list false off 0] foreach v $falses { fossil settings manifest $v test "set-manifest-3-$v" {$RESULT eq ""} fossil settings manifest test "set-manifest-3-$v-a" {[regexp "^manifest\\s+\\(local\\)\\s+$v\\s*$" $RESULT]} |
︙ |
Changes to test/settings-repo.test.
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - - - - + - - + - + - + - + - + - + - + - + | set all_settings [get_all_settings] foreach name $all_settings { # # HACK: Make 100% sure that there are no non-default setting values # present anywhere. # |
︙ | |||
244 245 246 247 248 249 250 | 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | - + | [regexp -- [string map [list %name% $name] $pattern(5)] $data] } fossil test-th-eval --open-config "setting $name" set data [normalize_result] test settings-set-check2-versionable-$name { |
︙ |
Changes to test/settings.test.
︙ | |||
90 91 92 93 94 95 96 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - - - - + - - + - + | set data [normalize_result] test settings-query-local-$name { [regexp -- [string map [list %name% $name] $pattern(1)] $data] || [regexp -- [string map [list %name% $name] $pattern(2)] $data] } |
Changes to test/stash.test.
︙ | |||
139 140 141 142 143 144 145 | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | - + - + | test stash-1-list-1 {[regexp {^1: \[[0-9a-z]+\] on } [first_data_line]]} test stash-1-list-2 {[regexp {^\s+stash 1\s*$} [second_data_line]]} set diff_stash_1 {DELETE f1 Index: f1 ================================================================== --- f1 |
︙ | |||
183 184 185 186 187 188 189 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | - + - + | UPDATE f2 UPDATE f3n ADDED f0 } -changes { ADDED f0 MISSING f1 EDITED f2 |
︙ | |||
263 264 265 266 267 268 269 | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | - + | ADDED f3 } -exists {f1 f2 f3} -notexists {} #fossil status fossil stash show test stash-3-1-show {[normalize_result] eq {ADDED f3 Index: f3 ================================================================== |
︙ | |||
290 291 292 293 294 295 296 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | - + - + | fossil commit -m "baseline" fossil mv --hard f2 f2n test_result_state stash-3-2-mv "mv --hard f2 f2n" [concat { RENAME f2 f2n MOVED_FILE} [file normalize f2] { }] -changes { |
︙ | |||
366 367 368 369 370 371 372 | 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | - + | file rename -force f3 f3n fossil mv f3 f3n stash-test 4-3 {snapshot -m "snap 3"} { } -changes { ADDED f0 DELETED f1 EDITED f2 |
︙ |
Changes to test/symlinks.test.
︙ | |||
20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | + + + + + + + - - - | set path [file dirname [info script]] if {$is_windows} { puts "Symlinks are not supported on Windows." test_cleanup_then_return } fossil test-th-eval --open-config "setting allow-symlinks" if {![string is true -strict [normalize_result]]} { puts "Symlinks are not enabled." test_cleanup_then_return } require_no_open_checkout ############################################################################### test_setup; set rootDir [file normalize [pwd]] |
︙ | |||
56 57 58 59 60 61 62 | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - - - - + - - - - + - + - + - - + + | test symlinks-dir-1 {[file exists [file join $rootDir subdirA f1.txt]] eq 1} test symlinks-dir-2 {[file exists [file join $rootDir symdirA f1.txt]] eq 1} test symlinks-dir-3 {[file exists [file join $rootDir subdirA f2.txt]] eq 1} test symlinks-dir-4 {[file exists [file join $rootDir symdirA f2.txt]] eq 1} fossil add [file join $rootDir symdirA f1.txt] |
Changes to test/tester.tcl.
︙ | |||
18 19 20 21 22 23 24 | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - - - - - - | # This is the main test script. To run a regression test, do this: # # tclsh ../test/tester.tcl ../bld/fossil # # Where ../test/tester.tcl is the name of this file and ../bld/fossil # is the name of the executable to be tested. # |
︙ | |||
282 283 284 285 286 287 288 | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | - - - - - - - - - | # set result [list \ access-log \ admin-log \ allow-symlinks \ auto-captcha \ auto-hyperlink \ |
︙ | |||
446 447 448 449 450 451 452 | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | - - | proc require_no_open_checkout {} { if {[info exists ::env(FOSSIL_TEST_DANGEROUS_IGNORE_OPEN_CHECKOUT)] && \ $::env(FOSSIL_TEST_DANGEROUS_IGNORE_OPEN_CHECKOUT) eq "YES_DO_IT"} { return } catch {exec $::fossilexe info} res if {[regexp {local-root:} $res]} { |
︙ | |||
485 486 487 488 489 490 491 | 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | - - - + - - - - | } after [expr {$try * 100}] } error "Could not delete \"$path\", error: $error" } proc test_cleanup_then_return {} { |
︙ | |||
525 526 527 528 529 530 531 | 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 | - + | # Finally, attempt to gracefully delete the temporary home directory, # unless forbidden by external forces. if {![info exists ::tempKeepHome]} {delete_temporary_home} } proc delete_temporary_home {} { if {$::KEEP} {return}; # All cleanup disabled? |
︙ | |||
852 853 854 855 856 857 858 | 829 830 831 832 833 834 835 836 837 838 839 840 841 842 | - | lappend bad_test $name if {$::HALT} {exit 1} } } } set bad_test {} set ignored_test {} |
︙ | |||
1017 1018 1019 1020 1021 1022 1023 | 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 | - + | set inFileName [file join $::tempPath [appendArgs test-http-in- $suffix]] set outFileName [file join $::tempPath [appendArgs test-http-out- $suffix]] set data [subst [read_file $dataFileName]] write_file $inFileName $data fossil http --in $inFileName --out $outFileName --ipaddr 127.0.0.1 \ |
︙ | |||
1094 1095 1096 1097 1098 1099 1100 | 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 | - - - - - - - - - - - - - - - - - - - - - - - - - - | } error] != 0} { error "Could not write file \"$tempFile\" in directory \"$tempPath\",\ please set TEMP variable in environment, error: $error" } set tempHomePath [file join $tempPath home_[pid]] |
Changes to test/th1-docs.test.
︙ | |||
27 28 29 30 31 32 33 34 35 36 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | + + + + + + + + - + + - + + - - - - - - - - - + - - - - + + + + + | fossil test-th-eval "hasfeature tcl" if {[normalize_result] ne "1"} { puts "Fossil was not compiled with Tcl support." test_cleanup_then_return } if {$::outside_fossil_repo} { puts "Skipping th1-docs-* tests: not in Fossil repo checkout." test_cleanup_then_return } elseif ($::dirty_ckout) { puts "Skipping th1-docs-* tests: uncommitted changes in Fossil checkout." test_cleanup_then_return } ############################################################################### |
Changes to test/th1-hooks.test.
︙ | |||
144 145 146 147 148 149 150 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + | test th1-cmd-hooks-1b {[normalize_result] eq \ {<h1><b>command_hook timeline</b></h1> +++ some stuff here +++ <h1><b>command_hook timeline command_notify timeline</b></h1>}} ############################################################################### |
︙ | |||
194 195 196 197 198 199 200 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | - + | fossil test3 test th1-custom-cmd-3a {[string trim $RESULT] eq \ {<h1><b>command_hook test3</b></h1>}} ############################################################################### |
︙ |
Changes to test/th1-tcl.test.
︙ | |||
75 76 77 78 79 80 81 | 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - + - + - - + + - + - + - - + + - + - - - - - - - - + | } ############################################################################### fossil test-th-render --open-config \ [file nativename [file join $path th1-tcl3.txt]] |
︙ |
Changes to test/th1.test.
︙ | |||
728 729 730 731 732 733 734 | 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 | - + - + - - + + - + - + - - + + - + - - | ############################################################################### fossil test-th-eval "trace {}" test th1-trace-1 {$RESULT eq {}} ############################################################################### |
︙ | |||
1021 1022 1023 1024 1025 1026 1027 | 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 | - + | ############################################################################### fossil test-th-eval "globalState vfs" test th1-globalState-14 {[string length $RESULT] == 0} ############################################################################### |
︙ | |||
1062 1063 1064 1065 1066 1067 1068 | 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 | - - - - + + + + | set sorted_result [lsort $RESULT] protOut "Sorted: $sorted_result" set base_commands {anoncap anycap array artifact break breakpoint \ builtin_request_js capexpr captureTh1 catch cgiHeaderLine checkout \ combobox continue copybtn date decorate defHeader dir enable_htmlify \ enable_output encode64 error expr for foreach getParameter glob_match \ globalState hascap hasfeature html htmlize http httpize if info \ |
︙ |
Changes to test/unversioned.test.
︙ | |||
25 26 27 28 29 30 31 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - - - - - - - - - - - + - + | test_cleanup_then_return } require_no_open_checkout test_setup; set rootDir [file normalize [pwd]] |
︙ | |||
320 321 322 323 324 325 326 | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 | - - + - - - + - - + - + | fossil user new uvtester "Unversioned Test User" $password fossil user capabilities uvtester oy ############################################################################### foreach {pid port outTmpFile} [test_start_server $repository stopArg] {} |
︙ | |||
401 402 403 404 405 406 407 | 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | - + | fossil_maybe_answer y unversioned revert $remote test unversioned-52 {[regexp \ {Round-trips: 1 Artifacts sent: 0 received: 0 Round-trips: 1 Artifacts sent: 0 received: 0 Round-trips: 2 Artifacts sent: 0 received: 0 Round-trips: 2 Artifacts sent: 0 received: 2 |
︙ | |||
426 427 428 429 430 431 432 | 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | - + - - + - - - + - | fossil_maybe_answer y unversioned sync $remote test unversioned-55 {[regexp \ {Round-trips: 1 Artifacts sent: 0 received: 0 Round-trips: 1 Artifacts sent: 0 received: 0 Round-trips: 2 Artifacts sent: 1 received: 0 Round-trips: 2 Artifacts sent: 1 received: 0 |
︙ |
Deleted test/update.test.
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
|
Changes to tools/codecheck1.c.
︙ | |||
602 603 604 605 606 607 608 | 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | - + | if( (acType[i]=='s' || acType[i]=='z' || acType[i]=='b') ){ const char *zExpr = azArg[fmtArg+i]; if( never_safe(zExpr) ){ printf("%s:%d: Argument %d to %.*s() is not safe for" " a query parameter\n", zFilename, lnFCall, i+fmtArg, szFName, zFCall); nErr++; |
︙ |
Changes to tools/makeheaders.c.
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - | #include <stdlib.h> #include <ctype.h> #include <memory.h> #include <sys/stat.h> #include <assert.h> #include <string.h> |
︙ | |||
2225 2226 2227 2228 2229 2230 2231 | 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 | - - + | if (pToken->zText[pToken->nText-1] == '\r') { nArg--; } if( nArg==9 && strncmp(zArg,"INTERFACE",9)==0 ){ PushIfMacro(0,0,0,pToken->nLine,PS_Interface); }else if( nArg==16 && strncmp(zArg,"EXPORT_INTERFACE",16)==0 ){ PushIfMacro(0,0,0,pToken->nLine,PS_Export); }else if( nArg==15 && strncmp(zArg,"LOCAL_INTERFACE",15)==0 ){ PushIfMacro(0,0,0,pToken->nLine,PS_Local); |
︙ |
Changes to tools/mkindex.c.
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + | ** legacy commands. Test commands are unsupported commands used for testing ** and analysis only. ** ** Commands are 1st-tier by default. If the command name begins with ** "test-" or if the command name has a "test" argument, then it becomes ** a test command. If the command name has a "2nd-tier" argument or ends ** with a "*" character, it is second tier. If the command name has an "alias" |
︙ |
Changes to tools/skintxt2config.c.
| 1 2 3 4 5 6 7 8 | - + |
|
︙ | |||
100 101 102 103 104 105 106 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - + | end: fclose(f); if(rc){ free(zMem); }else{ *zContent = zMem; *nContent = fpos; |
︙ |
Changes to tools/sqlcompattest.c.
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - + - - + - | #error "Must set -DMINIMUM_SQLITE_VERSION=nn.nn.nn in auto.def" #endif #define QUOTE(VAL) #VAL #define STR(MACRO_VAL) QUOTE(MACRO_VAL) char zMinimumVersionNumber[8]="nn.nn.nn"; |
︙ |
Changes to win/Makefile.mingw.
︙ | |||
575 576 577 578 579 580 581 | 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | - - - - | $(SRCDIR)/../skins/default/details.txt \ $(SRCDIR)/../skins/default/footer.txt \ $(SRCDIR)/../skins/default/header.txt \ $(SRCDIR)/../skins/eagle/css.txt \ $(SRCDIR)/../skins/eagle/details.txt \ $(SRCDIR)/../skins/eagle/footer.txt \ $(SRCDIR)/../skins/eagle/header.txt \ |
︙ |
Changes to win/Makefile.msc.
︙ | |||
533 534 535 536 537 538 539 | 533 534 535 536 537 538 539 540 541 542 543 544 545 546 | - - - - | "$(SRCDIR)\..\skins\default\details.txt" \ "$(SRCDIR)\..\skins\default\footer.txt" \ "$(SRCDIR)\..\skins\default\header.txt" \ "$(SRCDIR)\..\skins\eagle\css.txt" \ "$(SRCDIR)\..\skins\eagle\details.txt" \ "$(SRCDIR)\..\skins\eagle\footer.txt" \ "$(SRCDIR)\..\skins\eagle\header.txt" \ |
︙ | |||
1162 1163 1164 1165 1166 1167 1168 | 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 | - - - - | echo "$(SRCDIR)\../skins/default/details.txt" >> $@ echo "$(SRCDIR)\../skins/default/footer.txt" >> $@ echo "$(SRCDIR)\../skins/default/header.txt" >> $@ echo "$(SRCDIR)\../skins/eagle/css.txt" >> $@ echo "$(SRCDIR)\../skins/eagle/details.txt" >> $@ echo "$(SRCDIR)\../skins/eagle/footer.txt" >> $@ echo "$(SRCDIR)\../skins/eagle/header.txt" >> $@ |
︙ |
Changes to win/buildmsvc.bat.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - + - - | @ECHO OFF :: :: buildmsvc.bat -- :: |
︙ | |||
50 51 52 53 54 55 56 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + - - - | ) REM REM Visual Studio 2017 / 2019 / 2022 REM CALL :fn_TryUseVsWhereExe IF NOT DEFINED VSWHEREINSTALLDIR GOTO skip_detectVisualStudio2017 |
︙ |
Changes to www/aboutcgi.wiki.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | - - + - - - + + - - + - - - + + | <title>How CGI Works In Fossil</title> |
︙ | |||
87 88 89 90 91 92 93 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - + - + - - + - + - | The CGI script exits as soon as it generates a single reply. The web server will (usually) persist and handle multiple HTTP requests, but a CGI script handles just one HTTP request and then exits. The above is a rough outline of how CGI works. There are many details omitted from this brief discussion. See other on-line CGI tutorials for further information. |
︙ | |||
138 139 140 141 142 143 144 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | - - + - + - - + - + - - + - - + - - + - - + - - - - + - - - - - - + - - + - - - - - - + - - + - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - + + + + - + | With Fossil, terms of PATH_INFO beyond the webpage name are converted into the "name" query parameter. Hence, the following two URLs mean exactly the same thing to Fossil: <ol type='A'> <li> [https://fossil-scm.org/home/info/c14ecc43] <li> [https://fossil-scm.org/home/info?name=c14ecc43] </ol> |
︙ | |||
295 296 297 298 299 300 301 | 237 238 239 240 241 242 243 244 | + | converted into CGI, then Fossil creates a separate child Fossil process to handle each CGI request.</p></li> <li><p> Fossil is itself often launched using CGI. But Fossil can also then turn around and launch [./serverext.wiki|sub-CGI scripts to implement extensions].</p></li> </ol> </blockquote> |
Changes to www/aboutdownload.wiki.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | <title>How The Fossil Download Page Works</title> <h1 align="center">How The Download Page Works</h1> <h2>1.0 Overview</h2> The [/uv/download.html|Download] page for the Fossil self-hosting repository is implemented using [./unvers.wiki|unversioned files]. The "download.html" screen itself, and the various build products are all stored as unversioned content. The download.html page |
︙ | |||
40 41 42 43 44 45 46 | 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | - + - + - + | Notice how the hyperlinks above use the "mimetype=text/plain" query parameter in order to display the file as plain text instead of the usual HTML or Javascript. The default mimetype for "download.html" is text/html. But because the entire page is enclosed within |
︙ |
Changes to www/adding_code.wiki.
︙ | |||
48 49 50 51 52 53 54 | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - - + - - + - + | source tree. Suppose one wants to add a new source code file named "xyzzy.c". The first step is to add this file to the various makefiles. Do so by editing the file tools/makemake.tcl and adding "xyzzy" (without the final ".c") to the list of source modules at the top of that script. Save the result and then run the makemake.tcl script using a TCL interpreter. The command to run the makemake.tcl script is: |
︙ | |||
107 108 109 110 111 112 113 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - - + - - + - + - + - + - - - - + + + - | Fossil repository and then [/help/commit|commit] your changes! <h2 id="newcmd">4.0 Creating A New Command</h2> By "commands" we mean the keywords that follow "fossil" when invoking Fossil from the command-line. So, for example, in |
︙ | |||
177 178 179 180 181 182 183 | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | - + - + | <h2 id="newpage">5.0 Creating A New Web Page</h2> As with commands, new webpages can be added simply by inserting a function that generates the webpage together with a special header comment. A template follows: |
︙ |
Changes to www/alerts.md.
︙ | |||
89 90 91 92 93 94 95 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | - + - + - - - + + + | the "From" address above, or it could be a different value like `admin@example.com`. Save your changes. At the command line, say |
︙ | |||
153 154 155 156 157 158 159 | 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | + - + + + | by the way: a user can be signed up for email alerts without having a full-fledged Fossil user account. Only when both user names are the same are the two records tied together under the hood. For more on this, see [Users vs Subscribers below](#uvs). If you are seeing the following complaint from Fossil: <blockquote> |
︙ | |||
209 210 211 212 213 214 215 | 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | - + | Announcement](/announce)" link at the top of the "Email Notification Setup" page. Put your email address in the "To:" line and a test message below, then press "Send Message" to verify that outgoing email is working. Another method is from the command line: |
︙ | |||
259 260 261 262 263 264 265 | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | - + - + - + - + - - + + - + | ### Troubleshooting If email alerts aren't working, there are several useful commands you can give to figure out why. (Be sure to [`cd` into a repo checkout directory](#cd) first!) |
︙ | |||
419 420 421 422 423 424 425 | 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | - + | corruption][rdbc] if used with a file sharing technology that doesn't use proper file locking. You can start this Tcl script as a daemon automatically on most Unix and Unix-like systems by adding the following line to the `/etc/rc.local` file of the server that hosts the repository sending email alerts: |
︙ | |||
678 679 680 681 682 683 684 | 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | - + | attacker with the `subscriberCode`. Nor can knowledge of the `subscriberCode` lead to an email flood or other annoyance attack, as far as I can see. If the `subscriberCodes` for a Fossil repository are ever compromised, new ones can be generated as follows: |
︙ |
Changes to www/backoffice.md.
︙ | |||
77 78 79 80 81 82 83 | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - + | However, the daily digest of email notifications is handled by the backoffice. If a Fossil server can sometimes go more than a day without being accessed, then the automatic backoffice will never run, and the daily digest might not go out until somebody does visit a webpage. If this is a problem, an administrator can set up a cron job to periodically run: |
︙ | |||
100 101 102 103 104 105 106 | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | - + - + | [Fossil Forum](https://fossil-scm.org/forum) so that we can perhaps fix the problem.) For now, the backoffice must be run manually on OpenBSD systems. To set up fully-manual backoffice, first disable the automatic backoffice using the "[backoffice-disable](/help?cmd=backoffice-disable)" setting. |
︙ | |||
145 146 147 148 149 150 151 | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | - + | "no process". Sometimes the process id will be non-zero even if there is no corresponding process. Fossil knows how to figure out whether or not a process still exists. You can print out a decoded copy of the current backoffice lease using this command: |
︙ | |||
195 196 197 198 199 200 201 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | - + | The backoffice should "just work". It should not require administrator attention. However, if you suspect that something is not working right, there are some debugging aids. We have already mentioned the command that shows the backoffice lease for a repository: |
︙ |
Changes to www/backup.md.
︙ | |||
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | + + + + | # <a id="sync-solution"></a> Solution 1: Explicit Pulls The following script solves most of the above problems for the use case where you want a *nearly-complete* clone of the remote repository using nothing but the normal Fossil sync protocol. It only does so if you are logged into the remote as a user with Setup capability, however. ---- ``` shell #!/bin/sh fossil sync --unversioned fossil configuration pull all fossil rebuild ``` ---- The last step is needed to ensure that shunned artifacts on the remote are removed from the local clone. The second step includes `fossil conf pull shun`, but until those artifacts are actually rebuilt out of existence, your backup will be “more than complete” in the sense that it will continue to have information that the remote says should not exist any more. That would be not so much a “backup” as an |
︙ | |||
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | + + + + + + + + | solve such problems if you have access to the remote server, which allows you to get a SQL-level backup. This requires Fossil 2.12 or newer, which added [the `backup` command][bu] to take care of locking and transaction isolation, allowing the user to safely back up an in-use repository. If you have SSH access to the remote server, something like this will work: ---- ``` shell #!/bin/bash bf=repo-$(date +%Y-%m-%d).fossil ssh example.com "cd museum ; fossil backup -R repo.fossil backups/$bf" && scp example.com:museum/backups/$bf ~/museum/backups ``` ---- Beware that this method does not solve [the intransitive sync problem](#ait), in and of itself: if you do a SQL-level backup of a stale repo DB, you have a *stale backup!* You should therefore run this on every node that may need to serve as a backup so that at least *one* of the backups is also up-to-date. # <a id="enc"></a> Encrypted Off-Site Backups A useful refinement that you can apply to both methods above is encrypted off-site backups. You may wish to store backups of your repositories off-site on a service such as Dropbox, Google Drive, iCloud, or Microsoft OneDrive, where you don’t fully trust the service not to leak your information. This addition to the prior scripts will encrypt the resulting backup in such a way that the cloud copy is a useless blob of noise to anyone without the key: ---- ```shell iter=152830 pass="h8TixP6Mt6edJ3d6COaexiiFlvAM54auF2AjT7ZYYn" gd="$HOME/Google Drive/Fossil Backups/$bf.xz.enc" fossil sql -R ~/museum/backups/"$bf" .dump | xz -9 | openssl enc -e -aes-256-cbc -pbkdf2 -iter $iter -pass pass:"$pass" -out "$gd" ``` ---- If you’re adding this to the first script above, remove the “`-R repo-name`” bit so you get a dump of the repository backing the current working directory. Change the `pass` value to some other long random string, and change the `iter` value to something in the hundreds of thousands range. A good source for |
︙ | |||
248 249 250 251 252 253 254 | 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - - + + | lacked this capability until Ventura (13.0). If you’re on Monterey (12) or older, we recommend use of the [Homebrew][hb] OpenSSL package rather than give up on the security afforded by use of configurable-iteration PBKDF2. To avoid a conflict with the platform’s `openssl` binary, Homebrew’s installation is [unlinked][hbul] by default, so you have to give an explicit path to it, one of: |
︙ |
Changes to www/branching.wiki.
︙ | |||
244 245 246 247 248 249 250 | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | - + - + - + - - - + + + | branches identified only by the commit ID currently at its tip, being a long string of hex digits. Therefore, Fossil conflates two concepts: branching as intentional forking and the naming of forks as branches. They are in fact separate concepts, but since Fossil is intended to be used primarily by humans, we combine them in Fossil's human user interfaces. |
︙ | |||
375 376 377 378 379 380 381 | 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | - + | <h2 id="fix">Fixing Forks</h2> If your local checkout is on a forked branch, you can usually fix a fork automatically with: <pre> |
︙ | |||
489 490 491 492 493 494 495 | 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | - + | <h2 id="bad-fork">How Can Forks Divide Development Effort?</h2> [#dist-clone|Above], we stated that forks carry a risk that development effort on a branch can be divided among the forks. It might not be immediately obvious why this is so. To see it, consider this swim lane diagram: |
︙ | |||
693 694 695 696 697 698 699 | 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 | - + - + | bad, which is why [./concepts.wiki#workflow|Fossil tries so hard to avoid them], why it warns you about it when they do occur, and why it makes it relatively [#fix|quick and painless to fix them] when they do occur. <h2>Review Of Terminology</h2> |
︙ |
Changes to www/build.wiki.
︙ | |||
38 39 40 41 42 43 44 | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | - + - + | <ol> <li>Point your web browser to [https://fossil-scm.org/]</li> <li>Click on the [/timeline|Timeline] link at the top of the page.</li> |
︙ | |||
174 175 176 177 178 179 180 | 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | - - + - - + - + - + - - + + - + - + - - + + - + | Alternatively, running <b>./configure</b> under MSYS should give a suitable top-level Makefile. However, options passed to configure that are not applicable on Windows may cause the configuration or compilation to fail (e.g. fusefs, internal-sqlite, etc). <li><i>MSVC</i> → Use the MSVC makefile.</li> |
︙ | |||
251 252 253 254 255 256 257 | 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 | - + - + | be installed on the local machine. You can get Tcl/Tk from [http://www.activestate.com/activetcl|ActiveState]. </li> <li> To build on older Macs (circa 2002, MacOS 10.2) edit the Makefile generated by configure to add the following lines: |
︙ | |||
438 439 440 441 442 443 444 | 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 | - - - - - - - - + + + + + + + + - + - | [https://emscripten.org/docs/getting_started/downloads.html] For instructions on keeping the SDK up to date, see: [https://emscripten.org/docs/tools_reference/emsdk.html] |
︙ | |||
481 482 483 484 485 486 487 | 478 479 480 481 482 483 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 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | - - - - - - - - - - + + + + + + + + + + - - - - - - - + + + + + + + + + | build cycle. They are instead explicitly built as described below. From the top of the source tree, all WASM-related components can be built with: <pre><code>$ make wasm</code></pre> |
︙ |
Changes to www/caps/login-groups.md.
︙ | |||
103 104 105 106 107 108 109 | 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | + - - - - + + + + + | Login groups have names. A repo can be in only one of these named login groups at a time. Trust in login groups is transitive within a single server. Consider this sequence: ``` |
︙ |
Changes to www/cgi.wiki.
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | - + - + | those options. <h1>CGI Script Options</h1> The CGI script used to launch a Fossil server will usually look something like this: |
︙ |
Changes to www/changes.wiki.
1 2 | 1 2 3 4 5 6 7 8 9 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <title>Change Log</title> |
︙ |
Changes to www/chat.md.
︙ | |||
78 79 80 81 82 83 84 | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | - - - - - - - - - | selected file. Image files sent this way will, by default, appear inline in messages, but each user may toggle that via the settings popup menu, such that images instead appear as downloadable links. Non-image files always appear in messages as download links. ### Deletion of Messages |
︙ | |||
118 119 120 121 122 123 124 125 126 127 128 129 130 131 | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | + + + + + + + + + | list of loaded messages. This is not the same thing as tracking who's online, but it gives an overview of which users have been active most recently, noting that "lurkers" (people who post no messages) will not show up in that list, nor does the chat infrastructure have a way to track and present those. That list can be used to filter messages on a specific user by tapping on that user's name, tapping a second time to remove the filter. Sidebar: message deletion is a type of message and deletions count towards updates in the recent activity list (counted for the person who performed the deletion, not the author of the deleted comment). That can potentially lead to odd corner cases where a user shows up in the list but has no messages which are currently visible because they were deleted, or an admin user who has not posted anything but deleted a message. That is a known minor cosmetic-only bug with a resolution of "will not fix." ### <a id="cli"></a> The `fossil chat` Command Type [fossil chat](/help?cmd=chat) from within any open check-out to bring up a chatroom for the project that is in that checkout. The new chat window will attempt to connect to the default sync target for that check-out (the server whose URL is shown by the |
︙ | |||
144 145 146 147 148 149 150 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + | The recommended way to allow robots to send chat messages is to create a new user on the server for each robot. Give each such robot account the "C" privilege only. That means that the robot user account will be able to send chat messages, but not do anything else. Then, in the program or script that runs the robot, when it wants to send a chat message, have it run a command like this: |
︙ | |||
210 211 212 213 214 215 216 | 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | - + | Fetches the file content associated with a post (one file per post, maximum). In the UI, this is accessed via links to uploaded files and via inlined image tags. Chat messages are stored on the server-side in the CHAT table of the repository. |
︙ |
Changes to www/checkin_names.wiki.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - - + + + - - + + - - - + + + - - - + + + - - + + - - + - + - + - + - - + + - - + - + - + - + - + - + | <title>Check-in Names</title> |
︙ | |||
179 180 181 182 183 184 185 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | - + - + - + - + - + - + - + - + - + - + - + - + | repo could have release tags like “2020-04-01”, the date the release was cut, but you could force Fossil to interpret that string as a date rather than as a tag by passing “date:2020-04-01”. For an example of how timestamps are useful, consider the homepage for the Fossil website itself: |
︙ | |||
281 282 283 284 285 286 287 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | - + - + - + - + | <h2 id="examples">Additional Examples</h2> To view the changes in the most recent check-in prior to the version currently checked out: |
︙ |
Changes to www/childprojects.wiki.
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | - + - + | at the request of the child. <h2>Creating a Child Project</h2> To create a new child project, first clone the parent. Then make manual SQL changes to the child repository as follows: |
︙ |
Changes to www/ckout-workflows.md.
︙ | |||
8 9 10 11 12 13 14 | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + | ## <a id="mcw"></a> Multiple-Checkout Workflow With Fossil, it is routine to have multiple check-outs from the same repository: |
︙ | |||
71 72 73 74 75 76 77 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | - - - - - + + + + + - - + + - - - + + + - - + + - + - + | Nevertheless, it is possible to work in a more typical Git sort of style, switching between versions in a single check-out directory. #### <a id="idiomatic"></a> The Idiomatic Fossil Way The most idiomatic way is as follows: |
Changes to www/concepts.wiki.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | <title>Fossil Concepts</title> <h1 align="center">Fossil Concepts</h1> <h2>1.0 Introduction</h2> [./index.wiki | Fossil] is a [http://en.wikipedia.org/wiki/Software_configuration_management | software configuration management] system. Fossil is software that is designed to control and track the development of a software project and to record the history |
︙ | |||
112 113 114 115 116 117 118 | 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | - - - - - + + + + + - + | identifier for a blob of data, such as a file. Given any file, it is simple to find the artifact ID for that file. But given an artifact ID, it is computationally intractable to generate a file that will have that same artifact ID. Artifact IDs look something like this: |
︙ | |||
236 237 238 239 240 241 242 | 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | + - + + | an upgrade. Running "all rebuild" never hurts, so when upgrading it is a good policy to run it even if it is not strictly necessary. To use Fossil, simply type the name of the executable in your shell, followed by one of the various built-in commands and arguments appropriate for that command. For example: <blockquote><b> |
︙ | |||
277 278 279 280 281 282 283 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | - - - - - + + + + + | An interesting feature of Fossil is that it supports both autosync and manual-merge work flows. The default setting for Fossil is to be in autosync mode. You can change the autosync setting or check the current autosync setting using commands like: |
︙ |
Changes to www/containers.md.
︙ | |||
11 12 13 14 15 16 17 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | + - + + + - + + | ## 1. Quick Start Fossil ships a `Dockerfile` at the top of its source tree, [here][DF], which you can build like so: ``` |
︙ | |||
38 39 40 41 42 43 44 | 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | + - + + | fresh container based on that image. You can pass extra arguments to the first command via the Makefile’s `DBFLAGS` variable and to the second with the `DCFLAGS` variable. (DB is short for “`docker build`”, and DC is short for “`docker create`”, a sub-step of the “run” target.) To get the custom port setting as in second command above, say: ``` |
︙ | |||
73 74 75 76 77 78 79 | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | + - - - + + + + | ### <a id="repo-inside"></a> 2.1 Storing the Repo Inside the Container The simplest method is to stop the container if it was running, then say: ``` |
︙ | |||
110 111 112 113 114 115 116 | 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | + - - - - - + + + + + + | The simple storage method above has a problem: containers are designed to be killed off at the slightest cause, rebuilt, and redeployed. If you do that with the repo inside the container, it gets destroyed, too. The solution is to replace the “run” command above with the following: ``` |
︙ | |||
139 140 141 142 143 144 145 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | + - + + | #### 2.2.1 <a id="wal-mode"></a>WAL Mode Interactions You might be aware that OCI containers allow mapping a single file into the repository rather than a whole directory. Since Fossil repositories are specially-formatted SQLite databases, you might be wondering why we don’t say things like: ``` |
︙ | |||
278 279 280 281 282 283 284 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | + - - - - - - - - - + + + + + + + + + + | granularity beyond the classic Unix ones inside the container, so we drop root’s ability to change them. All together, we recommend adding the following options to your “`docker run`” commands, as well as to any “`docker create`” command that will be followed by “`docker start`”: ``` |
︙ | |||
310 311 312 313 314 315 316 | 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 | + - - - - + + + + + + - + + + - + + | A secondary benefit falls out of this process for free: it’s arguably the easiest way to build a purely static Fossil binary for Linux. Most modern Linux distros make this [surprisingly difficult][lsl], but Alpine’s back-to-basics nature makes static builds work the way they used to, back in the day. If that’s all you’re after, you can do so as easily as this: ``` |
︙ | |||
362 363 364 365 366 367 368 | 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | + - + + + + + - - + + + - + - + - + | leaving those below it for system users like this Fossil daemon owner. Since it’s typical for these to start at 0 and go upward, we started at 500 and went *down* one instead to reduce the chance of a conflict to as close to zero as we can manage. To change it to something else, say: ``` |
︙ | |||
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 | 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 | + + + + | Let’s say the extension is written in Python. Because this is one of the most popular programming languages in the world, we have many options for achieving this. For instance, there is a whole class of “[distroless]” images that will do this efficiently by changing “`STAGE 2`” in the `Dockefile` to this: ``` ## --------------------------------------------------------------------- ## STAGE 2: Pare that back to the bare essentials, plus Python. ## --------------------------------------------------------------------- FROM cgr.dev/chainguard/python:latest USER root ARG UID=499 ENV PATH "/sbin:/usr/sbin:/bin:/usr/bin" COPY --from=builder /tmp/fossil /bin/ COPY --from=builder /bin/busybox.static /bin/busybox RUN [ "/bin/busybox", "--install", "/bin" ] RUN set -x \ && echo "fossil:x:${UID}:${UID}:User:/museum:/false" >> /etc/passwd \ && echo "fossil:x:${UID}:fossil" >> /etc/group \ && install -d -m 700 -o fossil -g fossil log museum ``` You will also have to add `busybox-static` to the APK package list in STAGE 1 for the `RUN` script at the end of that stage to work, since the [Chainguard Python image][cgimgs] lacks a shell, on purpose. The need to install root-level binaries is why we change `USER` temporarily here. Build it and test that it works like so: ``` $ make container-run && docker exec -i $(make container-version) python --version 3.11.2 ``` The compensation for the hassle of using Chainguard over something more general purpose like changing the `run` layer to Alpine and then adding a “`apk add python`” command to the `Dockerfile` is huge: we no longer leave a package manager sitting around inside the container, waiting for some malefactor to figure out how to abuse it. |
︙ | |||
523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 | 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | + + + + | default under the theory that you don’t want those services to run until you’ve logged into the GUI as that user. If you find yourself running into this, [enable linger mode](https://www.freedesktop.org/software/systemd/man/loginctl.html).) so I was able to create a unit file called `~/.local/share/systemd/user/alert-sender@.service` with these contents: ``` [Unit] Description=Fossil email alert sender for %I [Service] WorkingDirectory=/home/fossil/museum ExecStart=/home/fossil/bin/alert-sender %I/mail.db Restart=always RestartSec=3 [Install] WantedBy=default.target ``` I was then able to enable email alert forwarding for select repositories after configuring them per [the docs](./alerts.md) by saying: ``` $ systemctl --user daemon-reload $ systemctl --user enable alert-sender@myproject $ systemctl --user start alert-sender@myproject ``` Because this is a parameterized script and we’ve set our repository paths predictably, you can do this for as many repositories as you need to by passing their names after the “`@`” sign in the commands above. ## 6. <a id="light"></a>Lightweight Alternatives to Docker |
︙ | |||
570 571 572 573 574 575 576 | 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | + - + + | leaving the benefits of containerization to those with bigger budgets. For the sake of simple examples in this section, we’ll assume you’re integrating Fossil into a larger web site, such as with our [Debian + nginx + TLS][DNT] plan. This is why all of the examples below create the container with this option: ``` |
︙ | |||
640 641 642 643 644 645 646 | 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | + - - + + + + - - - - - - - - - - - + + + + + + + + + + + + + - + + + - + + + - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + + | On Ubuntu 22.04, the installation size is about 38 MiB, roughly a tenth the size of Docker Engine. For our purposes here, the only thing that changes relative to the examples at the top of this document are the initial command: ``` |
︙ | |||
769 770 771 772 773 774 775 | 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 | + - - - - + + + + - - + + - - + + + + - - + + + + - - - - - - - + + + + + + + + + - + + + - + + + - - - + + + + | on the host for the reasons given [above](#bind-mount). That being done, we also need a generic `systemd` unit file called `/etc/systemd/system/fossil@.service`, containing: ---- ``` |
︙ |
Changes to www/contribute.wiki.
︙ | |||
24 25 26 27 28 29 30 | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | - + - + | definition of that term is up to the project leader. <h2>2.0 Submitting Patches</h2> Suggested changes or bug fixes can be submitted by creating a patch against the current source tree: |
︙ |
Changes to www/custom_ticket.wiki.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | - + + - + + - + + - + - - - - - - - + + + + + + - - + - + - - - - + + + - - - + + - - - - - + + + + - - + + + - - - - - - - - + + + + + + + + - - + + + - + - - - + - - - - + + + - - - + - - - + - - - - - + + + + + + - + - - + + + | <title>Customizing The Ticket System</title> |
Changes to www/customgraph.md.
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + - + - + - + | # Customizing the Timeline Graph Beginning with version 1.33, Fossil gives users and skin authors significantly more control over the look and feel of the timeline graph. ## <a id="basic-style"></a>Basic Style Options Fossil includes several options for changing the graph's style without having to delve into CSS. These can be found in the details.txt file of your skin or under Admin/Skins/Details in the web UI. |
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | - + - + - + - + - + - + - + - + - + - + | latter, less obvious type. ## <a id="pos-elems"></a>Positioning Elements These elements aren't intended to be seen. They're only used to help position the graph and its visible elements. |
︙ |
Changes to www/customskin.md.
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | + + - - - - - + + + + + + + + + + + - + + + + - - - - - - - - - + + + + + + + + + - - - - + - - + - - - + + - - - - - + + + - - + + - - - - - - - - - - - - + + + - - + - - + + - - - - + - - - + + + + - - + + - - - + + + - + - - - + + + - - + + - - + + | When cloning a repository, the skin of the new repository is initialized to the skin of the repository from which it was cloned. # Structure Of A Fossil Web Page Every HTML page generated by Fossil has the same basic structure: <blockquote><table border=1 cellpadding=10><tbody> <tr><td style='background-color:lightgreen;text-align:center;'> |
︙ | |||
166 167 168 169 170 171 172 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - - - + + + - + - + - + | Notice that the `<html>`, `<head>`, and opening `<body>` elements at the beginning of the document, and the closing `</body>` and `</html>` elements at the end are automatically generated by Fossil. This is recommended. However, for maximum design flexibility, Fossil allows those elements to be |
︙ | |||
232 233 234 235 236 237 238 | 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | - - + + - + - + - + - + - + - + | empty strings, then they should be floating point values (close to 1.0) that specify relative scaling of the fonts in pikchr diagrams and other elements of the diagrams, respectively. </dd> <dt><b>footer.txt</b> and <b>header.txt</b></dt> |
︙ | |||
325 326 327 328 329 330 331 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | - + - + - - + + - - + + - - + + - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | did not change. After you have finished work your skin, the caches should synchronize with your new design and you can reactivate your web browser's cache and take it out of developer mode. ## <a id="headfoot"></a>Header and Footer Processing The `header.txt` and `footer.txt` control files of a skin are the HTML text |
︙ |
Changes to www/defcsp.md.
︙ | |||
21 22 23 24 25 26 27 | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - - - - + + + + + - + + - + - + - + | bugs that might lead to a vulnerability. ## The Default Restrictions The default CSP used by Fossil is as follows: <pre> |
︙ | |||
95 96 97 98 99 100 101 | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + | This policy allows CSS information to come from separate files hosted under the Fossil repo server’s Internet domain. It also allows inline CSS `<style>` tags within the document text. The `'unsafe-inline'` declaration allows CSS within individual HTML elements: |
︙ | |||
170 171 172 173 174 175 176 | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | - + | offers free Fossil repository hosting to anyone on the Internet, all served under the same `http://chiselapp.com/user/$NAME/$REPO` URL scheme. Any one of those hundreds of repositories could trick you into visiting their repository home page, set to [an HTML-formatted embedded doc page][hfed] via Admin → Configuration → Index Page, with this content: |
︙ | |||
194 195 196 197 198 199 200 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | - + | path around this restriction. If you are serving a Fossil repository that has any user you do not implicitly trust to a level that you would willingly run any JavaScript code they’ve provided, blind, you **must not** give the `--with-th1-docs` option when configuring Fossil, because that allows substitution of the [pre-defined `$nonce` TH1 variable](./th1.md#nonce) into [HTML-formatted embedded docs][hfed]: |
︙ | |||
327 328 329 330 331 332 333 | 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | - + | Changing this setting is the easiest way to set a nonstandard CSP on your site. Because a blank setting tells Fossil to use its hard-coded default CSP, you have to say something like the following to get a repository without content security policy restrictions: |
︙ | |||
362 363 364 365 366 367 368 | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 | - + | `default-csp` setting and uses *that* to inject the value into generated HTML pages in its stock configuration. This means that another way you can override this value is to use the [`th1-setup` hook script](./th1-hooks.md), which runs before TH1 processing happens during skin processing: |
︙ |
Changes to www/delta-manifests.md.
1 2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | - - - - + + + + + + | # Delta Manifests |
︙ |
Changes to www/delta_encoder_algorithm.wiki.
1 | 1 2 3 4 5 6 7 8 9 | - + | <title>Fossil Delta Encoding Algorithm</title> |
︙ | |||
105 106 107 108 109 110 111 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | + - + - | to <a href="delta_format.wiki#copyrange">copy a range</a>, or </li> <li>move the window forward one byte. </li> </ul> </p> <div style="float:right"> |
︙ | |||
131 132 133 134 135 136 137 138 139 140 141 142 143 144 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | + | B1: box fill white B2: box fill orange height 200% B3: box fill white height 200% ] with .nw at 0.75 right of TARGET.ne arrow from TARGET.W.e to ORIGIN.B2.w "Signature" aligned above </verbatim> </div> <p>To make this decision the encoder first computes the hash value for the NHASH bytes in the window and then looks at all the locations in the "origin" which have the same signature. This part uses the hash table created by the pre-processing step to efficiently find these locations.</p> |
︙ | |||
214 215 216 217 218 219 220 | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | + - - - + + + + + - - - + + + + | and a new byte is shifted in.<p> <h3 id="rhdef">4.1 Definition</h3> <p>Assuming an array Z of NHASH bytes (indexing starting at 0) the hash V is computed via</p> <p align=center><table><tr><td> |
Changes to www/delta_format.wiki.
︙ | |||
188 189 190 191 192 193 194 | 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | - + - + - + | The format currently handles only 32 bit integer numbers. They are written base-64 encoded, MSB first, and without leading "0"-characters, except if they are significant (i.e. 0 => "0"). The base-64 encoding uses one character for each 6 bits of the integer to be encoded. The encoding characters are: |
︙ | |||
226 227 228 229 230 231 232 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | - + - + - + - + | </tr> </table> <h2 id="examplesdelta">4.2 Delta encoding</h2> An example of a delta using the specified encoding is: |
︙ | |||
293 294 295 296 297 298 299 | 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | - + + | single file. Allow diffs against any two arbitrary versions, not just diffs against the current check-out. Allow configuration options to replace tkdiff with some other - visual differ of the users choice. + visual differ of the users choice. Example: eskil. * Ticketing interface (expand this bullet) |
︙ |
Changes to www/embeddeddoc.wiki.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | <title>Project Documentation</title> <h1 align="center">Project Documentation</h1> Fossil provides a built-in <a href="wikitheory.wiki">wiki</a> that can be used to store the documentation for a project. This is sufficient for many projects. If your project is well-served by wiki documentation, then you need read no further. |
︙ | |||
27 28 29 30 31 32 33 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + - + | <h1>1.0 Fossil Support For Embedded Documentation</h1> The fossil web interface supports embedded documentation using the "/doc" page. To access embedded documentation, one points a web browser to a fossil URL of the following form: |
︙ | |||
136 137 138 139 140 141 142 | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | - - - + + + - - - - + + + + - - - + + + | Hyperlinks in Markdown and HTML embedded documents can reference the root of the Fossil repository using the special text "$ROOT" at the beginning of a URL. For example, a Markdown hyperlink to the Markdown formatting rules might be written in the embedded document like this: |
︙ | |||
198 199 200 201 202 203 204 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 | - + - + - + - - + + + + - - + + + | This file that you are currently reading is an example of embedded documentation. The name of this file in the fossil source tree is "<b>www/embeddeddoc.wiki</b>". You are perhaps looking at this file using the URL: |
Changes to www/encryptedrepos.wiki.
1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - - + - - - + + - - - + - + - - + - - - + + + - - - + + - - - + - + - - - + - + - - - + - + - + | <title>How To Use Encrypted Repositories</title> |
Changes to www/event.wiki.
︙ | |||
71 72 73 74 75 76 77 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | + - - - - + + + + + + - - - - - + + + + + + + - - + + - + + | There is a hyperlink under the /wikihelp menu that can be used to create new technotes. And there is a submenu hyperlink on technote displays for editing existing technotes. Technotes can also be created using the <b>wiki create</b> command: <blockquote> |
︙ |
Changes to www/faq.tcl.
︙ | |||
10 11 12 13 14 15 16 | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - + - + | faq { What GUIs are available for fossil? } { The fossil executable comes with a [./webui.wiki | web-based GUI] built in. Just run: |
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | - + - + | When you are checking in a new change using the <b>[/help/commit|commit]</b> command, you can add the option "--branch <i>BRANCH-NAME</i>" to make the new check-in be the first check-in for a new branch. If you want to create a new branch whose initial content is the same as an existing check-in, use this command: |
︙ | |||
73 74 75 76 77 78 79 | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - + - + | "--tag <i>TAGNAME</i>" command-line option. You can repeat the --tag option to give a check-in multiple tags. Tags need not be unique. So, for example, it is common to give every released version a "release" tag. If you want add a tag to an existing check-in, you can use the <b>[/help/tag|tag]</b> command. For example: |
︙ | |||
125 126 127 128 129 130 131 | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | - - + - + - - - + - + - - - + - + - + + - + | See the article on [./shunning.wiki | "shunning"] for details. } faq { How do I make a clone of the fossil self-hosting repository? } { Any of the following commands should work: |
Changes to www/faq.wiki.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + - - - + - + - - - + - + - + | <title>Fossil FAQ</title> <h1 align="center">Frequently Asked Questions</h1> Note: See also <a href="qandc.wiki">Questions and Criticisms</a>. <ol> <li><a href="#q1">What GUIs are available for fossil?</a></li> <li><a href="#q2">What is the difference between a "branch" and a "fork"?</a></li> <li><a href="#q3">How do I create a new branch?</a></li> <li><a href="#q4">How do I tag a check-in?</a></li> <li><a href="#q5">How do I create a private branch that won't get pushed back to the main repository.</a></li> <li><a href="#q6">How can I delete inappropriate content from my fossil repository?</a></li> <li><a href="#q7">How do I make a clone of the fossil self-hosting repository?</a></li> <li><a href="#q8">How do I import or export content from and to other version control systems?</a></li> </ol> <hr> <p id="q1"><b>(1) What GUIs are available for fossil?</b></p> |
Changes to www/fileformat.wiki.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 | + + + | <title>Fossil File Formats</title> <h1 align="center"> Fossil File Formats </h1> The global state of a fossil repository is kept simple so that it can endure in useful form for decades or centuries. A fossil repository is intended to be readable, searchable, and extensible by people not yet born. The global state of a fossil repository is an unordered |
︙ | |||
105 106 107 108 109 110 111 | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | - + - + | well as information such as parent check-ins, the username of the programmer who created the check-in, the date and time when the check-in was created, and any check-in comments associated with the check-in. Allowed cards in the manifest are as follows: |
︙ | |||
143 144 145 146 147 148 149 | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - - + + + + | in the comment. A manifest must have exactly one <b>D</b> card. The sole argument to the <b>D</b> card is a date-time stamp in the ISO8601 format. The date and time should be in coordinated universal time (UTC). The format one of: |
︙ | |||
256 257 258 259 260 261 262 | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | - + - + - + - + | Clusters are used during repository synchronization to help reduce network traffic. As such, clusters are an optimization and may be removed from a repository without loss or damage to the underlying project code. Allowed cards in the cluster are as follows: |
︙ | |||
331 332 333 334 335 336 337 | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | - + - + | <h3 id="wikichng">2.4 Wiki Pages</h3> A wiki artifact defines a single version of a single wiki page. Wiki artifacts accept the following card types: |
︙ | |||
372 373 374 375 376 377 378 | 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | - + - + | [/artifact?name=7b2f5fd0e0&txt=1 | here]. <h3 id="tktchng">2.5 Ticket Changes</h3> A ticket-change artifact represents a change to a trouble ticket. The following cards are allowed on a ticket change artifact: |
︙ | |||
420 421 422 423 424 425 426 | 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | - + - + | An attachment artifact associates some other artifact that is the attachment (the source artifact) with a ticket or wiki page or technical note to which the attachment is connected (the target artifact). The following cards are allowed on an attachment artifact: |
︙ | |||
462 463 464 465 466 467 468 | 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | - + - + | A technical note or "technote" artifact (formerly known as an "event" artifact) associates a timeline comment and a page of text (similar to a wiki page) with a point in time. Technotes can be used to record project milestones, release notes, blog entries, process checkpoints, or news articles. The following cards are allowed on an technote artifact: |
︙ | |||
527 528 529 530 531 532 533 | 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 | - + - + | <h3 id="forum">2.8 Forum Posts</h3> Forum posts are intended as a mechanism for users and developers to discuss a project. Forum posts are like messages on a mailing list. The following cards are allowed on an forum post artifact: |
︙ | |||
603 604 605 606 607 608 609 | 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 | - + - + + + + | The following table summarizes the various kinds of cards that appear on Fossil artifacts. A blank entry means that combination of card and artifact is not legal. A number or range of numbers indicates the number of times a card may (or must) appear in the corresponding artifact type. e.g. a value of 1 indicates a required unique card and 1+ indicates that one or more such cards are required. |
︙ | |||
899 900 901 902 903 904 905 | 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 | - + - + | wrong order. Both bugs have now been fixed. However, to prevent historical Technical Note artifacts that were inserted by users in good faith from being rejected by newer Fossil builds, the card ordering requirement is relaxed slightly. The actual implementation is this: |
︙ |
Changes to www/forum.wiki.
︙ | |||
132 133 134 135 136 137 138 | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | - - - + + + - - - + + + - - - + + + - - - + + + | The remainder of this section summarizes the differences you're expected to see when taking option #2. The first thing is that you'll need to add something like the following to the Header part of the skin to create the navbar link: <verbatim> |
︙ |
Changes to www/fossil-v-git.wiki.
︙ | |||
32 33 34 35 36 37 38 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | - - + + - - - + + - | <h2>2.0 Differences Between Fossil And Git</h2> Differences between Fossil and Git are summarized by the following table, with further description in the text that follows. |
︙ | |||
97 98 99 100 101 102 103 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | - + | <td><a href="#testing">2.8 ↓</a></td> </tr> <tr> <td>SHA-1 or SHA-2</td> <td>SHA-1 and/or SHA-3, in the same repository</td> <td><a href="#hash">2.9 ↓</a></td> </tr> |
︙ | |||
797 798 799 800 801 802 803 | 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 | - - - + + + - - - + + + | which every commit is tested first. It encourages thinking before acting. We believe this is an inherently good thing. Incidentally, this is a good example of Git's messy command design. These three commands: <pre> |
︙ |
Changes to www/fossil_prompt.wiki.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | + - + - + | <title>Fossilized Bash Prompt</title> <h1>2013-02-21</h1> Dan Kennedy has contributed a [./fossil_prompt.sh?mimetype=text/plain | bash script] that manipulates the bash prompt to show the status of the Fossil repository that the user is currently visiting. The prompt shows the branch, version, and time stamp for the current checkout, and the prompt changes colors from blue to red when there are uncommitted changes. To try out this script, simply download it from the link above, then type: |
Changes to www/gitusers.md.
︙ | |||
71 72 73 74 75 76 77 | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - + - + | advocate a switch-in-place working mode instead, so that is how most users end up working with Git. Contrast [Fossil’s check-out workflow document][ckwf] to see the practical differences. There is one Git-specific detail we wish to add beyond what that document already covers. This command: |
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + | choice also tends to make Fossil feel comfortable to Subversion expatriates.) The `fossil pull` command is simply the reverse of `fossil push`, so that `fossil sync` [is functionally equivalent to](./sync.wiki#sync): |
︙ | |||
178 179 180 181 182 183 184 | 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - - - + + + - - + + - - - + + + - + - + - - - - + + + + - - - - - + + + + + | There are at least three different ways to get [Fossil-style multiple check-out directories][mcw] with Git. The old way is to simply symlink the `.git` directory between working trees: |
︙ | |||
314 315 316 317 318 319 320 | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 | - + - - + + - - + + - - - + + + - + - + - + - + - + - + - + - - + + | #### <a id="emu-log"></a> Emulating `git log` If you truly need a backwards-in-time-only view of history in Fossil to emulate `git log`, this is as close as you can currently come: |
︙ | |||
466 467 468 469 470 471 472 | 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 | - + - - + + | Fossil omits the "Git index" or "staging area" concept. When you type "`fossil commit`" _all_ changes in your check-out are committed, automatically. There is no need for the "-a" option as with Git. If you only want to commit _some_ of the changes, list the names of the files or directories you want to commit as arguments, like this: |
︙ | |||
524 525 526 527 528 529 530 | 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 | - + - + - - - - + + + + - + | <a id="bneed"></a> ## Create Branches at Point of Need, Rather Than Ahead of Need Fossil prefers that you create new branches as part of the first commit on that branch: |
︙ | |||
589 590 591 592 593 594 595 | 589 590 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 618 619 620 621 622 623 624 625 | - + - + - + | [Fossil is an AP-mode system][capt], which in this case means it works *very hard* to ensure that all repos are as close to identical as it can make them under this eventually-consistent design philosophy. Branch *names* sync automatically in Fossil, not just the content of those branches. That means this common Git command: |
︙ | |||
690 691 692 693 694 695 696 | 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 | - - - - - - + + + + + + - - - + + + | We make no guarantee that there will always be a line beginning with “`repo`” and that it will be separated from the repository’s file name by a colon. The simplified example above is also liable to become confused by whitespace in file names.) ``` |
︙ | |||
748 749 750 751 752 753 754 | 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 | - - - - + + + + | to return her check-out’s parent commit to the previous version lest her next attempted commit land atop this mistake branch. The fact that Bob marked the branch as closed will prevent that from going thru, cluing Alice into what she needs to do to remedy the situation, but that merely shows why it’s a better workflow if Alice makes the amendment herself: ``` |
︙ | |||
832 833 834 835 836 837 838 | 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 | - + - + | format][udiff] output, suitable for producing a [patch file][pfile]. Nevertheless, there are multiple ways to get colorized diff output from Fossil: * The most direct method is to delegate diff behavior back to Git: |
︙ | |||
874 875 876 877 878 879 880 | 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 | - + - + - + - + - + - + - + - + - + | While there is no direct equivalent to Git’s “`show`” command, similar functionality is present in Fossil under other commands: #### <a id="patch"></a> Show a Patch for a Commit |
︙ | |||
997 998 999 1000 1001 1002 1003 | 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 | - + - + | The "[`fossil mv`][mv]" and "[`fossil rm`][rm]" commands work like they do in CVS in that they schedule the changes for the next commit by default: they do not actually rename or delete the files in your check-out. If you don’t like that default, you can change it globally: |
︙ | |||
1030 1031 1032 1033 1034 1035 1036 | 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 | - + | history to find a “good” version to anchor the start point of a [`fossil bisect`][fbis] operation. My search engine’s first result for “git checkout by date” is [this highly-upvoted accepted Stack Overflow answer][gcod]. The first command it gives is based on Git’s [`rev-parse` feature][grp]: |
︙ | |||
1070 1071 1072 1073 1074 1075 1076 | 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 | - + - + - + - + - + - + - + | Consequently, we cannot recommend this command at all. It’s unreliable even in the best case. That same Stack Overflow answer therefore goes on to recommend an entirely different command: |
︙ | |||
1130 1131 1132 1133 1134 1135 1136 | 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 | - + | second `git show` command above on [Git’s own repository][gitgh], your results may vary because there were four non-merge commits to Git on the 17th of March, 2020. You may be asking with an exasperated huff, “What is your *point*, man?” The point is that the equivalent in Fossil is simply: |
︙ | |||
1179 1180 1181 1182 1183 1184 1185 | 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 | - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + | and your family’s home NAS. #### Git Method We first need to clone the work repo down to our laptop, so we can work on it at home: |
︙ | |||
1276 1277 1278 1279 1280 1281 1282 | 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 | - + - - + + - + - - + + | they’re one-time setup costs, easily amortized to insignificance by the shorter day-to-day commands below. On first beginning to work from home, we reverse-clone the Fossil repo up to the NAS: |
︙ |
Changes to www/globs.md.
︙ | |||
40 41 42 43 44 45 46 | 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - + | The parser allows whitespace and commas in a pattern by quoting _the entire pattern_ with either single or double quotation marks. Internal quotation marks are treated literally. Moreover, a pattern that begins with a quote mark ends when the first instance of the same mark occurs, _not_ at a whitespace or comma. Thus, this: |
︙ |
Changes to www/glossary.md.
︙ | |||
165 166 167 168 169 170 171 172 173 174 175 176 177 178 | 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | + | recommend keeping them all in a single subdirectory such as "`~/fossils`" or "`%USERPROFILE%\Fossils`". A flat set of files suffices for simple purposes, but you may have use for something more complicated. This author uses a scheme like the following on mobile machines that shuttle between home and the office: ``` pikchr toggle indent scale=0.8 box "~/museum/" fit move right 0.1 line right dotted move right 0.05 box invis "where one stores valuable fossils" ljust arrow down 50% from first box.s then right 50% |
︙ |
Changes to www/grep.md.
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - + | Fossil `grep` doesn’t support any of the GNU and BSD `grep` extensions. For instance, it doesn’t support the common `-R` extension to POSIX, which would presumably search a subtree of managed files. If Fossil does one day get this feature, it would have a different option letter, since `-R` in Fossil has a different meaning, by convention. Until then, you can get the same effect on systems with a POSIX shell like so: |
︙ |
Changes to www/hashes.md.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | + - + - - - + + + | # Hashes: Fossil Artifact Identification All artifacts in Fossil are identified by a unique hash, currently using [the SHA3 algorithm by default][hpol], but historically using the SHA1 algorithm: <table border="1" cellspacing="0" cellpadding="10"> |
︙ |
Changes to www/hashpolicy.wiki.
︙ | |||
166 167 168 169 170 171 172 | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | - + - + | repositories can be overridden using the "--sha1" option to the "fossil new" command. If you are still on Fossil 2.1 through 2.9 but you want Fossil to go ahead and start using SHA3 hashes, change the hash policy to "sha3" using a command like this: |
︙ |
Changes to www/hints.wiki.
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | - - + + - + - | on in the Fossil repository on 2008-01-01, visit [/timeline?c=2008-01-01]. 7. Further to the previous two hints, there are lots of query parameters that you can add to timeline pages. The available query parameters are tersely documented [/help?cmd=/timeline | here]. |
︙ |
Changes to www/image-format-vs-repo-size.md.
︙ | |||
157 158 159 160 161 162 163 | 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + - - + + - - + + - - + + - - + + - + - + - - - + + + - - + + - - + + | Since programs that produce and consume binary-compressed data files often make it either difficult or impossible to work with the uncompressed form, we want an automated method for producing the uncompressed form to make Fossil happy while still having the compressed form to keep our content creation applications happy. This `Makefile` should[^makefile] do that for BMP, PNG, SVG, and XLSX files: |
︙ |
Changes to www/index.wiki.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - + - + - - + + - + - - + - + - + - + - + - + - + - + - + - + |
|
︙ |
Changes to www/inout.wiki.
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | - + - + | <title>Import And Export</title> Fossil has the ability to import and export repositories from and to [http://git-scm.com/ | Git]. And since most other version control systems will also import/export from Git, that means that you can import/export a Fossil repository to most version control systems using Git as an intermediary. <h2>Git → Fossil</h2> To import a Git repository into Fossil, say something like: |
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | - + - + | any dependency on the amount of data involved. <h2>Fossil → Git</h2> To convert a Fossil repository into a Git repository, run commands like this: |
︙ | |||
95 96 97 98 99 100 101 | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - + - + - + - + - + - + | artifacts which are known by both Git and Fossil to exist at a given point in time. To illustrate, consider the example of a remote Fossil repository that a user wants to import into a local Git repository. First, the user would clone the remote repository and import it into a new Git repository: |
Changes to www/javascript.md.
︙ | |||
369 370 371 372 373 374 375 | 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | - - - - - - - - + + + + + + + + - - - - - + + + + + | _Workaround:_ You don’t have to use the browser-based wiki editor to maintain your repository’s wiki at all. Fossil’s [`wiki` command][fwc] lets you manipulate wiki documents from the command line. For example, consider this Vi based workflow: ```shell |
︙ | |||
574 575 576 577 578 579 580 | 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 | - + | _Potential Workaround:_ It would not be especially difficult for someone sufficiently motivated to build a Fossil chat gateway, connecting to IRC, Jabber, etc. The messages are stored in the repository’s `chat` table with monotonically increasing IDs, so a poller that did something like |
︙ |
Changes to www/loadmgmt.md.
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | - + - + - - - - - + + - + | due to excessive requests to expensive pages: 1. An optional cache is available that remembers the 10 most recently requested `/zip` or `/tarball` pages and returns the precomputed answer if the same page is requested again. 2. Page requests can be configured to fail with a |
︙ |
Changes to www/makefile.wiki.
︙ | |||
144 145 146 147 148 149 150 | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + - + - + - + | The VERSION.h header file is generated by a C program: tools/mkversion.c. To run the VERSION.h generator, first compile the tools/mkversion.c source file into a command-line program (named "mkversion.exe") then run: |
︙ | |||
183 184 185 186 187 188 189 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | - + - + - + - + | The mkindex program scans the "src.c" source files looking for special comments that identify routines that implement various Fossil commands, web interface methods, and help text comments. The mkindex program generates some C code that Fossil uses in order to dispatch commands and HTTP requests and to show on-line help. Compile the mkindex program from the mkindex.c source file. Then run: |
︙ | |||
233 234 235 236 237 238 239 | 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | - + - + | The makeheaders program is run once. It scans all inputs source files and generates header files for each one. Note that the sqlite3.c and shell.c source files are not scanned by makeheaders. Makeheaders only runs over "ordinary" source files, not the exceptional source files. However, makeheaders also uses some extra header files as input. The general format is like this: |
︙ | |||
302 303 304 305 306 307 308 | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | - + - + - + - + | However, in practice it is instead recommended to add a respective configure option for the target platform and then perform a clean build. This way the Debug flags are consistently applied across the whole build process. For example, use these Debug flags in addition to other flags passed to the configure scripts: On Linux, *NIX and similar platforms: |
Changes to www/mirrortogithub.md.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + - - + + | 2. Create a new project. GitHub will ask you if you want to prepopulate your project with various things like a README file. Answer "no" to everything. You want a completely blank project. GitHub will then supply you with a URL for your project that will look something like this: |
︙ | |||
56 57 58 59 60 61 62 | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | - + - + | 5. And you are done! Assuming everything worked, your project is now mirrored on GitHub. 6. Whenever you update your project, simply run this command to update the mirror: |
︙ | |||
140 141 142 143 144 145 146 | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | + - + + - + + | ## <a id='ex1'></a>Example GitHub Mirrors As of this writing (2019-03-16) Fossil’s own repository is mirrored on GitHub at: > |
Changes to www/mkindex.tcl.
︙ | |||
164 165 166 167 168 169 170 | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | - - + + | <li> <a href='quickstart.wiki'>Quick-start Guide</a> <li> <a href='$ROOT/help'>Built-in help for commands and webpages</a> <li> <a href='history.md'>Purpose and History of Fossil</a> <li> <a href='build.wiki'>Compiling and installing Fossil</a> <li> <a href='../COPYRIGHT-BSD2.txt'>License</a> <li> <a href='userlinks.wiki'>Miscellaneous Docs for Fossil Users</a> <li> <a href='hacker-howto.wiki'>Fossil Developer's Guide</a> |
︙ |
Changes to www/newrepo.wiki.
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | - + - + - - + + - + - - - + + + + - - - + + + - - + + - - - - + + + + - - + + - + - + - - + + - - + + + | <title>How To Create A New Fossil Repository</title> The [/doc/tip/www/quickstart.wiki|quickstart guide] explains how to get up and running with fossil. But once you're running, what can you do with it? This document will walk you through the process of creating a fossil repository, populating it with files, and then sharing it over the web. The first thing we need to do is create a fossil repository file: <verbatim> |
︙ |
Changes to www/password.wiki.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | <title>Fossil Password Management</title> <h1 align="center">Password Management</h1> Fossil handles user authentication using passwords. Passwords are unique to each repository. Passwords are not part of the persistent state of a project. Passwords are not versioned and are not transmitted from one repository to another during a sync. Passwords are local configuration information that can (and usually does) vary from one repository to the next within the same project. |
︙ | |||
19 20 21 22 23 24 25 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | - + - + - + - + - + - + | The SHA1 hash in the USER.PW field is a hash of a string composed of the project-code, the user login, and the user cleartext password. Suppose user "alice" with password "asdfg" had an account on the Fossil self-hosting repository. Then the value of USER.PW for alice would be the SHA1 hash of |
︙ | |||
114 115 116 117 118 119 120 | 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | - + - + - + - + | This means that when USER.PW holds a cleartext password, the login card will work for both older and newer clients. If the USER.PW on the server only holds the SHA1 hash of the password, then only newer clients will be able to authenticate to the server. The client normally gets the login and password from the "remote URL". |
Changes to www/patchcmd.md.
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | - + | # The "fossil patch" command The "[fossil patch](/help?cmd=patch)" command is designed to transfer uncommitted changes from one check-out to another, including transfering those changes to other machines. For example, if you are working on a Windows desktop and you want to test your changes on a Linux server before you commit, you can use the "fossil patch push" command to make a copy of all your changes on the remote Linux server: |
︙ | |||
33 34 35 36 37 38 39 | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - + - + | The "fossil patch push" and "fossil patch pull" commands will only work if you have "ssh" available on the local machine and if "fossil" is on the default PATH on the remote machine. To check if Fossil is installed correctly on the remote, try a command like this: |
︙ | |||
90 91 92 93 94 95 96 | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - + - + - + - + | The "fossil patch apply" command reads the database that is the patch file and applies it to the local check-out. If a filename is given as an argument, then the database is read from that file. If the argument is "-" then the database is read from standard input. Hence the command: |
Changes to www/permutedindex.html.
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | - - + + | <li> <a href='quickstart.wiki'>Quick-start Guide</a> <li> <a href='$ROOT/help'>Built-in help for commands and webpages</a> <li> <a href='history.md'>Purpose and History of Fossil</a> <li> <a href='build.wiki'>Compiling and installing Fossil</a> <li> <a href='../COPYRIGHT-BSD2.txt'>License</a> <li> <a href='userlinks.wiki'>Miscellaneous Docs for Fossil Users</a> <li> <a href='hacker-howto.wiki'>Fossil Developer's Guide</a> |
︙ |
Changes to www/pikchr.md.
︙ | |||
20 21 22 23 24 25 26 | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - - - - - - - + + + + + + + | arrow <-> down 70% from last box.s box same "Pikchr" "Formatter" "(pikchr.c)" fit ``` The diagram above was generated by the following lines of Markdown: ~~~~~ |
︙ | |||
89 90 91 92 93 94 95 | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 | - - - + + + - - - + + + - - - + + + | content is interpreted as Pikchr script and is replaced by the equivalent SVG. So either of these work: [fcb]: https://spec.commonmark.org/0.29/#fenced-code-blocks ~~~~~~ |
︙ |
Changes to www/pop.wiki.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | <title>Principles Of Operation</title> <h1 align="center">Principles Of Operation</h1> This page attempts to define the foundational principals upon which Fossil is built. * A project consists of source files, wiki pages, and trouble tickets, and control files (collectively "artifacts"). All historical copies of all artifacts |
︙ |
Changes to www/private.wiki.
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | - + - + - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - + | <title>Private Branches</title> By default, everything you check into a Fossil repository is shared to all clones of that repository. In Fossil, you don't push and pull individual branches; you push and pull everything all at once. But sometimes users want to keep some private work that is not shared with others. This might be a preliminary or experimental change that needs further refinement before it is shared and which might never be shared at all. To do this in Fossil, simply commit the change with the --private command-line option: |
︙ | |||
99 100 101 102 103 104 105 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - + - + | again, this restriction is designed to make it hard to accidentally push private branches beyond their intended audience. <h2>Purging Private Branches</h2> You can remove all private branches from a repository using this command: |
Changes to www/qandc.wiki.
1 2 3 4 5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | + + - + - + - + - + - + - + - + - + - + - + | <title>Questions And Criticisms</title> <nowiki> <h1 align="center">Questions And Criticisms</h1> This page is a collection of real questions and criticisms that were raised against Fossil early in its history (circa 2008). This page is old and has not been kept up-to-date. See the |
︙ | |||
103 104 105 106 107 108 109 | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | - + - + - + - + - + - + + - + + + | of tickets to developers with check-in privileges and an installed copy of the fossil executable. Casual passers-by on the internet should be permitted to create tickets. </ol> These points are reiterated in the opening paragraphs of the <a href="bugtheory.wiki">Bug-Tracking In Fossil</a> document. |
Changes to www/quickstart.wiki.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | + + + - - - + + + + | <title>Fossil Quick Start Guide</title> <h1 align="center">Fossil Quick Start</h1> This is a guide to help you get started using the Fossil [https://en.wikipedia.org/wiki/Distributed_version_control|Distributed Version Control System] quickly and painlessly. <h2 id="install">Installing</h2> Fossil is a single self-contained C program. You need to either download a [https://fossil-scm.org/home/uv/download.html|precompiled binary] or <a href="build.wiki">compile it yourself</a> from sources. Install Fossil by putting the fossil binary someplace on your $PATH. You can test that Fossil is present and working like this: <blockquote> <b> |
︙ | |||
42 43 44 45 46 47 48 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | + - - + + + - - + + + - + + + + - - - - - - - - - - + + + + + + + + + + + + - + + | operations. <h2 id="new">Starting A New Project</h2> To start a new project with fossil create a new empty repository this way: ([/help/init | more info]) <blockquote> |
︙ | |||
128 129 130 131 132 133 134 | 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | + - + + + + - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - - - + + + + + + + - + + + + - - - + + + + + + - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + | <h2 id="checkout">Checking Out A Local Tree</h2> To work on a project in fossil, you need to check out a local copy of the source tree. Create the directory you want to be the root of your tree and cd into that directory. Then do this: ([/help/open | more info]) <blockquote> |
︙ | |||
300 301 302 303 304 305 306 | 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 | - - - + + + - - - + + + - + - + - - + + - + - + - + - + - + | When you create a new repository, either by cloning an existing project or create a new project of your own, you usually want to do some local configuration. This is easily accomplished using the web-server that is built into fossil. Start the fossil web server like this: ([/help/ui | more info]) |
︙ | |||
395 396 397 398 399 400 401 | 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | - - - - + + + + - + | To merge two branches back together, first [/help/update | update] to the branch you want to merge into. Then do a [/help/merge|merge] of the other branch that you want to incorporate the changes from. For example, to merge "featureX" changes into "trunk" do this: |
︙ | |||
427 428 429 430 431 432 433 | 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 | - + - + - - + + - + | into trunk previously, you can do so again and Fossil will automatically know to pull in only those changes that have occurred since the previous merge. If a merge or update doesn't work out (perhaps something breaks or there are many merge conflicts) then you back up using: |
︙ | |||
494 495 496 497 498 499 500 | 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 | - - - + + + - + - + - + - + - + - + - + - + | If you are behind a restrictive firewall that requires you to use an HTTP proxy to reach the internet, then you can configure the proxy in three different ways. You can tell fossil about your proxy using a command-line option on commands that use the network, <b>sync</b>, <b>clone</b>, <b>push</b>, and <b>pull</b>. |
Changes to www/quotes.wiki.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + | <title>What People Are Saying</title> The following are collected quotes from various forums and blogs about Fossil, Git, and DVCSes in general. This collection is put together by the creator of Fossil, so of course there is selection bias... |
Changes to www/rebaseharm.md.
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + - + | A rebase is really nothing more than a merge (or a series of merges) that deliberately forgets one of the parents of each merge step. To help illustrate this fact, consider the first rebase example from the [Git documentation][gitrebase]. The merge looks like this: |
︙ | |||
93 94 95 96 97 98 99 | 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | - + | ### <a id="clean-diffs"></a>2.2 Rebase does not actually provide better feature-branch diffs Another argument, often cited, is that rebasing a feature branch allows one to see just the changes in the feature branch without the concurrent changes in the main line of development. Consider a hypothetical case: |
︙ | |||
121 122 123 124 125 126 127 | 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | - + | In the above, a feature branch consisting of check-ins C3 and C5 is run concurrently with the main line in check-ins C4 and C6. Advocates for rebase say that you should rebase the feature branch to the tip of main in order to remove main-line development differences from the feature branch's history: |
︙ | |||
156 157 158 159 160 161 162 | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | - + | You could choose to collapse C3\' and C5\' into a single check-in as part of this rebase, but that's a side issue we'll deal with [separately](#collapsing). Because Fossil purposefully lacks rebase, the closest you can get to this same check-in history is the following merge: |
︙ | |||
196 197 198 199 200 201 202 | 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - - - + + + - - - - + + + - | branch and from the mainline, whereas in the rebase case diff(C6,C5\') shows only the feature branch changes. But that argument is comparing apples to oranges, since the two diffs do not have the same baseline. The correct way to see only the feature branch changes in the merge case is not diff(C2,C7) but rather diff(C6,C7). |
︙ | |||
256 257 258 259 260 261 262 | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | - + | branch to the parent repo? Will the many eyeballs even see those errors when they’re intermingled with code implementing some compelling new feature? ## <a id="timestamps"></a>4.0 Rebase causes timestamp confusion Consider the earlier example of rebasing a feature branch: |
︙ |
Changes to www/reviews.wiki.
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | - + - + - + - + - + | <title>Reviews</title> <b>External links:</b> * [https://www.nixtu.info/2010/03/fossil-dvcs-on-go-first-impressions.html | Fossil DVCS on the Go - First Impressions] <b>See Also:</b> * [./quotes.wiki | Short Quotes on Fossil, Git, And DVCSes] <b>Daniel writes on 2009-01-06:</b> |
︙ | |||
133 134 135 136 137 138 139 | 133 134 135 136 137 138 139 140 | - + | I remember my first reaction to fossil being, "this will be an excellent solution for small projects (like the dozens we've all got sitting on our hard drives but which don't justify the hassle of version control)." A year of daily use in over 15 source trees has confirmed that, and I continue to heartily recommend fossil to other developers I know who also have their own collection of "unhosted" pet projects. |
Changes to www/scgi.wiki.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | - + - + - + - + | <title>Fossil SCGI</title> To run Fossil using SCGI, start the [/help/server|fossil server] command with the --scgi command-line option. You will probably also want to specific an alternative TCP/IP port using --port. For example: |
Changes to www/selfcheck.wiki.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 | + + | <title>Fossil Repository Integrity Self-Checks</title> <h1 align="center">Fossil Repository Integrity Self-Checks</h1> Fossil is designed with features to give it a high level of integrity so that users can have confidence that content will never be mangled or lost by Fossil. This note describes the defensive measures that Fossil uses to help prevent information loss due to bugs. |
︙ |
Changes to www/selfhost.wiki.
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | - + - + - + - + - + - + | dozen other smaller projects. This demonstrates that Fossil can run on a low-power host processor. Multiple fossil-based projects can easily be hosted on the same machine, even if that machine is itself one of several dozen virtual machines on single physical box. The CGI script that runs the canonical Fossil self-hosting repository is as follows: |
Changes to www/server/any/cgi.md.
1 2 3 4 5 6 7 8 9 10 11 12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | - - + + | # Serving via CGI A Fossil server can be run from most ordinary web servers as a CGI program. This feature allows Fossil to seamlessly integrate into a larger website. The [self-hosting Fossil repository web site](../../selfhost.wiki) is implemented using CGI. See the [How CGI Works](../../aboutcgi.wiki) page for background information on the CGI protocol. To run Fossil as CGI, create a CGI script (here called "repo") in the CGI directory of your web server with content like this: |
︙ | |||
55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | - - - + + + - - + + - - + + | for scripts like our “`repo`” example. To serve multiple repositories from a directory using CGI, use the "directory:" tag in the CGI script rather than "repository:". You might also want to add a "notfound:" tag to tell where to redirect if the particular repository requested by the URL is not found: |
Changes to www/server/any/http-over-ssh.md.
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | - - - - - + + + + + - + - + | ## 1. Force remote Fossil access through a wrapper script <a id="sshd"></a> Put something like the following into the `sshd_config` file on the Fossil repository server: ``` ssh-config |
︙ | |||
66 67 68 69 70 71 72 | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | - - - - - - + + + + + + | instance with certain parameters in order to set up the HTTP-based sync protocol over that SSH tunnel. We need to preserve some of this command and rewrite other parts to make this work. Here is a simpler variant of Andy’s original wrapper script: ``` sh |
︙ | |||
102 103 104 105 106 107 108 | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - + | is not the case everywhere. If the script fails to run on your system, try changing this line to point at `bash`, `dash`, `ksh`, or `zsh`. Also check the absolute paths for local correctness: is `/bin/basename` installed on your system, for example? Under this scheme, you clone with a command like: |
︙ | |||
127 128 129 130 131 132 133 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | - - - - - - - - - - + + + + + + + + + + - - + + | the wrapper script from where you placed it and execute it, and that they have read/write access on the directory where the Fossil repositories are stored. You can achieve all of this on a Linux box with: ``` shell |
︙ |
Changes to www/server/any/inetd.md.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | - + - + | # Serving via inetd A Fossil server can be launched on-demand by `inetd` by using the [`fossil http`](/help/http) command. To do so, add a line like the following to its configuration file, typically `/etc/inetd.conf`: |
︙ |
Changes to www/server/any/none.md.
︙ | |||
26 27 28 29 30 31 32 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | - - + + - + | * “`ui`” launches a local web browser pointed at this URL. You can omit the _REPOSITORY_ argument if you run one of the above commands from within a Fossil checkout directory to serve that repository: |
︙ |
Changes to www/server/any/scgi.md.
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | - - - - - + + + + + - + | # Serving via SCGI There is an alternative to running Fossil as a [standalone HTTP server](./none.md), which is to run it in SimpleCGI (a.k.a. SCGI) mode, which uses the same [`fossil server`](/help/server) command as for HTTP service. Simply add the `--scgi` command-line option and the stand-alone server will speak the SCGI protocol rather than raw HTTP. This can be used with a web server such as [nginx](http://nginx.org) which does not support [Fossil’s CGI mode](./cgi.md). A basic nginx configuration to support SCGI with Fossil looks like this: |
︙ |
Changes to www/server/any/xinetd.md.
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | - - - - - - - - - + + + + + + + + + | # Serving via xinetd Some operating systems have replaced the old Unix `inetd` daemon with `xinetd`, which has a similar mission but with a very different configuration file format. The typical configuration file is either `/etc/xinetd.conf` or a subfile in the `/etc/xinetd.d` directory. You need a configuration something like this for Fossil: |
︙ |
Changes to www/server/debian/nginx.md.
︙ | |||
99 100 101 102 103 104 105 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | - + | ## <a id="deps"></a>Installing the Dependencies The first step is to install some non-default packages we’ll need. SSH into your server, then say: |
︙ | |||
129 130 131 132 133 134 135 | 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | - - + + | ## <a id="config"></a>Configuration On Debian and Ubuntu systems the primary user-level configuration file for nginx is `/etc/nginx/sites-enabled/default`. I recommend that this file contain only a list of include statements, one for each site that server hosts: |
︙ | |||
195 196 197 198 199 200 201 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 | - - - + + + - + - - + + - + | As you can see, this is a pure extension of [the basic nginx service configuration for SCGI][scgii], showing off a few ideas you might want to try on your own site, such as static asset proxying. You also need a `local/code` file containing: |
︙ | |||
244 245 246 247 248 249 250 | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 | - - - - + + + + - - + + - + - - + + - - - + + + | encryption for Fossil](#tls), proxying HTTP instead of SCGI provides no benefit. However, it is still worth showing the proper method of proxying Fossil’s HTTP server through nginx if only to make reading nginx documentation on other sites easier: |
︙ | |||
336 337 338 339 340 341 342 | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | - - - + + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - + + + + | has gotten smarter or our nginx configurations have gotten simpler, so we have removed the manual instructions we used to have here. You may wish to include something like this from each `server { }` block in your configuration to enable TLS in a common, secure way: ``` |
︙ |
Changes to www/server/debian/service.md.
︙ | |||
51 52 53 54 55 56 57 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | - - - + + + - - - - - + + + + + - - + + | create a listener socket on a high-numbered (≥ 1024) TCP port, suitable for sharing a Fossil repo to a workgroup on a private LAN. To do this, write the following in `~/.local/share/systemd/user/fossil.service`: ```dosini |
︙ | |||
88 89 90 91 92 93 94 | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | - - - - - + + + + + - + | follows that it doesn’t need to run as a system service. A user service works perfectly well for this. Because we’ve set this up as a user service, the commands you give to manipulate the service vary somewhat from the sort you’re more likely to find online: |
︙ | |||
163 164 165 166 167 168 169 | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | - - + + - - - - + + + + - - + + - - - + + + - - - - + + + + - - + + - - + + - - - + + + - + - + | roughly equivalent to [the ancient `inetd` method](../any/inetd.md). It’s more complicated, but it has some nice properties. We first need to define the privileged socket listener by writing `/etc/systemd/system/fossil.socket`: ```dosini |
︙ |
Changes to www/server/index.html.
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + - + | <div class='fossil-doc' data-title="How To Configure A Fossil Server"> <style type="text/css"> p { margin-left: 4em; margin-right: 3em; } li p { margin-left: 0; } h2 { margin-left: 1em; } h3 { margin-left: 3em; } ol, ul { margin-left: 3em; } a#all { font-size: 90%; margin-left: 1em; } div#tutpick.show { max-height: 99em; transition: max-height 1000ms ease-in; } div#tutpick { max-height: 0; overflow: hidden; } |
︙ | |||
161 162 163 164 165 166 167 | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | + - + + | <h2 id="matrix">Activation Tutorials</h2> <p>We've broken the configuration for each method out into a series of sub-articles. Some of these are generic, while others depend on particular operating systems or front-end software:</p> <div id="tutpick" class="show"></div> |
︙ | |||
239 240 241 242 243 244 245 | 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | - + | <td class="doc"><a href="windows/cgi.md">✅</a></td> <td class="doc">❌</td> <td class="doc">❌</td> <td class="doc">❌</td> <td class="doc"><a href="windows/iis.md">✅</a></td> <td class="doc"><a href="windows/service.md">✅</a></td> </tr> |
︙ |
Changes to www/server/macos/service.md.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + - + - | However, we will still give two different configurations, just as in the `systemd` article: one for a standalone HTTP server, and one using socket activation. For more information on `launchd`, the single best resource we’ve found is [launchd.info](https://launchd.info). The next best is: |
︙ |
Changes to www/server/openbsd/fastcgi.md.
︙ | |||
16 17 18 19 20 21 22 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | - - - - - - - - + + + + + + + + - + - - - - - + + + + + - - - - - + + + + + - - - - - - - - - - - + + + + + + + + + + + - + - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + | ## <a id="fslinstall"></a>Install Fossil Use the OpenBSD package manager `pkg_add` to install Fossil, making sure to select the statically linked binary. ```console |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | - - - - + + + + - - - - + + + + - - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - + + + - - + + - - - - - - - + + + + + + + - - - - - - - - - - + + + + + + + + + + | In order for `httpd` to serve HTTPS, secure a free certificate from Let's Encrypt using `acme-client`. Before issuing the request, however, ensure you have a zone record for the subdomain with your registrar or nameserver. Then open `/etc/acme-client.conf` as a privileged user to configure the request. ```dosini |
︙ |
Changes to www/server/openbsd/service.wiki.
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | - - + - + - - + - + - + - + - + - + - + - + - - + - + - - - + - + - - + - + | <title>Serving via rc on OpenBSD</title> OpenBSD provides [https://man.openbsd.org/rc.subr.8|rc.subr(8)], a framework for writing [https://man.openbsd.org/rc.8|rc(8)] scripts. <h2>Creating the daemon</h2> |
Changes to www/server/windows/iis.md.
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + | ## Background Fossil Service Setup You will need to have the Fossil HTTP server running in the background, serving some local repository, bound to localhost on a fixed high-numbered TCP port. For the purposes of testing, simply start it by hand in your command shell of choice: |
︙ |
Changes to www/serverext.wiki.
︙ | |||
29 30 31 32 33 34 35 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | - + - + - + - + - + - + | An administrator activates the CGI extension mechanism by specifying an "Extension Root Directory" or "extroot" as part of the [./server/index.html|server setup]. If the Fossil server is itself run as [./server/any/cgi.md|CGI], then add a line to the [./cgi.wiki#extroot|CGI script file] that says: |
︙ | |||
99 100 101 102 103 104 105 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | - + - + | main web server which in turn relays the result back to the original client. <h3>2.2 Example #2</h3> The [https://fossil-scm.org/home|Fossil self-hosting repository] is also a CGI that looks like this: |
︙ | |||
199 200 201 202 203 204 205 | 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | - + - + - + - + - + - + | header and footer, then the inserted header will include a Content Security Policy (CSP) restriction on the use of javascript within the webpage. Any <script>...</script> elements within the CGI output must include a nonce or else they will be suppressed by the web browser. The FOSSIL_NONCE variable contains the value of that nonce. So, in other words, to get javascript to work, it must be enclosed in: |
︙ |
Changes to www/ssl-server.md.
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + - + + | obtaining a CA-signed certificate. ## Usage To put any of the Fossil server commands into SSL/TLS mode, simply add the "--cert" command-line option. > ~~~ |
︙ | |||
84 85 86 87 88 89 90 | 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | + - - - + + + + - - - + + + + - + + + - + + | key and cert. Fossil wants to read certs and public keys in the [PEM format](https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail). PEM is a pure ASCII text format. The private key consists of text like this: > |
︙ | |||
163 164 165 166 167 168 169 | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | + - + + | the repository file. If the "server" or "http" command are run against a directory full of Fossil repositories, then the ".well-known" sub-directory should be in that top-level directory. Thus, to set up a project website, you should first run Fossil in ordinary unencrypted HTTP mode like this: > ~~~ |
Changes to www/ssl.wiki.
︙ | |||
80 81 82 83 84 85 86 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | - - - - - - - - - + + + + + + + + + | passing the <tt>--with-openssl</tt> option to the <tt>configure</tt> script. Type <tt>./configure --help</tt> for details. Another option is to download the source code to OpenSSL and build Fossil against that private version of OpenSSL: <pre> |
︙ | |||
122 123 124 125 126 127 128 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - - - - - + + + + + - + - + | If you are cloning from or syncing to Fossil servers that use a certificate signed by a well-known CA or one of its delegates, Fossil still has to know which CA roots to trust. When this fails, you get an error message that looks like this in Fossil 2.11 and newer: <pre> |
︙ | |||
180 181 182 183 184 185 186 | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | - + | may find it acceptable to use the same Mozilla NSS cert set. I do not know of a way to easily get this from Mozilla themselves, but I did find a [https://curl.se/docs/caextract.html | third party source] for the <tt>cacert.pem</tt> file. I suggest placing the file into your Windows user home directory so that you can then point Fossil at it like so: <pre> |
︙ |
Changes to www/stats.wiki.
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | + - + | <title>Fossil Performance</title> <h1 align="center">Performance Statistics</h1> The questions will inevitably arise: How does Fossil perform? Does it use a lot of disk space or bandwidth? Is it scalable? In an attempt to answers these questions, this report looks at several projects that use fossil for configuration management and examines how well they are working. The following table is a summary of the results. (Last updated on 2018-06-04.) Explanation and analysis follows the table. |
︙ |
Changes to www/sync.wiki.
︙ | |||
46 47 48 49 50 51 52 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + | peer-to-peer communication and without any kind of central authority. If you are already familiar with CRDTs and were wondering if Fossil used them, the answer is "yes". We just don't call them by that name. |
︙ | |||
80 81 82 83 84 85 86 | 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | - + - + - + - - - - - - - - - - - - - - - - - - - - - + - + + - + + + - + + - + - + - - + + - + - - + + - + - + - + + - + + - + + - + - - + + - + | to represent the listener and initiator of the interaction, respectively. Nothing in this protocol requires that the server actually be a back-room processor housed in a datacenter, nor does the client need to be a desktop or handheld device. For the purposes of this article "client" simply means the repository that initiates the conversation and "server" is the repository that responds. Nothing more. |
︙ | |||
280 281 282 283 284 285 286 | 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | - + - - - - + + + + - + + + - + + - + + - + + | the ID of another artifact that is the source of the delta. File cards are sent in both directions: client to server and server to client. A delta might be sent before the source of the delta, so both client and server should remember deltas and be able to apply them when their source arrives. |
︙ | |||
358 359 360 361 362 363 364 | 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | - + - - + + - + - + - - + + - + - + - + | A server will only accept uvfile cards if the login user has the "y" write-unversioned permission. Servers send uvfile cards in response to uvgimme cards received from the client. Clients send uvfile cards when they determine that the server needs the content based on uvigot cards previously received from the server. |
︙ | |||
440 441 442 443 444 445 446 | 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | - + - + - + - + - + | The legacy protocol works well for smaller repositories (50MB with 50,000 artifacts) but is too slow and unwieldy for larger repositories. The version 2 protocol is an effort to improve performance. Further performance improvements with higher-numbered clone protocols are possible in future versions of Fossil. |
︙ | |||
495 496 497 498 499 500 501 | 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 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 | - + - + - + - + - + - + - + - + - + - + - + | When a client receives a "uvigot" card, it checks to see if the file needs to be transferred from client to server or from server to client. If a client-to-server transmission is needed, the client schedules that transfer to occur on a subsequent HTTP request. If a server-to-client transfer is needed, then the client sends a "uvgimme" card back to the server to request the file content. |
︙ | |||
609 610 611 612 613 614 615 | 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 | - + | <li> ignore-glob <li> keep-glob <li> crlf-glob <ul></td><td valign="top"><ul> <li> crnl-glob <li> encoding-glob <li> empty-dirs |
︙ | |||
659 660 661 662 663 664 665 | 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | - + - + - + - + - + - + | values instead of a single value. The content of these configuration items is returned in a "config" card that contains pure SQL text that is intended to be evaluated by the client. The @user and @concealed configuration items contain sensitive information and are ignored for clients without sufficient privilege. |
︙ | |||
769 770 771 772 773 774 775 | 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 | - + - + - + - + - + - + - + - + | a successful commit. This instructs the server to release any lock on any check-in previously held by that client. The ci-unlock pragma helps to avoid false-positive lock warnings that might arise if a check-in is aborted and then restarted on a branch. </ol> |
︙ | |||
843 844 845 846 847 848 849 | 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 | - + - + - + | Any artifact that does not match the specifications of a cluster exactly is not a cluster. There must be no extra whitespace in the artifact. There must be one or more M cards. There must be a single Z card with a correct MD5 checksum. And all cards must be in strict lexicographical order. |
︙ | |||
908 909 910 911 912 913 914 | 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 | - + | amount of overlap between clusters in the common configuration where there is a single server and many clients. The same synchronization protocol will continue to work even if there are multiple servers or if servers and clients sometimes change roles. The only negative effects of these unusual arrangements is that more than the minimum number of clusters might be generated. |
︙ | |||
942 943 944 945 946 947 948 | 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 | - + - + | As with a pull, the steps of a push operation repeat until the server knows all artifacts that exist on the client. Also, as with pull, the client attempts to keep the size of the request from growing too large by suppressing file cards once the size of the request reaches 1MB. |
︙ | |||
992 993 994 995 996 997 998 | 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 | - + | cards and answers "uvgimme" cards with "uvfile" cards in its reply. </ol> The last two steps might be repeated multiple times if there is more unversioned content to be transferred than will fit comfortably in a single HTTP request. |
︙ | |||
1036 1037 1038 1039 1040 1041 1042 | 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 | - + + | <li>Clusters are created automatically on the server during a pull. <li>Repositories keep track of all artifacts that are not named in any cluster and send igot messages for those artifacts. <li>Repositories keep track of all the phantoms they hold and send gimme messages for those artifacts. </ol> |
︙ |
Changes to www/tech_overview.wiki.
| 1 2 3 4 5 6 7 8 9 10 11 | - + + + + |
|
︙ | |||
48 49 50 51 52 53 54 | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | - + - - - - + + + + + - - - - + - - + + + + + - - + + + + + - + + | file that people are normally referring to when they say "a Fossil repository". The checkout database is found in the working checkout for a project and contains state information that is unique to that working checkout. Fossil does not always use all three database files. The web interface, for example, typically only uses the repository database. And the |
︙ | |||
119 120 121 122 123 124 125 | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + - - + + - - + | operations such as "sync" or "rebuild" on all repositories managed by a user. <h4 id="configloc">2.1.1 Location Of The Configuration Database</h4> On Unix systems, the configuration database is named by the following algorithm: |
︙ | |||
154 155 156 157 158 159 160 | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | - + | * %FOSSIL_HOME%/_fossil * %LOCALAPPDATA%/_fossil * %APPDATA%/_fossil * %USERPROFILES%/_fossil * %HOMEDRIVE%%HOMEPATH%/_fossil |
︙ |
Changes to www/th1.md.
︙ | |||
52 53 54 55 56 57 58 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - - - - - + + + + + | that a TH1 script is really just a list of text commands, not a context-free language with a grammar like C/C++. This can be confusing to long-time C/C++ programmers because TH1 does look a lot like C/C++, but the semantics of TH1 are closer to FORTH or Lisp than they are to C. Consider the `if` command in TH1. |
︙ | |||
81 82 83 84 85 86 87 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | - - - - - - + + + + + + - - - + + + | All of this also explains the emphasis on *unescaped* characters above: the curly braces `{ }` are string quoting characters in Tcl/TH1, not block delimiters as in C. This is how we can have a command that extends over multiple lines. It is also why the `else` keyword must be cuddled up with the closing brace for the `if` clause's scriptlet. The following is invalid Tcl/TH1: |
︙ | |||
296 297 298 299 300 301 302 | 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | - - - - - - + + + + + + | the term is true if all of the capability letters in that term are available to the "anonymous" user. Or, if the term is "*" then it is always true. Examples: ``` |
︙ | |||
681 682 683 684 685 686 687 | 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 | - + - + | 1. **w** -- _Wiki_ To be clear, only one of the document classes identified by each STRING needs to be searchable in order for that argument to be true. But all arguments must be true for this routine to return true. Hence, to see if ALL document classes are searchable: |
︙ |
Changes to www/theory1.wiki.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 | + | <title>Thoughts On The Design Of The Fossil DVCS</title> <h1 align="center">Thoughts On The Design Of The Fossil DVCS</h1> Two questions (or criticisms) that arise frequently regarding Fossil can be summarized as follows: 1. Why is Fossil based on SQLite instead of a distributed NoSQL database? 2. Why is Fossil written in C instead of a modern high-level language? |
︙ |
Changes to www/tickets.wiki.
︙ | |||
45 46 47 48 49 50 51 | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | - + | <h3>2.1 Ticket Table Schema</h3> The two ticket tables are called TICKET and TICKETCHNG. The default schema (as of this writing) for these two tables is shown below: |
︙ | |||
76 77 78 79 80 81 82 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + | -- Add as many fields as required below this line login TEXT, username TEXT, mimetype TEXT, icomment TEXT ); CREATE INDEX ticketchng_idx1 ON ticketchng(tkt_id, tkt_mtime); |
︙ |
Changes to www/unvers.wiki.
1 2 3 4 5 6 7 8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | + - + | <title>Unversioned Content</title> <h1 align="center">Unversioned Content</h1> "Unversioned content" or "unversioned files" are files stored in a Fossil repository without history, meaning it retains the newest version of each such file, and that alone. Though it omits history, Fossil does sync unversioned content between repositories. In the event of a conflict during a sync, it retains |
︙ | |||
31 32 33 34 35 36 37 | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + - + | the [/help?cmd=/uvlist|/uvlist] URL. ([/uvlist|example]). <h2>Syncing Unversioned Files</h2> Unversioned content does not sync between repositories by default. One must request it via commands such as: |
︙ | |||
69 70 71 72 73 74 75 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - + - + - + - + - + - + - + | <i>(This section outlines the current implementation of unversioned files. This is not an interface spec and hence subject to change.)</i> Unversioned content is stored in the repository in the "unversioned" table: |
Changes to www/webui.wiki.
︙ | |||
30 31 32 33 34 35 36 | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | - + - + - + - + | As an example of how useful this web interface can be, the entire [./index.wiki | Fossil website], including the document you are now reading, is rendered using the Fossil web interface, with no enhancements, and little customization. |
︙ | |||
151 152 153 154 155 156 157 | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | + - - + + + + - - + + + | available to a distributed team by simply copying the single repository file up to a web server that supports CGI or SCGI. To run Fossil as CGI, just put the <b>sample-project.fossil</b> file in a directory where CGI scripts have both read and write permission on the file and the directory that contains the file, then add a CGI script that looks something like this: <verbatim> |
Changes to www/whyusefossil.wiki.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - - - - + + + + + - + - |
|
︙ | |||
35 36 37 38 39 40 41 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | - + - + - + | <li>Everyone always has the latest code <li>Failed disk-drives cause no loss of work <li>Avoid wasting time doing manual file copying <li>Avoid human errors during manual backups </ol> </ol> |
︙ | |||
85 86 87 88 89 90 91 | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | - + | <li><p><b>rm/mv</b> → Short for 'remove' and 'move', these commands are like "add" in that they specify pending changes to the structure of the check-out. As with "add", no changes are made to the repository until the next "commit". </ul> |
︙ | |||
140 141 142 143 144 145 146 | 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | - + | humans, so best practice is to give each branch a unique name. <li><p>The name of a branch can be changed by adding special tags to the first check-in of a branch. The name assigned by this special tag automatically propagates to all direct children. </ul> </ul> |
︙ |