/usr/include/subversion-1/svn_wc.h is in libsvn-dev 1.8.10-6+deb8u6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 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 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 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 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 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 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 946 947 948 949 950 951 952 953 954 955 956 957 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 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 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 1067 1068 1069 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 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 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 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 1269 1270 1271 1272 1273 1274 1275 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 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 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 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 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 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 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 1546 1547 1548 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 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 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 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 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 1736 1737 1738 1739 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 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 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 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 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 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 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 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 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 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 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 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 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 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 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 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 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 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 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 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 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 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 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 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 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 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 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 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 7143 7144 7145 7146 7147 7148 7149 7150 7151 7152 7153 7154 7155 7156 7157 7158 7159 7160 7161 7162 7163 7164 7165 7166 7167 7168 7169 7170 7171 7172 7173 7174 7175 7176 7177 7178 7179 7180 7181 7182 7183 7184 7185 7186 7187 7188 7189 7190 7191 7192 7193 7194 7195 7196 7197 7198 7199 7200 7201 7202 7203 7204 7205 7206 7207 7208 7209 7210 7211 7212 7213 7214 7215 7216 7217 7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 7230 7231 7232 7233 7234 7235 7236 7237 7238 7239 7240 7241 7242 7243 7244 7245 7246 7247 7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 7259 7260 7261 7262 7263 7264 7265 7266 7267 7268 7269 7270 7271 7272 7273 7274 7275 7276 7277 7278 7279 7280 7281 7282 7283 7284 7285 7286 7287 7288 7289 7290 7291 7292 7293 7294 7295 7296 7297 7298 7299 7300 7301 7302 7303 7304 7305 7306 7307 7308 7309 7310 7311 7312 7313 7314 7315 7316 7317 7318 7319 7320 7321 7322 7323 7324 7325 7326 7327 7328 7329 7330 7331 7332 7333 7334 7335 7336 7337 7338 7339 7340 7341 7342 7343 7344 7345 7346 7347 7348 7349 7350 7351 7352 7353 7354 7355 7356 7357 7358 7359 7360 7361 7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 7373 7374 7375 7376 7377 7378 7379 7380 7381 7382 7383 7384 7385 7386 7387 7388 7389 7390 7391 7392 7393 7394 7395 7396 7397 7398 7399 7400 7401 7402 7403 7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 7472 7473 7474 7475 7476 7477 7478 7479 7480 7481 7482 7483 7484 7485 7486 7487 7488 7489 7490 7491 7492 7493 7494 7495 7496 7497 7498 7499 7500 7501 7502 7503 7504 7505 7506 7507 7508 7509 7510 7511 7512 7513 7514 7515 7516 7517 7518 7519 7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 7533 7534 7535 7536 7537 7538 7539 7540 7541 7542 7543 7544 7545 7546 7547 7548 7549 7550 7551 7552 7553 7554 7555 7556 7557 7558 7559 7560 7561 7562 7563 7564 7565 7566 7567 7568 7569 7570 7571 7572 7573 7574 7575 7576 7577 7578 7579 7580 7581 7582 7583 7584 7585 7586 7587 7588 7589 7590 7591 7592 7593 7594 7595 7596 7597 7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 7695 7696 7697 7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 7720 7721 7722 7723 7724 7725 7726 7727 7728 7729 7730 7731 7732 7733 7734 7735 7736 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7749 7750 7751 7752 7753 7754 7755 7756 7757 7758 7759 7760 7761 7762 7763 7764 7765 7766 7767 7768 7769 7770 7771 7772 7773 7774 7775 7776 7777 7778 7779 7780 7781 7782 7783 7784 7785 7786 7787 7788 7789 7790 7791 7792 7793 7794 7795 7796 7797 7798 7799 7800 7801 7802 7803 7804 7805 7806 7807 7808 7809 7810 7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 7913 7914 7915 7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 7936 7937 7938 7939 7940 7941 7942 7943 7944 7945 7946 7947 7948 7949 7950 7951 7952 7953 7954 7955 7956 7957 7958 7959 7960 7961 7962 7963 7964 7965 7966 7967 7968 7969 7970 7971 7972 7973 7974 7975 7976 7977 7978 7979 7980 7981 7982 7983 7984 7985 7986 7987 7988 7989 7990 7991 7992 7993 7994 7995 7996 7997 7998 7999 8000 8001 8002 8003 8004 8005 8006 8007 8008 8009 8010 8011 8012 8013 8014 8015 8016 8017 8018 8019 8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 8115 8116 8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 8136 8137 8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 8153 8154 8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 8170 8171 8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 | /**
* @copyright
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
* @endcopyright
*
* @file svn_wc.h
* @brief Subversion's working copy library
*
* Requires:
* - A working copy
*
* Provides:
* - Ability to manipulate working copy's versioned data.
* - Ability to manipulate working copy's administrative files.
*
* Used By:
* - Clients.
*
* Notes:
* The 'path' parameters to most of the older functions can be
* absolute or relative (relative to current working
* directory). If there are any cases where they are
* relative to the path associated with the
* 'svn_wc_adm_access_t *adm_access' baton passed along with the
* path, those cases should be explicitly documented, and if they
* are not, please fix it. All new functions introduced since
* Subversion 1.7 require absolute paths, unless explicitly
* documented otherwise.
*
* Starting with Subversion 1.7, several arguments are re-ordered
* to be more consistent through the api. The common ordering used
* is:
*
* Firsts:
* - Output arguments
* Then:
* - Working copy context
* - Local abspath
* Followed by:
* - Function specific arguments
* - Specific callbacks with their batons
* Finally:
* - Generic callbacks (with baton) from directly functional to
* just observing:
* - svn_wc_conflict_resolver_func2_t
* - svn_wc_external_update_t
* - svn_cancel_func_t
* - svn_wc_notify_func2_t
* - Result pool
* - Scratch pool.
*/
#ifndef SVN_WC_H
#define SVN_WC_H
#include <apr.h>
#include <apr_pools.h>
#include <apr_tables.h>
#include <apr_hash.h>
#include <apr_time.h>
#include <apr_file_io.h>
#include "svn_types.h"
#include "svn_string.h"
#include "svn_checksum.h"
#include "svn_io.h"
#include "svn_delta.h" /* for svn_stream_t */
#include "svn_opt.h"
#include "svn_ra.h" /* for svn_ra_reporter_t type */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* Get libsvn_wc version information.
*
* @since New in 1.1.
*/
const svn_version_t *
svn_wc_version(void);
/**
* @defgroup svn_wc Working copy management
* @{
*/
/** Flags for use with svn_wc_translated_file2() and svn_wc_translated_stream().
*
* @defgroup translate_flags Translation flags
* @{
*/
/** Translate from Normal Form.
*
* The working copy text bases and repository files are stored
* in normal form. Some files' contents - or ever representation -
* differs between the working copy and the normal form. This flag
* specifies to take the latter form as input and transform it
* to the former.
*
* Either this flag or #SVN_WC_TRANSLATE_TO_NF should be specified,
* but not both.
*/
#define SVN_WC_TRANSLATE_FROM_NF 0x00000000
/** Translate to Normal Form.
*
* Either this flag or #SVN_WC_TRANSLATE_FROM_NF should be specified,
* but not both.
*/
#define SVN_WC_TRANSLATE_TO_NF 0x00000001
/** Force repair of eol styles, making sure the output file consistently
* contains the one eol style as specified by the svn:eol-style
* property and the required translation direction.
*
*/
#define SVN_WC_TRANSLATE_FORCE_EOL_REPAIR 0x00000002
/** Don't register a pool cleanup to delete the output file */
#define SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP 0x00000004
/** Guarantee a new file is created on successful return.
* The default shortcuts translation by returning the path
* of the untranslated file when no translation is required.
*/
#define SVN_WC_TRANSLATE_FORCE_COPY 0x00000008
/** Use a non-wc-local tmp directory for creating output files,
* instead of in the working copy admin tmp area which is the default.
*
* @since New in 1.4.
*/
#define SVN_WC_TRANSLATE_USE_GLOBAL_TMP 0x00000010
/** @} */
/**
* @defgroup svn_wc_context Working copy context
* @{
*/
/** The context for all working copy interactions.
*
* This is the client-facing datastructure API consumers are required
* to create and use when interacting with a working copy. Multiple
* contexts can be created for the same working copy simultaneously, within
* the same process or different processes. Context mutexing will be handled
* internally by the working copy library.
*
* @note: #svn_wc_context_t should be passed by non-const pointer in all
* APIs, even for read-only operations, as it contains mutable data (caching,
* etc.).
*
* @since New in 1.7.
*/
typedef struct svn_wc_context_t svn_wc_context_t;
/** Create a context for the working copy, and return it in @a *wc_ctx. This
* context is not associated with a particular working copy, but as operations
* are performed, will load the appropriate working copy information.
*
* @a config should hold the various configuration options that may apply to
* this context. It should live at least as long as @a result_pool. It may
* be @c NULL.
*
* The context will be allocated in @a result_pool, and will use @a
* result_pool for any internal allocations requiring the same longevity as
* the context. The context will be automatically destroyed, and its
* resources released, when @a result_pool is cleared, or it may be manually
* destroyed by invoking svn_wc_context_destroy().
*
* Use @a scratch_pool for temporary allocations. It may be cleared
* immediately upon returning from this function.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_context_create(svn_wc_context_t **wc_ctx,
const svn_config_t *config,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Destroy the working copy context described by @a wc_ctx, releasing any
* acquired resources.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_context_destroy(svn_wc_context_t *wc_ctx);
/** @} */
/**
* Locking/Opening/Closing using adm access batons.
*
* @defgroup svn_wc_adm_access Adm access batons (deprecated)
* @{
*/
/** Baton for access to a working copy administrative area.
*
* Access batons can be grouped into sets, by passing an existing open
* baton when opening a new baton. Given one baton in a set, other batons
* may be retrieved. This allows an entire hierarchy to be locked, and
* then the set of batons can be passed around by passing a single baton.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
* New code should use a #svn_wc_context_t object to access the working
* copy.
*/
typedef struct svn_wc_adm_access_t svn_wc_adm_access_t;
/**
* Return, in @a *adm_access, a pointer to a new access baton for the working
* copy administrative area associated with the directory @a path. If
* @a write_lock is TRUE the baton will include a write lock, otherwise the
* baton can only be used for read access. If @a path refers to a directory
* that is already write locked then the error #SVN_ERR_WC_LOCKED will be
* returned. The error #SVN_ERR_WC_NOT_DIRECTORY will be returned if
* @a path is not a versioned directory.
*
* If @a associated is an open access baton then @a adm_access will be added
* to the set containing @a associated. @a associated can be @c NULL, in
* which case @a adm_access is the start of a new set.
*
* @a levels_to_lock specifies how far to lock. Zero means just the specified
* directory. Any negative value means to lock the entire working copy
* directory hierarchy under @a path. A positive value indicates the number of
* levels of directories to lock -- 1 means just immediate subdirectories, 2
* means immediate subdirectories and their subdirectories, etc. All the
* access batons will become part of the set containing @a adm_access. This
* is an all-or-nothing option, if it is not possible to lock all the
* requested directories then an error will be returned and @a adm_access will
* be invalid, with the exception that subdirectories of @a path that are
* missing from the physical filesystem will not be locked and will not cause
* an error. The error #SVN_ERR_WC_LOCKED will be returned if a
* subdirectory of @a path is already write locked.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
* if the client has canceled the operation.
*
* @a pool will be used to allocate memory for the baton and any subsequently
* cached items. If @a adm_access has not been closed when the pool is
* cleared, it will be closed automatically at that point, and removed from
* its set. A baton closed in this way will not remove physical locks from
* the working copy if cleanup is required.
*
* The first baton in a set, with @a associated passed as @c NULL, must have
* the longest lifetime of all the batons in the set. This implies it must be
* the root of the hierarchy.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.6 API.
* Callers should use a #svn_wc_context_t object to access the working
* copy.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_open3(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
svn_boolean_t write_lock,
int levels_to_lock,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_adm_open3(), but without cancellation support.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_open2(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
svn_boolean_t write_lock,
int levels_to_lock,
apr_pool_t *pool);
/**
* Similar to svn_wc_adm_open2(), but with @a tree_lock instead of
* @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock
* is @c TRUE, else 0.
*
* @deprecated Provided for backward compatibility with the 1.0 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_open(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
svn_boolean_t write_lock,
svn_boolean_t tree_lock,
apr_pool_t *pool);
/**
* Checks the working copy to determine the node type of @a path. If
* @a path is a versioned directory then the behaviour is like that of
* svn_wc_adm_open3(), otherwise, if @a path is a file or does not
* exist, then the behaviour is like that of svn_wc_adm_open3() with
* @a path replaced by the parent directory of @a path. If @a path is
* an unversioned directory, the behaviour is also like that of
* svn_wc_adm_open3() on the parent, except that if the open fails,
* then the returned #SVN_ERR_WC_NOT_DIRECTORY error refers to @a path,
* not to @a path's parent.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.6 API.
* Callers should use a #svn_wc_context_t object to access the working
* copy.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_probe_open3(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
svn_boolean_t write_lock,
int levels_to_lock,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_adm_probe_open3() without the cancel
* functionality.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_probe_open2(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
svn_boolean_t write_lock,
int levels_to_lock,
apr_pool_t *pool);
/**
* Similar to svn_wc_adm_probe_open2(), but with @a tree_lock instead of
* @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock
* is @c TRUE, else 0.
*
* @deprecated Provided for backward compatibility with the 1.0 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_probe_open(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
svn_boolean_t write_lock,
svn_boolean_t tree_lock,
apr_pool_t *pool);
/**
* Open access batons for @a path and return in @a *anchor_access and
* @a *target the anchor and target required to drive an editor. Return
* in @a *target_access the access baton for the target, which may be the
* same as @a *anchor_access (in which case @a *target is the empty
* string, never NULL). All the access batons will be in the
* @a *anchor_access set.
*
* @a levels_to_lock determines the levels_to_lock used when opening
* @a path if @a path is a versioned directory, @a levels_to_lock is
* ignored otherwise. If @a write_lock is @c TRUE the access batons
* will hold write locks.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
* if the client has canceled the operation.
*
* This function is essentially a combination of svn_wc_adm_open3() and
* svn_wc_get_actual_target(), with the emphasis on reducing physical IO.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.6 API.
* Callers should use a #svn_wc_context_t object to access the working
* copy.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_open_anchor(svn_wc_adm_access_t **anchor_access,
svn_wc_adm_access_t **target_access,
const char **target,
const char *path,
svn_boolean_t write_lock,
int levels_to_lock,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/** Return, in @a *adm_access, a pointer to an existing access baton associated
* with @a path. @a path must be a directory that is locked as part of the
* set containing the @a associated access baton.
*
* If the requested access baton is marked as missing in, or is simply
* absent from, @a associated, return #SVN_ERR_WC_NOT_LOCKED.
*
* @a pool is used only for local processing, it is not used for the batons.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_retrieve(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
apr_pool_t *pool);
/** Check the working copy to determine the node type of @a path. If
* @a path is a versioned directory then the behaviour is like that of
* svn_wc_adm_retrieve(), otherwise, if @a path is a file, an unversioned
* directory, or does not exist, then the behaviour is like that of
* svn_wc_adm_retrieve() with @a path replaced by the parent directory of
* @a path.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_probe_retrieve(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
apr_pool_t *pool);
/**
* Try various ways to obtain an access baton for @a path.
*
* First, try to obtain @a *adm_access via svn_wc_adm_probe_retrieve(),
* but if this fails because @a associated can't give a baton for
* @a path or @a path's parent, then try svn_wc_adm_probe_open3(),
* this time passing @a write_lock and @a levels_to_lock. If there is
* still no access because @a path is not a versioned directory, then
* just set @a *adm_access to NULL and return success. But if it is
* because @a path is locked, then return the error #SVN_ERR_WC_LOCKED,
* and the effect on @a *adm_access is undefined. (Or if the attempt
* fails for any other reason, return the corresponding error, and the
* effect on @a *adm_access is also undefined.)
*
* If svn_wc_adm_probe_open3() succeeds, then add @a *adm_access to
* @a associated.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
* if the client has canceled the operation.
*
* Use @a pool only for local processing, not to allocate @a *adm_access.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_probe_try3(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
svn_boolean_t write_lock,
int levels_to_lock,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_adm_probe_try3() without the cancel
* functionality.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_probe_try2(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
svn_boolean_t write_lock,
int levels_to_lock,
apr_pool_t *pool);
/**
* Similar to svn_wc_adm_probe_try2(), but with @a tree_lock instead of
* @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock
* is @c TRUE, else 0.
*
* @deprecated Provided for backward compatibility with the 1.0 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_probe_try(svn_wc_adm_access_t **adm_access,
svn_wc_adm_access_t *associated,
const char *path,
svn_boolean_t write_lock,
svn_boolean_t tree_lock,
apr_pool_t *pool);
/** Give up the access baton @a adm_access, and its lock if any. This will
* recursively close any batons in the same set that are direct
* subdirectories of @a adm_access. Any physical locks will be removed from
* the working copy. Lock removal is unconditional, there is no check to
* determine if cleanup is required.
*
* Any temporary allocations are performed using @a scratch_pool.
*
* @since New in 1.6
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_close2(svn_wc_adm_access_t *adm_access,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_adm_close2(), but with the internal pool of @a adm_access
* used for temporary allocations.
*
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_adm_close(svn_wc_adm_access_t *adm_access);
/** Return the path used to open the access baton @a adm_access.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
const char *
svn_wc_adm_access_path(const svn_wc_adm_access_t *adm_access);
/** Return the pool used by access baton @a adm_access.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
apr_pool_t *
svn_wc_adm_access_pool(const svn_wc_adm_access_t *adm_access);
/** Return @c TRUE is the access baton @a adm_access has a write lock,
* @c FALSE otherwise. Compared to svn_wc_locked() this is a cheap, fast
* function that doesn't access the filesystem.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
* New code should use svn_wc_locked2() instead.
*/
SVN_DEPRECATED
svn_boolean_t
svn_wc_adm_locked(const svn_wc_adm_access_t *adm_access);
/** @} */
/** Gets up to two booleans indicating whether a path is locked for
* writing.
*
* @a locked_here is set to TRUE when a write lock on @a local_abspath
* exists in @a wc_ctx. @a locked is set to TRUE when there is a
* write_lock on @a local_abspath
*
* @a locked_here and/or @a locked can be NULL when you are not
* interested in a specific value
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_locked2(svn_boolean_t *locked_here,
svn_boolean_t *locked,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
/** Set @a *locked to non-zero if @a path is locked, else set it to zero.
*
* New code should use svn_wc_locked2() instead.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_locked(svn_boolean_t *locked,
const char *path,
apr_pool_t *pool);
/**
* @defgroup svn_wc_adm_dir_name Name of Subversion's admin dir
* @{
*/
/** The default name of the administrative subdirectory.
*
* Ideally, this would be completely private to wc internals (in fact,
* it used to be that adm_subdir() in adm_files.c was the only function
* who knew the adm subdir's name). However, import wants to protect
* against importing administrative subdirs, so now the name is a
* matter of public record.
*
* @deprecated Provided for backward compatibility with the 1.2 API.
*/
#define SVN_WC_ADM_DIR_NAME ".svn"
/**
* Return @c TRUE if @a name is the name of the WC administrative
* directory. Use @a pool for any temporary allocations. Only works
* with base directory names, not paths or URIs.
*
* For compatibility, the default name (.svn) will always be treated
* as an admin dir name, even if the working copy is actually using an
* alternative name.
*
* @since New in 1.3.
*/
svn_boolean_t
svn_wc_is_adm_dir(const char *name, apr_pool_t *pool);
/**
* Return the name of the administrative directory.
* Use @a pool for any temporary allocations.
*
* The returned pointer will refer to either a statically allocated
* string, or to a string allocated in @a pool.
*
* @since New in 1.3.
*/
const char *
svn_wc_get_adm_dir(apr_pool_t *pool);
/**
* Use @a name for the administrative directory in the working copy.
* Use @a pool for any temporary allocations.
*
* The list of valid names is limited. Currently only ".svn" (the
* default) and "_svn" are allowed.
*
* @note This function changes global (per-process) state and must be
* called in a single-threaded context during the initialization of a
* Subversion client.
*
* @since New in 1.3.
*/
svn_error_t *
svn_wc_set_adm_dir(const char *name,
apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_wc_externals Externals
* @{
*/
/** Callback for external definitions updates
*
* @a local_abspath is the path on which the external definition was found.
* @a old_val and @a new_val are the before and after values of the
* SVN_PROP_EXTERNALS property. @a depth is the ambient depth of the
* working copy directory at @a local_abspath.
*
* @since New in 1.7. */
typedef svn_error_t *(*svn_wc_external_update_t)(void *baton,
const char *local_abspath,
const svn_string_t *old_val,
const svn_string_t *new_val,
svn_depth_t depth,
apr_pool_t *scratch_pool);
/** Traversal information is information gathered by a working copy
* crawl or update. For example, the before and after values of the
* svn:externals property are important after an update, and since
* we're traversing the working tree anyway (a complete traversal
* during the initial crawl, and a traversal of changed paths during
* the checkout/update/switch), it makes sense to gather the
* property's values then instead of making a second pass.
*
* New code should use the svn_wc_external_update_t callback instead.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
typedef struct svn_wc_traversal_info_t svn_wc_traversal_info_t;
/** Return a new, empty traversal info object, allocated in @a pool.
*
* New code should use the svn_wc_external_update_t callback instead.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_wc_traversal_info_t *
svn_wc_init_traversal_info(apr_pool_t *pool);
/** Set @a *externals_old and @a *externals_new to hash tables representing
* changes to values of the svn:externals property on directories
* traversed by @a traversal_info.
*
* @a traversal_info is obtained from svn_wc_init_traversal_info(), but is
* only useful after it has been passed through another function, such
* as svn_wc_crawl_revisions(), svn_wc_get_update_editor(),
* svn_wc_get_switch_editor(), etc.
*
* Each hash maps <tt>const char *</tt> directory names onto
* <tt>const char *</tt> values of the externals property for that directory.
* The dir names are full paths -- that is, anchor plus target, not target
* alone. The values are not parsed, they are simply copied raw, and are
* never NULL: directories that acquired or lost the property are
* simply omitted from the appropriate table. Directories whose value
* of the property did not change show the same value in each hash.
*
* The hashes, keys, and values have the same lifetime as @a traversal_info.
*
* New code should use the svn_wc_external_update_t callback instead.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
void
svn_wc_edited_externals(apr_hash_t **externals_old,
apr_hash_t **externals_new,
svn_wc_traversal_info_t *traversal_info);
/** Set @a *depths to a hash table mapping <tt>const char *</tt>
* directory names (directories traversed by @a traversal_info) to
* <tt>const char *</tt> values (the depths of those directories, as
* converted by svn_depth_to_word()).
*
* @a traversal_info is obtained from svn_wc_init_traversal_info(), but is
* only useful after it has been passed through another function, such
* as svn_wc_crawl_revisions(), svn_wc_get_update_editor(),
* svn_wc_get_switch_editor(), etc.
*
* The dir names are full paths -- that is, anchor plus target, not target
* alone. The values are not allocated, they are static constant strings.
* Although the values are never NULL, not all directories traversed
* are necessarily listed. For example, directories which did not
* have an svn:externals property set or modified are not included.
*
* The hashes and keys have the same lifetime as @a traversal_info.
*
* New code should use the svn_wc_external_update_t callback instead.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
void
svn_wc_traversed_depths(apr_hash_t **depths,
svn_wc_traversal_info_t *traversal_info);
/** One external item. This usually represents one line from an
* svn:externals description but with the path and URL
* canonicalized.
*
* In order to avoid backwards compatibility problems clients should use
* svn_wc_external_item2_create() to allocate and initialize this structure
* instead of doing so themselves.
*
* @since New in 1.5.
*/
typedef struct svn_wc_external_item2_t
{
/** The name of the subdirectory into which this external should be
checked out. This is relative to the parent directory that
holds this external item. (Note that these structs are often
stored in hash tables with the target dirs as keys, so this
field will often be redundant.) */
const char *target_dir;
/** Where to check out from. This is possibly a relative external URL, as
* allowed in externals definitions, but without the peg revision. */
const char *url;
/** What revision to check out. The only valid kinds for this are
svn_opt_revision_number, svn_opt_revision_date, and
svn_opt_revision_head. */
svn_opt_revision_t revision;
/** The peg revision to use when checking out. The only valid kinds are
svn_opt_revision_number, svn_opt_revision_date, and
svn_opt_revision_head. */
svn_opt_revision_t peg_revision;
} svn_wc_external_item2_t;
/**
* Initialize an external item.
* Set @a *item to an external item object, allocated in @a pool.
*
* In order to avoid backwards compatibility problems, this function
* is used to initialize and allocate the #svn_wc_external_item2_t
* structure rather than doing so explicitly, as the size of this
* structure may change in the future.
*
* The current implementation never returns error, but callers should
* still check for error, for compatibility with future versions.
*
* @since New in 1.8.
*/
svn_error_t *
svn_wc_external_item2_create(svn_wc_external_item2_t **item,
apr_pool_t *pool);
/** Same as svn_wc_external_item2_create() except the pointer to the new
* empty item is 'const' which is stupid since the next thing you need to do
* is fill in its fields.
*
* @deprecated Provided for backward compatibility with the 1.7 API.
* @since New in 1.5.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_external_item_create(const svn_wc_external_item2_t **item,
apr_pool_t *pool);
/**
* Return a duplicate of @a item, allocated in @a pool. No part of the new
* item will be shared with @a item.
*
* @since New in 1.5.
*/
svn_wc_external_item2_t *
svn_wc_external_item2_dup(const svn_wc_external_item2_t *item,
apr_pool_t *pool);
/**
* One external item. Similar to svn_wc_external_item2_t, except
* @a revision is interpreted as both the operational revision and the
* peg revision.
*
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
typedef struct svn_wc_external_item_t
{
/** Same as #svn_wc_external_item2_t.target_dir */
const char *target_dir;
/** Same as #svn_wc_external_item2_t.url */
const char *url;
/** Same as #svn_wc_external_item2_t.revision */
svn_opt_revision_t revision;
} svn_wc_external_item_t;
/**
* Return a duplicate of @a item, allocated in @a pool. No part of the new
* item will be shared with @a item.
*
* @since New in 1.3.
*
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_wc_external_item_t *
svn_wc_external_item_dup(const svn_wc_external_item_t *item,
apr_pool_t *pool);
/**
* If @a externals_p is non-NULL, set @a *externals_p to an array of
* #svn_wc_external_item2_t * objects based on @a desc.
*
* If the format of @a desc is invalid, don't touch @a *externals_p and
* return #SVN_ERR_CLIENT_INVALID_EXTERNALS_DESCRIPTION. Thus, if
* you just want to check the validity of an externals description,
* and don't care about the parsed result, pass NULL for @a externals_p.
*
* The format of @a desc is the same as for values of the directory
* property #SVN_PROP_EXTERNALS. Look there for more details.
*
* If @a canonicalize_url is @c TRUE, canonicalize the @a url member
* of those objects. If the @a url member refers to an absolute URL,
* it will be canonicalized as URL consistent with the way URLs are
* canonicalized throughout the Subversion API. If, however, the
* @a url member makes use of the recognized (SVN-specific) relative
* URL syntax for svn:externals, "canonicalization" is an ill-defined
* concept which may even result in munging the relative URL syntax
* beyond recognition. You've been warned.
*
* Allocate the table, keys, and values in @a pool.
*
* Use @a parent_directory only in constructing error strings.
*
* @since New in 1.5.
*/
svn_error_t *
svn_wc_parse_externals_description3(apr_array_header_t **externals_p,
const char *parent_directory,
const char *desc,
svn_boolean_t canonicalize_url,
apr_pool_t *pool);
/**
* Similar to svn_wc_parse_externals_description3() with @a
* canonicalize_url set to @c TRUE, but returns an array of
* #svn_wc_external_item_t * objects instead of
* #svn_wc_external_item2_t * objects
*
* @since New in 1.1.
*
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_parse_externals_description2(apr_array_header_t **externals_p,
const char *parent_directory,
const char *desc,
apr_pool_t *pool);
/**
* Similar to svn_wc_parse_externals_description2(), but returns the
* parsed externals in a hash instead of an array. This function
* should not be used, as storing the externals in a hash causes their
* order of evaluation to be not easily identifiable.
*
* @deprecated Provided for backward compatibility with the 1.0 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_parse_externals_description(apr_hash_t **externals_p,
const char *parent_directory,
const char *desc,
apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_wc_notifications Notification callback handling
* @{
*
* In many cases, the WC library will scan a working copy and make
* changes. The caller usually wants to know when each of these changes
* has been made, so that it can display some kind of notification to
* the user.
*
* These notifications have a standard callback function type, which
* takes the path of the file that was affected, and a caller-
* supplied baton.
*
* @note The callback is a 'void' return -- this is a simple
* reporting mechanism, rather than an opportunity for the caller to
* alter the operation of the WC library.
*
* @note Some of the actions are used across several
* different Subversion commands. For example, the update actions are
* also used for checkouts, switches, and merges.
*/
/** The type of action occurring. */
typedef enum svn_wc_notify_action_t
{
/** Adding a path to revision control. */
svn_wc_notify_add = 0,
/** Copying a versioned path. */
svn_wc_notify_copy,
/** Deleting a versioned path. */
svn_wc_notify_delete,
/** Restoring a missing path from the pristine text-base. */
svn_wc_notify_restore,
/** Reverting a modified path. */
svn_wc_notify_revert,
/** A revert operation has failed. */
svn_wc_notify_failed_revert,
/** Resolving a conflict. */
svn_wc_notify_resolved,
/** Skipping a path. */
svn_wc_notify_skip,
/** Got a delete in an update. */
svn_wc_notify_update_delete,
/** Got an add in an update. */
svn_wc_notify_update_add,
/** Got any other action in an update. */
svn_wc_notify_update_update,
/** The last notification in an update (including updates of externals). */
svn_wc_notify_update_completed,
/** Updating an external module. */
svn_wc_notify_update_external,
/** The last notification in a status (including status on externals). */
svn_wc_notify_status_completed,
/** Running status on an external module. */
svn_wc_notify_status_external,
/** Committing a modification. */
svn_wc_notify_commit_modified,
/** Committing an addition. */
svn_wc_notify_commit_added,
/** Committing a deletion. */
svn_wc_notify_commit_deleted,
/** Committing a replacement. */
svn_wc_notify_commit_replaced,
/** Transmitting post-fix text-delta data for a file. */
svn_wc_notify_commit_postfix_txdelta,
/** Processed a single revision's blame. */
svn_wc_notify_blame_revision,
/** Locking a path. @since New in 1.2. */
svn_wc_notify_locked,
/** Unlocking a path. @since New in 1.2. */
svn_wc_notify_unlocked,
/** Failed to lock a path. @since New in 1.2. */
svn_wc_notify_failed_lock,
/** Failed to unlock a path. @since New in 1.2. */
svn_wc_notify_failed_unlock,
/** Tried adding a path that already exists. @since New in 1.5. */
svn_wc_notify_exists,
/** Changelist name set. @since New in 1.5. */
svn_wc_notify_changelist_set,
/** Changelist name cleared. @since New in 1.5. */
svn_wc_notify_changelist_clear,
/** Warn user that a path has moved from one changelist to another.
@since New in 1.5.
@deprecated As of 1.7, separate clear and set notifications are sent. */
svn_wc_notify_changelist_moved,
/** A merge operation (to path) has begun. See #svn_wc_notify_t.merge_range.
@since New in 1.5. */
svn_wc_notify_merge_begin,
/** A merge operation (to path) from a foreign repository has begun.
See #svn_wc_notify_t.merge_range. @since New in 1.5. */
svn_wc_notify_foreign_merge_begin,
/** Replace notification. @since New in 1.5. */
svn_wc_notify_update_replace,
/** Property added. @since New in 1.6. */
svn_wc_notify_property_added,
/** Property updated. @since New in 1.6. */
svn_wc_notify_property_modified,
/** Property deleted. @since New in 1.6. */
svn_wc_notify_property_deleted,
/** Nonexistent property deleted. @since New in 1.6. */
svn_wc_notify_property_deleted_nonexistent,
/** Revprop set. @since New in 1.6. */
svn_wc_notify_revprop_set,
/** Revprop deleted. @since New in 1.6. */
svn_wc_notify_revprop_deleted,
/** The last notification in a merge. @since New in 1.6. */
svn_wc_notify_merge_completed,
/** The path is a tree-conflict victim of the intended action (*not*
* a persistent tree-conflict from an earlier operation, but *this*
* operation caused the tree-conflict). @since New in 1.6. */
svn_wc_notify_tree_conflict,
/** The path is a subdirectory referenced in an externals definition
* which is unable to be operated on. @since New in 1.6. */
svn_wc_notify_failed_external,
/** Starting an update operation. @since New in 1.7. */
svn_wc_notify_update_started,
/** An update tried to add a file or directory at a path where
* a separate working copy was found. @since New in 1.7. */
svn_wc_notify_update_skip_obstruction,
/** An explicit update tried to update a file or directory that
* doesn't live in the repository and can't be brought in.
* @since New in 1.7. */
svn_wc_notify_update_skip_working_only,
/** An update tried to update a file or directory to which access could
* not be obtained. @since New in 1.7. */
svn_wc_notify_update_skip_access_denied,
/** An update operation removed an external working copy.
* @since New in 1.7. */
svn_wc_notify_update_external_removed,
/** A node below an existing node was added during update.
* @since New in 1.7. */
svn_wc_notify_update_shadowed_add,
/** A node below an existing node was updated during update.
* @since New in 1.7. */
svn_wc_notify_update_shadowed_update,
/** A node below an existing node was deleted during update.
* @since New in 1.7. */
svn_wc_notify_update_shadowed_delete,
/** The mergeinfo on path was updated. @since New in 1.7. */
svn_wc_notify_merge_record_info,
/** A working copy directory was upgraded to the latest format.
* @since New in 1.7. */
svn_wc_notify_upgraded_path,
/** Mergeinfo describing a merge was recorded.
* @since New in 1.7. */
svn_wc_notify_merge_record_info_begin,
/** Mergeinfo was removed due to elision.
* @since New in 1.7. */
svn_wc_notify_merge_elide_info,
/** A file in the working copy was patched.
* @since New in 1.7. */
svn_wc_notify_patch,
/** A hunk from a patch was applied.
* @since New in 1.7. */
svn_wc_notify_patch_applied_hunk,
/** A hunk from a patch was rejected.
* @since New in 1.7. */
svn_wc_notify_patch_rejected_hunk,
/** A hunk from a patch was found to already be applied.
* @since New in 1.7. */
svn_wc_notify_patch_hunk_already_applied,
/** Committing a non-overwriting copy (path is the target of the
* copy, not the source).
* @since New in 1.7. */
svn_wc_notify_commit_copied,
/** Committing an overwriting (replace) copy (path is the target of
* the copy, not the source).
* @since New in 1.7. */
svn_wc_notify_commit_copied_replaced,
/** The server has instructed the client to follow a URL
* redirection.
* @since New in 1.7. */
svn_wc_notify_url_redirect,
/** The operation was attempted on a path which doesn't exist.
* @since New in 1.7. */
svn_wc_notify_path_nonexistent,
/** Removing a path by excluding it.
* @since New in 1.7. */
svn_wc_notify_exclude,
/** Operation failed because the node remains in conflict
* @since New in 1.7. */
svn_wc_notify_failed_conflict,
/** Operation failed because an added node is missing
* @since New in 1.7. */
svn_wc_notify_failed_missing,
/** Operation failed because a node is out of date
* @since New in 1.7. */
svn_wc_notify_failed_out_of_date,
/** Operation failed because an added parent is not selected
* @since New in 1.7. */
svn_wc_notify_failed_no_parent,
/** Operation failed because a node is locked by another user and/or
* working copy. @since New in 1.7. */
svn_wc_notify_failed_locked,
/** Operation failed because the operation was forbidden by the server.
* @since New in 1.7. */
svn_wc_notify_failed_forbidden_by_server,
/** The operation skipped the path because it was conflicted.
* @since New in 1.7. */
svn_wc_notify_skip_conflicted,
/** Just the lock on a file was removed during update.
* @since New in 1.8. */
svn_wc_notify_update_broken_lock,
/** Operation failed because a node is obstructed.
* @since New in 1.8. */
svn_wc_notify_failed_obstruction,
/** Conflict resolver is starting.
* This can be used by clients to detect when to display conflict summary
* information, for example.
* @since New in 1.8. */
svn_wc_notify_conflict_resolver_starting,
/** Conflict resolver is done.
* This can be used by clients to detect when to display conflict summary
* information, for example.
* @since New in 1.8. */
svn_wc_notify_conflict_resolver_done,
/** The current operation left local changes of something that was deleted
* The changes are available on (and below) the notified path
* @since New in 1.8. */
svn_wc_notify_left_local_modifications,
/** A copy from a foreign repository has started
* @since New in 1.8. */
svn_wc_notify_foreign_copy_begin,
/** A move in the working copy has been broken, i.e. degraded into a
* copy + delete. The notified path is the move source (the deleted path).
* ### TODO: Provide path to move destination as well?
* @since New in 1.8. */
svn_wc_notify_move_broken
} svn_wc_notify_action_t;
/** The type of notification that is occurring. */
typedef enum svn_wc_notify_state_t
{
svn_wc_notify_state_inapplicable = 0,
/** Notifier doesn't know or isn't saying. */
svn_wc_notify_state_unknown,
/** The state did not change. */
svn_wc_notify_state_unchanged,
/** The item wasn't present. */
svn_wc_notify_state_missing,
/** An unversioned item obstructed work. */
svn_wc_notify_state_obstructed,
/** Pristine state was modified. */
svn_wc_notify_state_changed,
/** Modified state had mods merged in. */
svn_wc_notify_state_merged,
/** Modified state got conflicting mods. */
svn_wc_notify_state_conflicted,
/** The source to copy the file from is missing. */
svn_wc_notify_state_source_missing
} svn_wc_notify_state_t;
/**
* What happened to a lock during an operation.
*
* @since New in 1.2.
*/
typedef enum svn_wc_notify_lock_state_t
{
svn_wc_notify_lock_state_inapplicable = 0,
svn_wc_notify_lock_state_unknown,
/** The lock wasn't changed. */
svn_wc_notify_lock_state_unchanged,
/** The item was locked. */
svn_wc_notify_lock_state_locked,
/** The item was unlocked. */
svn_wc_notify_lock_state_unlocked
} svn_wc_notify_lock_state_t;
/**
* Structure used in the #svn_wc_notify_func2_t function.
*
* @c kind, @c content_state, @c prop_state and @c lock_state are from
* after @c action, not before.
*
* @note If @c action is #svn_wc_notify_update_completed, then @c path has
* already been installed, so it is legitimate for an implementation of
* #svn_wc_notify_func2_t to examine @c path in the working copy.
*
* @note The purpose of the @c kind, @c mime_type, @c content_state, and
* @c prop_state fields is to provide "for free" information that an
* implementation is likely to want, and which it would otherwise be
* forced to deduce via expensive operations such as reading entries
* and properties. However, if the caller does not have this
* information, it will simply pass the corresponding `*_unknown'
* values, and it is up to the implementation how to handle that
* (i.e., whether to attempt deduction, or just to punt and
* give a less informative notification).
*
* @note Callers of notification functions should use svn_wc_create_notify()
* or svn_wc_create_notify_url() to create structures of this type to allow
* for extensibility.
*
* @since New in 1.2.
*/
typedef struct svn_wc_notify_t {
/** Path, either absolute or relative to the current working directory
* (i.e., not relative to an anchor). @c path is "." or another valid path
* value for compatibility reasons when the real target is a url that
* is available in @c url. */
const char *path;
/** Action that describes what happened to #svn_wc_notify_t.path. */
svn_wc_notify_action_t action;
/** Node kind of @c path. */
svn_node_kind_t kind;
/** If non-NULL, indicates the mime-type of @c path.
* It is always @c NULL for directories. */
const char *mime_type;
/** Points to the lock structure received from the repository when
* @c action is #svn_wc_notify_locked. For other actions, it is
* @c NULL. */
const svn_lock_t *lock;
/** Points to an error describing the reason for the failure when @c
* action is one of the following: #svn_wc_notify_failed_lock,
* #svn_wc_notify_failed_unlock, #svn_wc_notify_failed_external.
* Is @c NULL otherwise. */
svn_error_t *err;
/** The type of notification that is occurring about node content. */
svn_wc_notify_state_t content_state;
/** The type of notification that is occurring about node properties. */
svn_wc_notify_state_t prop_state;
/** Reflects the addition or removal of a lock token in the working copy. */
svn_wc_notify_lock_state_t lock_state;
/** When @c action is #svn_wc_notify_update_completed, target revision
* of the update, or #SVN_INVALID_REVNUM if not available; when @c
* action is #svn_wc_notify_blame_revision, processed revision; Since
* Subversion 1.7 when action is #svn_wc_notify_update_update or
* #svn_wc_notify_update_add, the target revision.
* In all other cases, it is #SVN_INVALID_REVNUM.
*/
svn_revnum_t revision;
/** If @c action pertains to a changelist, this is the changelist name.
* In all other cases, it is @c NULL. @since New in 1.5 */
const char *changelist_name;
/** When @c action is #svn_wc_notify_merge_begin or
* #svn_wc_notify_foreign_merge_begin or
* #svn_wc_notify_merge_record_info_begin, and both the
* left and right sides of the merge are from the same URL. In all
* other cases, it is @c NULL. @since New in 1.5 */
svn_merge_range_t *merge_range;
/** Similar to @c path, but if non-NULL the notification is about a url.
* @since New in 1.6 */
const char *url;
/** If non-NULL, specifies an absolute path prefix that can be subtracted
* from the start of the absolute path in @c path or @c url. Its purpose
* is to allow notification to remove a common prefix from all the paths
* displayed for an operation. @since New in 1.6 */
const char *path_prefix;
/** If @c action relates to properties, specifies the name of the property.
* @since New in 1.6 */
const char *prop_name;
/** If @c action is #svn_wc_notify_blame_revision, contains a list of
* revision properties for the specified revision
* @since New in 1.6 */
apr_hash_t *rev_props;
/** If @c action is #svn_wc_notify_update_update or
* #svn_wc_notify_update_add, contains the revision before the update.
* In all other cases, it is #SVN_INVALID_REVNUM.
* @since New in 1.7 */
svn_revnum_t old_revision;
/** These fields are used by svn patch to identify the
* hunk the notification is for. They are line-based
* offsets and lengths parsed from the unidiff hunk header.
* @since New in 1.7. */
/* @{ */
svn_linenum_t hunk_original_start;
svn_linenum_t hunk_original_length;
svn_linenum_t hunk_modified_start;
svn_linenum_t hunk_modified_length;
/* @} */
/** The line at which a hunk was matched (and applied).
* @since New in 1.7. */
svn_linenum_t hunk_matched_line;
/** The fuzz factor the hunk was applied with.
* @since New in 1.7 */
svn_linenum_t hunk_fuzz;
/* NOTE: Add new fields at the end to preserve binary compatibility.
Also, if you add fields here, you have to update svn_wc_create_notify
and svn_wc_dup_notify. */
} svn_wc_notify_t;
/**
* Allocate an #svn_wc_notify_t structure in @a pool, initialize and return
* it.
*
* Set the @c path field of the created struct to @a path, and @c action to
* @a action. Set all other fields to their @c _unknown, @c NULL or
* invalid value, respectively. Make only a shallow copy of the pointer
* @a path.
*
* @since New in 1.2.
*/
svn_wc_notify_t *
svn_wc_create_notify(const char *path,
svn_wc_notify_action_t action,
apr_pool_t *pool);
/**
* Allocate an #svn_wc_notify_t structure in @a pool, initialize and return
* it.
*
* Set the @c url field of the created struct to @a url, @c path to "." and @c
* action to @a action. Set all other fields to their @c _unknown, @c NULL or
* invalid value, respectively. Make only a shallow copy of the pointer
* @a url.
*
* @since New in 1.6.
*/
svn_wc_notify_t *
svn_wc_create_notify_url(const char *url,
svn_wc_notify_action_t action,
apr_pool_t *pool);
/**
* Return a deep copy of @a notify, allocated in @a pool.
*
* @since New in 1.2.
*/
svn_wc_notify_t *
svn_wc_dup_notify(const svn_wc_notify_t *notify,
apr_pool_t *pool);
/**
* Notify the world that @a notify->action has happened to @a notify->path.
*
* Recommendation: callers of #svn_wc_notify_func2_t should avoid
* invoking it multiple times on the same path within a given
* operation, and implementations should not bother checking for such
* duplicate calls. For example, in an update, the caller should not
* invoke the notify func on receiving a prop change and then again
* on receiving a text change. Instead, wait until all changes have
* been received, and then invoke the notify func once (from within
* an #svn_delta_editor_t's close_file(), for example), passing
* the appropriate @a notify->content_state and @a notify->prop_state flags.
*
* @since New in 1.2.
*/
typedef void (*svn_wc_notify_func2_t)(void *baton,
const svn_wc_notify_t *notify,
apr_pool_t *pool);
/**
* Similar to #svn_wc_notify_func2_t, but takes the information as arguments
* instead of struct fields.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
typedef void (*svn_wc_notify_func_t)(void *baton,
const char *path,
svn_wc_notify_action_t action,
svn_node_kind_t kind,
const char *mime_type,
svn_wc_notify_state_t content_state,
svn_wc_notify_state_t prop_state,
svn_revnum_t revision);
/** @} */
/**
* Interactive conflict handling
*
* @defgroup svn_wc_conflict Conflict callback functionality
* @{
*
* This API gives a Subversion client application the opportunity to
* define a callback that allows the user to resolve conflicts
* interactively during updates and merges.
*
* If a conflict is discovered, libsvn_wc invokes the callback with an
* #svn_wc_conflict_description_t. This structure describes the
* path in conflict, whether it's a text or property conflict, and may
* also present up to three files that can be used to resolve the
* conflict (perhaps by launching an editor or 3rd-party merging
* tool). The structure also provides a possible fourth file (@c
* merged_file) which, if not NULL, represents libsvn_wc's attempt to
* contextually merge the first three files. (Note that libsvn_wc
* will not attempt to merge a file that it believes is binary, and it
* will only attempt to merge property values it believes to be a
* series of multi-line text.)
*
* When the callback is finished interacting with the user, it
* responds by returning a #svn_wc_conflict_result_t. This
* structure indicates whether the user wants to postpone the conflict
* for later (allowing libsvn_wc to mark the path "conflicted" as
* usual), or whether the user wants libsvn_wc to use one of the four
* files as the "final" state for resolving the conflict immediately.
*
* Note that the callback is at liberty (and encouraged) to merge the
* three files itself. If it does so, it signals this to libsvn_wc by
* returning a choice of #svn_wc_conflict_choose_merged. To return
* the 'final' merged file to libsvn_wc, the callback has the option of
* either:
*
* - editing the original @c merged_file in-place
*
* or, if libsvn_wc never supplied a merged_file in the
* description structure (i.e. passed NULL for that field),
*
* - return the merged file in the #svn_wc_conflict_result_t.
*
*/
/** The type of action being attempted on an object.
*
* @since New in 1.5.
*/
typedef enum svn_wc_conflict_action_t
{
svn_wc_conflict_action_edit, /**< attempting to change text or props */
svn_wc_conflict_action_add, /**< attempting to add object */
svn_wc_conflict_action_delete, /**< attempting to delete object */
svn_wc_conflict_action_replace /**< attempting to replace object,
@since New in 1.7 */
} svn_wc_conflict_action_t;
/** The pre-existing condition which is causing a state of conflict.
*
* @since New in 1.5.
*/
typedef enum svn_wc_conflict_reason_t
{
/** Local edits are already present */
svn_wc_conflict_reason_edited,
/** Another object is in the way */
svn_wc_conflict_reason_obstructed,
/** Object is already schedule-delete */
svn_wc_conflict_reason_deleted,
/** Object is unknown or missing */
svn_wc_conflict_reason_missing,
/** Object is unversioned */
svn_wc_conflict_reason_unversioned,
/** Object is already added or schedule-add. @since New in 1.6. */
svn_wc_conflict_reason_added,
/** Object is already replaced. @since New in 1.7. */
svn_wc_conflict_reason_replaced,
/** Object is moved away. @since New in 1.8. */
svn_wc_conflict_reason_moved_away,
/** Object is moved here. @since New in 1.8. */
svn_wc_conflict_reason_moved_here
} svn_wc_conflict_reason_t;
/** The type of conflict being described by an
* #svn_wc_conflict_description2_t (see below).
*
* @since New in 1.5.
*/
typedef enum svn_wc_conflict_kind_t
{
/** textual conflict (on a file) */
svn_wc_conflict_kind_text,
/** property conflict (on a file or dir) */
svn_wc_conflict_kind_property,
/** tree conflict (on a dir) @since New in 1.6. */
svn_wc_conflict_kind_tree
} svn_wc_conflict_kind_t;
/** The user operation that exposed a conflict.
*
* @since New in 1.6.
*/
typedef enum svn_wc_operation_t
{
svn_wc_operation_none = 0,
svn_wc_operation_update,
svn_wc_operation_switch,
svn_wc_operation_merge
} svn_wc_operation_t;
/** Info about one of the conflicting versions of a node. Each field may
* have its respective null/invalid/unknown value if the corresponding
* information is not relevant or not available.
*
* @todo Consider making some or all of the info mandatory, to reduce
* complexity.
*
* @note Fields may be added to the end of this structure in future
* versions. Therefore, to preserve binary compatibility, users
* should not directly allocate structures of this type.
*
* @see svn_wc_conflict_version_create()
* @see svn_wc_conflict_version_dup()
*
* @since New in 1.6.
*/
typedef struct svn_wc_conflict_version_t
{
/** @name Where to find this node version in a repository */
/**@{*/
/** URL of repository root */
const char *repos_url;
/** revision at which to look up path_in_repos */
svn_revnum_t peg_rev;
/** path within repos; must not start with '/' */
/* ### should have been called repos_relpath, but we can't change this. */
const char *path_in_repos;
/** @} */
/** The node kind. Can be any kind, including 'none' or 'unknown'. */
svn_node_kind_t node_kind;
/** UUID of the repository (or NULL if unknown.)
* @since New in 1.8. */
const char *repos_uuid;
/* @todo Add metadata about a local copy of the node, if and when
* we store one. */
/* Remember to update svn_wc_conflict_version_create() and
* svn_wc_conflict_version_dup() in case you add fields to this struct. */
} svn_wc_conflict_version_t;
/**
* Allocate an #svn_wc_conflict_version_t structure in @a pool,
* initialize to contain a conflict origin, and return it.
*
* Set the @c repos_url field of the created struct to @a repos_root_url,
* the @c path_in_repos field to @a repos_relpath, the @c peg_rev field to
* @a revision and the @c node_kind to @a kind. Make only shallow
* copies of the pointer arguments.
*
* @a repos_root_url, @a repos_relpath and @a revision must be valid,
* non-null values. @a repos_uuid should be a valid UUID, but can be
* NULL if unknown. @a kind can be any kind, even 'none' or 'unknown'.
*
* @since New in 1.8.
*/
svn_wc_conflict_version_t *
svn_wc_conflict_version_create2(const char *repos_root_url,
const char *repos_uuid,
const char *repos_relpath,
svn_revnum_t revision,
svn_node_kind_t kind,
apr_pool_t *result_pool);
/** Similar to svn_wc_conflict_version_create2(), but doesn't set all
* required values.
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
SVN_DEPRECATED
svn_wc_conflict_version_t *
svn_wc_conflict_version_create(const char *repos_url,
const char *path_in_repos,
svn_revnum_t peg_rev,
svn_node_kind_t node_kind,
apr_pool_t *pool);
/** Return a duplicate of @a version, allocated in @a pool.
* No part of the new version will be shared with @a version.
*
* @since New in 1.6.
*/
svn_wc_conflict_version_t *
svn_wc_conflict_version_dup(const svn_wc_conflict_version_t *version,
apr_pool_t *pool);
/** A struct that describes a conflict that has occurred in the
* working copy.
*
* The conflict described by this structure is one of:
* - a conflict on the content of the file node @a local_abspath
* - a conflict on the property @a property_name of @a local_abspath
* - a tree conflict, of which @a local_abspath is the victim
* Be aware that the victim of a tree conflict can be a non-existent node.
* The three kinds of conflict are distinguished by @a kind.
*
* @note Fields may be added to the end of this structure in future
* versions. Therefore, to preserve binary compatibility, users
* should not directly allocate structures of this type but should use
* svn_wc_conflict_description_create_text2() or
* svn_wc_conflict_description_create_prop2() or
* svn_wc_conflict_description_create_tree2() instead.
*
* @since New in 1.7.
*/
typedef struct svn_wc_conflict_description2_t
{
/** The path that is in conflict (for a tree conflict, it is the victim) */
const char *local_abspath;
/** The node type of the path being operated on (for a tree conflict,
* ### which version?) */
svn_node_kind_t node_kind;
/** What sort of conflict are we describing? */
svn_wc_conflict_kind_t kind;
/** The name of the property whose conflict is being described.
* (Only if @a kind is 'property'; else undefined.) */
const char *property_name;
/** Whether svn thinks ('my' version of) @c path is a 'binary' file.
* (Only if @c kind is 'text', else undefined.) */
svn_boolean_t is_binary;
/** The svn:mime-type property of ('my' version of) @c path, if available,
* else NULL.
* (Only if @c kind is 'text', else undefined.) */
const char *mime_type;
/** The action being attempted on the conflicted node or property.
* (When @c kind is 'text', this action must be 'edit'.) */
svn_wc_conflict_action_t action;
/** The state of the target node or property, relative to its merge-left
* source, that is the reason for the conflict.
* (When @c kind is 'text', this reason must be 'edited'.) */
svn_wc_conflict_reason_t reason;
/** If this is text-conflict and involves the merging of two files
* descended from a common ancestor, here are the paths of up to
* four fulltext files that can be used to interactively resolve the
* conflict.
*
* @a base_abspath, @a their_abspath and @a my_abspath are absolute
* paths.
*
* ### Is @a merged_file relative to some directory, or absolute?
*
* All four files will be in repository-normal form -- LF
* line endings and contracted keywords. (If any of these files are
* not available, they default to NULL.)
*
* On the other hand, if this is a property-conflict, then these
* paths represent temporary files that contain the three different
* property-values in conflict. The fourth path (@c merged_file)
* may or may not be NULL; if set, it represents libsvn_wc's
* attempt to merge the property values together. (Remember that
* property values are technically binary values, and thus can't
* always be merged.)
*/
const char *base_abspath; /* common ancestor of the two files being merged */
/** their version of the file */
/* ### BH: For properties this field contains the reference to
the property rejection (.prej) file */
const char *their_abspath;
/** my locally-edited version of the file */
const char *my_abspath;
/** merged version; may contain conflict markers */
const char *merged_file;
/** The operation that exposed the conflict.
* Used only for tree conflicts.
*/
svn_wc_operation_t operation;
/** Info on the "merge-left source" or "older" version of incoming change. */
const svn_wc_conflict_version_t *src_left_version;
/** Info on the "merge-right source" or "their" version of incoming change. */
const svn_wc_conflict_version_t *src_right_version;
/* Remember to adjust svn_wc__conflict_description2_dup()
* if you add new fields to this struct. */
} svn_wc_conflict_description2_t;
/** Similar to #svn_wc_conflict_description2_t, but with relative paths and
* adm_access batons. Passed to #svn_wc_conflict_resolver_func_t.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
typedef struct svn_wc_conflict_description_t
{
/** The path that is in conflict (for a tree conflict, it is the victim) */
const char *path;
/** The node type of the path being operated on (for a tree conflict,
* ### which version?) */
svn_node_kind_t node_kind;
/** What sort of conflict are we describing? */
svn_wc_conflict_kind_t kind;
/** The name of the property whose conflict is being described.
* (Only if @a kind is 'property'; else undefined.) */
const char *property_name;
/** Whether svn thinks ('my' version of) @c path is a 'binary' file.
* (Only if @c kind is 'text', else undefined.) */
svn_boolean_t is_binary;
/** The svn:mime-type property of ('my' version of) @c path, if available,
* else NULL.
* (Only if @c kind is 'text', else undefined.) */
const char *mime_type;
/** If not NULL, an open working copy access baton to either the
* path itself (if @c path is a directory), or to the parent
* directory (if @c path is a file.)
* For a tree conflict, this will always be an access baton
* to the parent directory of the path, even if the path is
* a directory. */
svn_wc_adm_access_t *access;
/** The action being attempted on the conflicted node or property.
* (When @c kind is 'text', this action must be 'edit'.) */
svn_wc_conflict_action_t action;
/** The state of the target node or property, relative to its merge-left
* source, that is the reason for the conflict.
* (When @c kind is 'text', this reason must be 'edited'.) */
svn_wc_conflict_reason_t reason;
/** If this is text-conflict and involves the merging of two files
* descended from a common ancestor, here are the paths of up to
* four fulltext files that can be used to interactively resolve the
* conflict. All four files will be in repository-normal form -- LF
* line endings and contracted keywords. (If any of these files are
* not available, they default to NULL.)
*
* On the other hand, if this is a property-conflict, then these
* paths represent temporary files that contain the three different
* property-values in conflict. The fourth path (@c merged_file)
* may or may not be NULL; if set, it represents libsvn_wc's
* attempt to merge the property values together. (Remember that
* property values are technically binary values, and thus can't
* always be merged.)
*/
const char *base_file; /* common ancestor of the two files being merged */
/** their version of the file */
const char *their_file;
/** my locally-edited version of the file */
const char *my_file;
/** merged version; may contain conflict markers */
const char *merged_file;
/** The operation that exposed the conflict.
* Used only for tree conflicts.
*
* @since New in 1.6.
*/
svn_wc_operation_t operation;
/** Info on the "merge-left source" or "older" version of incoming change.
* @since New in 1.6. */
svn_wc_conflict_version_t *src_left_version;
/** Info on the "merge-right source" or "their" version of incoming change.
* @since New in 1.6. */
svn_wc_conflict_version_t *src_right_version;
} svn_wc_conflict_description_t;
/**
* Allocate an #svn_wc_conflict_description_t structure in @a result_pool,
* initialize to represent a text conflict, and return it.
*
* Set the @c local_abspath field of the created struct to @a local_abspath
* (which must be an absolute path), the @c kind field to
* #svn_wc_conflict_kind_text, the @c node_kind to #svn_node_file,
* the @c action to #svn_wc_conflict_action_edit, and the @c reason to
* #svn_wc_conflict_reason_edited.
*
* @note It is the caller's responsibility to set the other required fields
* (such as the four file names and @c mime_type and @c is_binary).
*
* @since New in 1.7.
*/
svn_wc_conflict_description2_t *
svn_wc_conflict_description_create_text2(const char *local_abspath,
apr_pool_t *result_pool);
/** Similar to svn_wc_conflict_description_create_text2(), but returns
* a #svn_wc_conflict_description_t *.
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_wc_conflict_description_t *
svn_wc_conflict_description_create_text(const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/**
* Allocate an #svn_wc_conflict_description_t structure in @a result_pool,
* initialize to represent a property conflict, and return it.
*
* Set the @c local_abspath field of the created struct to @a local_abspath
* (which must be an absolute path), the @c kind field
* to #svn_wc_conflict_kind_property, the @c node_kind to @a node_kind, and
* the @c property_name to @a property_name.
*
* @note: It is the caller's responsibility to set the other required fields
* (such as the four file names and @c action and @c reason).
*
* @since New in 1.7.
*/
svn_wc_conflict_description2_t *
svn_wc_conflict_description_create_prop2(const char *local_abspath,
svn_node_kind_t node_kind,
const char *property_name,
apr_pool_t *result_pool);
/** Similar to svn_wc_conflict_descriptor_create_prop(), but returns
* a #svn_wc_conflict_description_t *.
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_wc_conflict_description_t *
svn_wc_conflict_description_create_prop(const char *path,
svn_wc_adm_access_t *adm_access,
svn_node_kind_t node_kind,
const char *property_name,
apr_pool_t *pool);
/**
* Allocate an #svn_wc_conflict_description_t structure in @a pool,
* initialize to represent a tree conflict, and return it.
*
* Set the @c local_abspath field of the created struct to @a local_abspath
* (which must be an absolute path), the @c kind field to
* #svn_wc_conflict_kind_tree, the @c node_kind to @a node_kind, the @c
* operation to @a operation, the @c src_left_version field to
* @a src_left_version, and the @c src_right_version field to
* @a src_right_version.
*
* @note: It is the caller's responsibility to set the other required fields
* (such as the four file names and @c action and @c reason).
*
* @since New in 1.7.
*/
svn_wc_conflict_description2_t *
svn_wc_conflict_description_create_tree2(
const char *local_abspath,
svn_node_kind_t node_kind,
svn_wc_operation_t operation,
const svn_wc_conflict_version_t *src_left_version,
const svn_wc_conflict_version_t *src_right_version,
apr_pool_t *result_pool);
/** Similar to svn_wc_conflict_description_create_tree(), but returns
* a #svn_wc_conflict_description_t *.
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_wc_conflict_description_t *
svn_wc_conflict_description_create_tree(
const char *path,
svn_wc_adm_access_t *adm_access,
svn_node_kind_t node_kind,
svn_wc_operation_t operation,
/* non-const */ svn_wc_conflict_version_t *src_left_version,
/* non-const */ svn_wc_conflict_version_t *src_right_version,
apr_pool_t *pool);
/** Return a duplicate of @a conflict, allocated in @a result_pool.
* A deep copy of all members will be made.
*
* @since New in 1.7.
*/
svn_wc_conflict_description2_t *
svn_wc__conflict_description2_dup(
const svn_wc_conflict_description2_t *conflict,
apr_pool_t *result_pool);
/** The way in which the conflict callback chooses a course of action.
*
* @since New in 1.5.
*/
typedef enum svn_wc_conflict_choice_t
{
/** Don't resolve the conflict now. Let libsvn_wc mark the path
'conflicted', so user can run 'svn resolved' later. */
svn_wc_conflict_choose_postpone,
/** If there were files to choose from, select one as a way of
resolving the conflict here and now. libsvn_wc will then do the
work of "installing" the chosen file.
*/
svn_wc_conflict_choose_base, /**< original version */
svn_wc_conflict_choose_theirs_full, /**< incoming version */
svn_wc_conflict_choose_mine_full, /**< own version */
svn_wc_conflict_choose_theirs_conflict, /**< incoming (for conflicted hunks) */
svn_wc_conflict_choose_mine_conflict, /**< own (for conflicted hunks) */
svn_wc_conflict_choose_merged, /**< merged version */
/* @since New in 1.8. */
svn_wc_conflict_choose_unspecified /**< undecided */
} svn_wc_conflict_choice_t;
/** The final result returned by #svn_wc_conflict_resolver_func_t.
*
* @note Fields may be added to the end of this structure in future
* versions. Therefore, to preserve binary compatibility, users
* should not directly allocate structures of this type. Instead,
* construct this structure using svn_wc_create_conflict_result()
* below.
*
* @since New in 1.5.
*/
typedef struct svn_wc_conflict_result_t
{
/** A choice to either delay the conflict resolution or select a
particular file to resolve the conflict. */
svn_wc_conflict_choice_t choice;
/** If not NULL, this is a path to a file which contains the client's
(or more likely, the user's) merging of the three values in
conflict. libsvn_wc accepts this file if (and only if) @c choice
is set to #svn_wc_conflict_choose_merged.*/
const char *merged_file;
/** If true, save a backup copy of merged_file (or the original
merged_file from the conflict description, if merged_file is
NULL) in the user's working copy. */
svn_boolean_t save_merged;
} svn_wc_conflict_result_t;
/**
* Allocate an #svn_wc_conflict_result_t structure in @a pool,
* initialize and return it.
*
* Set the @c choice field of the structure to @a choice, @c merged_file
* to @a merged_file, and @c save_merged to false. Make only a shallow
* copy of the pointer argument @a merged_file.
*
* @since New in 1.5.
*/
svn_wc_conflict_result_t *
svn_wc_create_conflict_result(svn_wc_conflict_choice_t choice,
const char *merged_file,
apr_pool_t *pool);
/** A callback used in merge, update and switch for resolving conflicts
* during the application of a tree delta to a working copy.
*
* @a description describes the exact nature of the conflict, and
* provides information to help resolve it. @a baton is a closure
* object; it should be provided by the implementation, and passed by
* the caller. When finished, the callback signals its resolution by
* returning a structure in @a *result, which should be allocated in
* @a result_pool. (See #svn_wc_conflict_result_t.) @a scratch_pool
* should be used for any temporary allocations.
*
* The values #svn_wc_conflict_choose_mine_conflict and
* #svn_wc_conflict_choose_theirs_conflict are not legal for conflicts
* in binary files or binary properties.
*
* Implementations of this callback are free to present the conflict
* using any user interface. This may include simple contextual
* conflicts in a file's text or properties, or more complex
* 'tree'-based conflicts related to obstructed additions, deletions,
* and edits. The callback implementation is free to decide which
* sorts of conflicts to handle; it's also free to decide which types
* of conflicts are automatically resolvable and which require user
* interaction.
*
* @since New in 1.7.
*/
typedef svn_error_t *(*svn_wc_conflict_resolver_func2_t)(
svn_wc_conflict_result_t **result,
const svn_wc_conflict_description2_t *description,
void *baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to #svn_wc_conflict_resolver_func2_t, but using
* #svn_wc_conflict_description_t instead of
* #svn_wc_conflict_description2_t
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
typedef svn_error_t *(*svn_wc_conflict_resolver_func_t)(
svn_wc_conflict_result_t **result,
const svn_wc_conflict_description_t *description,
void *baton,
apr_pool_t *pool);
/** @} */
/**
* A callback vtable invoked by our diff-editors, as they receive diffs
* from the server. 'svn diff' and 'svn merge' implement their own versions
* of this vtable.
*
* Common parameters:
*
* If @a state is non-NULL, set @a *state to the state of the item
* after the operation has been performed. (In practice, this is only
* useful with merge, not diff; diff callbacks will probably set
* @a *state to #svn_wc_notify_state_unknown, since they do not change
* the state and therefore do not bother to know the state after the
* operation.) By default, @a state refers to the item's content
* state. Functions concerned with property state have separate
* @a contentstate and @a propstate arguments.
*
* If @a tree_conflicted is non-NULL, set @a *tree_conflicted to true if
* this operation caused a tree conflict, else to false. (Like with @a
* state, this is only useful with merge, not diff; diff callbacks
* should set this to false.)
*
* @since New in 1.7.
*/
typedef struct svn_wc_diff_callbacks4_t
{
/**
* This function is called before @a file_changed to allow callbacks to
* skip the most expensive processing of retrieving the file data.
*
*/
svn_error_t *(*file_opened)(svn_boolean_t *tree_conflicted,
svn_boolean_t *skip,
const char *path,
svn_revnum_t rev,
void *diff_baton,
apr_pool_t *scratch_pool);
/**
* A file @a path has changed. If @a tmpfile2 is non-NULL, the
* contents have changed and those changes can be seen by comparing
* @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 of
* the file, respectively.
*
* If known, the @c svn:mime-type value of each file is passed into
* @a mimetype1 and @a mimetype2; either or both of the values can
* be NULL. The implementor can use this information to decide if
* (or how) to generate differences.
*
* @a propchanges is an array of (#svn_prop_t) structures. If it contains
* any elements, the original list of properties is provided in
* @a originalprops, which is a hash of #svn_string_t values, keyed on the
* property name.
*
*/
svn_error_t *(*file_changed)(svn_wc_notify_state_t *contentstate,
svn_wc_notify_state_t *propstate,
svn_boolean_t *tree_conflicted,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
svn_revnum_t rev1,
svn_revnum_t rev2,
const char *mimetype1,
const char *mimetype2,
const apr_array_header_t *propchanges,
apr_hash_t *originalprops,
void *diff_baton,
apr_pool_t *scratch_pool);
/**
* A file @a path was added. The contents can be seen by comparing
* @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2
* of the file, respectively. (If either file is empty, the rev
* will be 0.)
*
* If known, the @c svn:mime-type value of each file is passed into
* @a mimetype1 and @a mimetype2; either or both of the values can
* be NULL. The implementor can use this information to decide if
* (or how) to generate differences.
*
* @a propchanges is an array of (#svn_prop_t) structures. If it contains
* any elements, the original list of properties is provided in
* @a originalprops, which is a hash of #svn_string_t values, keyed on the
* property name.
* If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a
* copy), and the origin of the copy may be recorded as
* @a copyfrom_path under @a copyfrom_revision.
*/
svn_error_t *(*file_added)(svn_wc_notify_state_t *contentstate,
svn_wc_notify_state_t *propstate,
svn_boolean_t *tree_conflicted,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
svn_revnum_t rev1,
svn_revnum_t rev2,
const char *mimetype1,
const char *mimetype2,
const char *copyfrom_path,
svn_revnum_t copyfrom_revision,
const apr_array_header_t *propchanges,
apr_hash_t *originalprops,
void *diff_baton,
apr_pool_t *scratch_pool);
/**
* A file @a path was deleted. The [loss of] contents can be seen by
* comparing @a tmpfile1 and @a tmpfile2. @a originalprops provides
* the properties of the file.
* ### Some existing callers include WC "entry props" in @a originalprops.
*
* If known, the @c svn:mime-type value of each file is passed into
* @a mimetype1 and @a mimetype2; either or both of the values can
* be NULL. The implementor can use this information to decide if
* (or how) to generate differences.
*/
svn_error_t *(*file_deleted)(svn_wc_notify_state_t *state,
svn_boolean_t *tree_conflicted,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
const char *mimetype1,
const char *mimetype2,
apr_hash_t *originalprops,
void *diff_baton,
apr_pool_t *scratch_pool);
/**
* A directory @a path was deleted.
*/
svn_error_t *(*dir_deleted)(svn_wc_notify_state_t *state,
svn_boolean_t *tree_conflicted,
const char *path,
void *diff_baton,
apr_pool_t *scratch_pool);
/**
* A directory @a path has been opened. @a rev is the revision that the
* directory came from.
*
* This function is called for any existing directory @a path before any
* of the callbacks are called for a child of @a path.
*
* If the callback returns @c TRUE in @a *skip_children, children
* of this directory will be skipped.
*/
svn_error_t *(*dir_opened)(svn_boolean_t *tree_conflicted,
svn_boolean_t *skip,
svn_boolean_t *skip_children,
const char *path,
svn_revnum_t rev,
void *diff_baton,
apr_pool_t *scratch_pool);
/**
* A directory @a path was added. @a rev is the revision that the
* directory came from.
*
* This function is called for any new directory @a path before any
* of the callbacks are called for a child of @a path.
*
* If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a
* copy), and the origin of the copy may be recorded as
* @a copyfrom_path under @a copyfrom_revision.
*/
svn_error_t *(*dir_added)(svn_wc_notify_state_t *state,
svn_boolean_t *tree_conflicted,
svn_boolean_t *skip,
svn_boolean_t *skip_children,
const char *path,
svn_revnum_t rev,
const char *copyfrom_path,
svn_revnum_t copyfrom_revision,
void *diff_baton,
apr_pool_t *scratch_pool);
/**
* A list of property changes (@a propchanges) was applied to the
* directory @a path.
*
* The array is a list of (#svn_prop_t) structures.
*
* @a dir_was_added is set to #TRUE if the directory was added, and
* to #FALSE if the directory pre-existed.
*/
svn_error_t *(*dir_props_changed)(svn_wc_notify_state_t *propstate,
svn_boolean_t *tree_conflicted,
const char *path,
svn_boolean_t dir_was_added,
const apr_array_header_t *propchanges,
apr_hash_t *original_props,
void *diff_baton,
apr_pool_t *scratch_pool);
/**
* A directory @a path which has been opened with @a dir_opened or @a
* dir_added has been closed.
*
* @a dir_was_added is set to #TRUE if the directory was added, and
* to #FALSE if the directory pre-existed.
*/
svn_error_t *(*dir_closed)(svn_wc_notify_state_t *contentstate,
svn_wc_notify_state_t *propstate,
svn_boolean_t *tree_conflicted,
const char *path,
svn_boolean_t dir_was_added,
void *diff_baton,
apr_pool_t *scratch_pool);
} svn_wc_diff_callbacks4_t;
/**
* Similar to #svn_wc_diff_callbacks4_t, but without @a copyfrom_path and
* @a copyfrom_revision arguments to @c file_added and @c dir_added functions.
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
typedef struct svn_wc_diff_callbacks3_t
{
/** The same as #svn_wc_diff_callbacks4_t.file_changed. */
svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *contentstate,
svn_wc_notify_state_t *propstate,
svn_boolean_t *tree_conflicted,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
svn_revnum_t rev1,
svn_revnum_t rev2,
const char *mimetype1,
const char *mimetype2,
const apr_array_header_t *propchanges,
apr_hash_t *originalprops,
void *diff_baton);
/** Similar to #svn_wc_diff_callbacks4_t.file_added but without
* @a copyfrom_path and @a copyfrom_revision arguments. */
svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *contentstate,
svn_wc_notify_state_t *propstate,
svn_boolean_t *tree_conflicted,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
svn_revnum_t rev1,
svn_revnum_t rev2,
const char *mimetype1,
const char *mimetype2,
const apr_array_header_t *propchanges,
apr_hash_t *originalprops,
void *diff_baton);
/** The same as #svn_wc_diff_callbacks4_t.file_deleted. */
svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
svn_boolean_t *tree_conflicted,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
const char *mimetype1,
const char *mimetype2,
apr_hash_t *originalprops,
void *diff_baton);
/** Similar to #svn_wc_diff_callbacks4_t.dir_added but without
* @a copyfrom_path and @a copyfrom_revision arguments. */
svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
svn_boolean_t *tree_conflicted,
const char *path,
svn_revnum_t rev,
void *diff_baton);
/** The same as #svn_wc_diff_callbacks4_t.dir_deleted. */
svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
svn_boolean_t *tree_conflicted,
const char *path,
void *diff_baton);
/** The same as #svn_wc_diff_callbacks4_t.dir_props_changed. */
svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *propstate,
svn_boolean_t *tree_conflicted,
const char *path,
const apr_array_header_t *propchanges,
apr_hash_t *original_props,
void *diff_baton);
/** The same as #svn_wc_diff_callbacks4_t.dir_opened. */
svn_error_t *(*dir_opened)(svn_wc_adm_access_t *adm_access,
svn_boolean_t *tree_conflicted,
const char *path,
svn_revnum_t rev,
void *diff_baton);
/** The same as #svn_wc_diff_callbacks4_t.dir_closed. */
svn_error_t *(*dir_closed)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *contentstate,
svn_wc_notify_state_t *propstate,
svn_boolean_t *tree_conflicted,
const char *path,
void *diff_baton);
} svn_wc_diff_callbacks3_t;
/**
* Similar to #svn_wc_diff_callbacks3_t, but without the @c dir_opened
* and @c dir_closed functions, and without the @a tree_conflicted argument
* to the functions.
*
* @deprecated Provided for backward compatibility with the 1.2 API.
*/
typedef struct svn_wc_diff_callbacks2_t
{
/** The same as @c file_changed in #svn_wc_diff_callbacks3_t. */
svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *contentstate,
svn_wc_notify_state_t *propstate,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
svn_revnum_t rev1,
svn_revnum_t rev2,
const char *mimetype1,
const char *mimetype2,
const apr_array_header_t *propchanges,
apr_hash_t *originalprops,
void *diff_baton);
/** The same as @c file_added in #svn_wc_diff_callbacks3_t. */
svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *contentstate,
svn_wc_notify_state_t *propstate,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
svn_revnum_t rev1,
svn_revnum_t rev2,
const char *mimetype1,
const char *mimetype2,
const apr_array_header_t *propchanges,
apr_hash_t *originalprops,
void *diff_baton);
/** The same as @c file_deleted in #svn_wc_diff_callbacks3_t. */
svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
const char *mimetype1,
const char *mimetype2,
apr_hash_t *originalprops,
void *diff_baton);
/** The same as @c dir_added in #svn_wc_diff_callbacks3_t. */
svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
const char *path,
svn_revnum_t rev,
void *diff_baton);
/** The same as @c dir_deleted in #svn_wc_diff_callbacks3_t. */
svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
const char *path,
void *diff_baton);
/** The same as @c dir_props_changed in #svn_wc_diff_callbacks3_t. */
svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
const char *path,
const apr_array_header_t *propchanges,
apr_hash_t *original_props,
void *diff_baton);
} svn_wc_diff_callbacks2_t;
/**
* Similar to #svn_wc_diff_callbacks2_t, but with file additions/content
* changes and property changes split into different functions.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
typedef struct svn_wc_diff_callbacks_t
{
/** Similar to @c file_changed in #svn_wc_diff_callbacks2_t, but without
* property change information. @a tmpfile2 is never NULL. @a state applies
* to the file contents. */
svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
svn_revnum_t rev1,
svn_revnum_t rev2,
const char *mimetype1,
const char *mimetype2,
void *diff_baton);
/** Similar to @c file_added in #svn_wc_diff_callbacks2_t, but without
* property change information. @a *state applies to the file contents. */
svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
svn_revnum_t rev1,
svn_revnum_t rev2,
const char *mimetype1,
const char *mimetype2,
void *diff_baton);
/** Similar to @c file_deleted in #svn_wc_diff_callbacks2_t, but without
* the properties. */
svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
const char *path,
const char *tmpfile1,
const char *tmpfile2,
const char *mimetype1,
const char *mimetype2,
void *diff_baton);
/** The same as @c dir_added in #svn_wc_diff_callbacks2_t. */
svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
const char *path,
svn_revnum_t rev,
void *diff_baton);
/** The same as @c dir_deleted in #svn_wc_diff_callbacks2_t. */
svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
const char *path,
void *diff_baton);
/** Similar to @c dir_props_changed in #svn_wc_diff_callbacks2_t, but this
* function is called for files as well as directories. */
svn_error_t *(*props_changed)(svn_wc_adm_access_t *adm_access,
svn_wc_notify_state_t *state,
const char *path,
const apr_array_header_t *propchanges,
apr_hash_t *original_props,
void *diff_baton);
} svn_wc_diff_callbacks_t;
/* Asking questions about a working copy. */
/** Set @a *wc_format to @a local_abspath's working copy format version
* number if @a local_abspath is a valid working copy directory, else set it
* to 0.
*
* Return error @c APR_ENOENT if @a local_abspath does not exist at all.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_check_wc2(int *wc_format,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_check_wc2(), but with a relative path and no supplied
* working copy context.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_check_wc(const char *path,
int *wc_format,
apr_pool_t *pool);
/** Set @a *has_binary_prop to @c TRUE iff @a path has been marked
* with a property indicating that it is non-text (in other words, binary).
* @a adm_access is an access baton set that contains @a path.
*
* @deprecated Provided for backward compatibility with the 1.6 API. As a
* replacement for this functionality, @see svn_mime_type_is_binary and
* #SVN_PROP_MIME_TYPE.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_has_binary_prop(svn_boolean_t *has_binary_prop,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/* Detecting modification. */
/** Set @a *modified_p to non-zero if @a local_abspath's text is modified
* with regard to the base revision, else set @a *modified_p to zero.
* @a local_abspath is the absolute path to the file.
*
* This function uses some heuristics to avoid byte-by-byte comparisons
* against the base text (eg. file size and its modification time).
*
* If @a local_abspath does not exist, consider it unmodified. If it exists
* but is not under revision control (not even scheduled for
* addition), return the error #SVN_ERR_ENTRY_NOT_FOUND.
*
* @a unused is ignored.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_text_modified_p2(svn_boolean_t *modified_p,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t unused,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_text_modified_p2(), but with a relative path and
* adm_access baton?
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_text_modified_p(svn_boolean_t *modified_p,
const char *filename,
svn_boolean_t force_comparison,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/** Set @a *modified_p to non-zero if @a path's properties are modified
* with regard to the base revision, else set @a modified_p to zero.
* @a adm_access must be an access baton for @a path.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_props_modified_p2(svn_boolean_t *modified_p,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_props_modified_p2(), but with a relative path and
* adm_access baton.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_props_modified_p(svn_boolean_t *modified_p,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/**
* @defgroup svn_wc_entries Entries and status (deprecated)
* @{
*/
/** The schedule states an entry can be in.
* @deprecated Provided for backward compatibility with the 1.6 API. */
typedef enum svn_wc_schedule_t
{
/** Nothing special here */
svn_wc_schedule_normal,
/** Slated for addition */
svn_wc_schedule_add,
/** Slated for deletion */
svn_wc_schedule_delete,
/** Slated for replacement (delete + add) */
svn_wc_schedule_replace
} svn_wc_schedule_t;
/**
* Values for the working_size field in svn_wc_entry_t
* when it isn't set to the actual size value of the unchanged
* working file.
*
* The value of the working size is unknown (hasn't been
* calculated and stored in the past for whatever reason).
*
* @since New in 1.5
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
#define SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN (-1)
/** A working copy entry -- that is, revision control information about
* one versioned entity.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
/* SVN_DEPRECATED */
typedef struct svn_wc_entry_t
{
/* IMPORTANT: If you extend this structure, add new fields to the end. */
/* General Attributes */
/** entry's name */
const char *name;
/** base revision */
svn_revnum_t revision;
/** url in repository */
const char *url;
/** canonical repository URL or NULL if not known */
const char *repos;
/** repository uuid */
const char *uuid;
/** node kind (file, dir, ...) */
svn_node_kind_t kind;
/* State information */
/** scheduling (add, delete, replace ...) */
svn_wc_schedule_t schedule;
/** in a copied state (possibly because the entry is a child of a
* path that is #svn_wc_schedule_add or #svn_wc_schedule_replace,
* when the entry itself is #svn_wc_schedule_normal).
* COPIED is true for nodes under a directory that was copied, but
* COPYFROM_URL is null there. They are both set for the root
* destination of the copy.
*/
svn_boolean_t copied;
/** The directory containing this entry had a versioned child of this
* name, but this entry represents a different revision or a switched
* path at which no item exists in the repository. This typically
* arises from committing or updating to a deletion of this entry
* without committing or updating the parent directory.
*
* The schedule can be 'normal' or 'add'. */
svn_boolean_t deleted;
/** absent -- we know an entry of this name exists, but that's all
(usually this happens because of authz restrictions) */
svn_boolean_t absent;
/** for THIS_DIR entry, implies whole entries file is incomplete */
svn_boolean_t incomplete;
/** copyfrom location */
const char *copyfrom_url;
/** copyfrom revision */
svn_revnum_t copyfrom_rev;
/** old version of conflicted file. A file basename, relative to the
* user's directory that the THIS_DIR entry refers to. */
const char *conflict_old;
/** new version of conflicted file. A file basename, relative to the
* user's directory that the THIS_DIR entry refers to. */
const char *conflict_new;
/** working version of conflicted file. A file basename, relative to the
* user's directory that the THIS_DIR entry refers to. */
const char *conflict_wrk;
/** property reject file. A file basename, relative to the user's
* directory that the THIS_DIR entry refers to. */
const char *prejfile;
/** last up-to-date time for text contents (0 means no information available)
*/
apr_time_t text_time;
/** last up-to-date time for properties (0 means no information available)
*
* @deprecated This value will always be 0 in version 1.4 and later.
*/
apr_time_t prop_time;
/** Hex MD5 checksum for the untranslated text base file,
* can be @c NULL for backwards compatibility.
*/
const char *checksum;
/* "Entry props" */
/** last revision this was changed */
svn_revnum_t cmt_rev;
/** last date this was changed */
apr_time_t cmt_date;
/** last commit author of this item */
const char *cmt_author;
/** lock token or NULL if path not locked in this WC
* @since New in 1.2.
*/
const char *lock_token;
/** lock owner, or NULL if not locked in this WC
* @since New in 1.2.
*/
const char *lock_owner;
/** lock comment or NULL if not locked in this WC or no comment
* @since New in 1.2.
*/
const char *lock_comment;
/** Lock creation date or 0 if not locked in this WC
* @since New in 1.2.
*/
apr_time_t lock_creation_date;
/** Whether this entry has any working properties.
* False if this information is not stored in the entry.
*
* @since New in 1.4. */
svn_boolean_t has_props;
/** Whether this entry has property modifications.
*
* @note For working copies in older formats, this flag is not valid.
*
* @see svn_wc_props_modified_p().
*
* @since New in 1.4. */
svn_boolean_t has_prop_mods;
/** A space-separated list of all properties whose presence/absence is cached
* in this entry.
*
* @see @c present_props.
*
* @since New in 1.4.
* @deprecated This value will always be "" in version 1.7 and later. */
const char *cachable_props;
/** Cached property existence for this entry.
* This is a space-separated list of property names. If a name exists in
* @c cachable_props but not in this list, this entry does not have that
* property. If a name exists in both lists, the property is present on this
* entry.
*
* @since New in 1.4.
* @deprecated This value will always be "" in version 1.7 and later. */
const char *present_props;
/** which changelist this item is part of, or NULL if not part of any.
* @since New in 1.5.
*/
const char *changelist;
/** Size of the file after being translated into local
* representation, or #SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN if
* unknown.
*
* @since New in 1.5.
*/
apr_off_t working_size;
/** Whether a local copy of this entry should be kept in the working copy
* after a deletion has been committed, Only valid for the this-dir entry
* when it is scheduled for deletion.
*
* @since New in 1.5. */
svn_boolean_t keep_local;
/** The depth of this entry.
*
* ### It's a bit annoying that we only use this on this_dir
* ### entries, yet it will exist (with value svn_depth_infinity) on
* ### all entries. Maybe some future extensibility would make this
* ### field meaningful on entries besides this_dir.
*
* @since New in 1.5. */
svn_depth_t depth;
/** Serialized data for all of the tree conflicts detected in this_dir.
*
* @since New in 1.6. */
const char *tree_conflict_data;
/** The entry is a intra-repository file external and this is the
* repository root relative path to the file specified in the
* externals definition, otherwise NULL if the entry is not a file
* external.
*
* @since New in 1.6. */
const char *file_external_path;
/** The entry is a intra-repository file external and this is the
* peg revision number specified in the externals definition. This
* field is only valid when the file_external_path field is
* non-NULL. The only permissible values are
* svn_opt_revision_unspecified if the entry is not an external,
* svn_opt_revision_head if the external revision is unspecified or
* specified with -r HEAD or svn_opt_revision_number for a specific
* revision number.
*
* @since New in 1.6. */
svn_opt_revision_t file_external_peg_rev;
/** The entry is an intra-repository file external and this is the
* operative revision number specified in the externals definition.
* This field is only valid when the file_external_path field is
* non-NULL. The only permissible values are
* svn_opt_revision_unspecified if the entry is not an external,
* svn_opt_revision_head if the external revision is unspecified or
* specified with -r HEAD or svn_opt_revision_number for a specific
* revision number.
*
* @since New in 1.6. */
svn_opt_revision_t file_external_rev;
/* IMPORTANT: If you extend this structure, check the following functions in
* subversion/libsvn_wc/entries.c, to see if you need to extend them as well.
*
* svn_wc__atts_to_entry()
* svn_wc_entry_dup()
* alloc_entry()
* read_entry()
* write_entry()
* fold_entry()
*/
} svn_wc_entry_t;
/** How an entries file's owner dir is named in the entries file.
* @deprecated Provided for backward compatibility with the 1.6 API. */
#define SVN_WC_ENTRY_THIS_DIR ""
/** Set @a *entry to an entry for @a path, allocated in the access baton pool.
* If @a show_hidden is TRUE, return the entry even if it's in 'excluded',
* 'deleted' or 'absent' state. Excluded entries are those with their depth
* set to #svn_depth_exclude. If @a path is not under revision control, or
* if entry is hidden, not scheduled for re-addition, and @a show_hidden is @c
* FALSE, then set @a *entry to @c NULL.
*
* @a *entry should not be modified, since doing so modifies the entries
* cache in @a adm_access without changing the entries file on disk.
*
* If @a path is not a directory then @a adm_access must be an access baton
* for the parent directory of @a path. To avoid needing to know whether
* @a path is a directory or not, if @a path is a directory @a adm_access
* can still be an access baton for the parent of @a path so long as the
* access baton for @a path itself is in the same access baton set.
*
* @a path can be relative or absolute but must share the same base used
* to open @a adm_access.
*
* Note that it is possible for @a path to be absent from disk but still
* under revision control; and conversely, it is possible for @a path to
* be present, but not under revision control.
*
* Use @a pool only for local processing.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_entry(const svn_wc_entry_t **entry,
const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t show_hidden,
apr_pool_t *pool);
/** Parse the `entries' file for @a adm_access and return a hash @a entries,
* whose keys are (<tt>const char *</tt>) entry names and values are
* (<tt>svn_wc_entry_t *</tt>). The hash @a entries, and its keys and
* values, are allocated from the pool used to open the @a adm_access
* baton (that's how the entries caching works). @a pool is used for
* transient allocations.
*
* Entries that are in a 'excluded', 'deleted' or 'absent' state (and not
* scheduled for re-addition) are not returned in the hash, unless
* @a show_hidden is TRUE. Excluded entries are those with their depth set to
* #svn_depth_exclude.
*
* @par Important:
* The @a entries hash is the entries cache in @a adm_access
* and so usually the hash itself, the keys and the values should be treated
* as read-only. If any of these are modified then it is the caller's
* responsibility to ensure that the entries file on disk is updated. Treat
* the hash values as type (<tt>const svn_wc_entry_t *</tt>) if you wish to
* avoid accidental modification. Modifying the schedule member is a
* particularly bad idea, as the entries writing process relies on having
* access to the original schedule. Use a duplicate entry to modify the
* schedule.
*
* @par Important:
* Only the entry structures representing files and
* #SVN_WC_ENTRY_THIS_DIR contain complete information. The entry
* structures representing subdirs have only the `kind' and `state'
* fields filled in. If you want info on a subdir, you must use this
* routine to open its @a path and read the #SVN_WC_ENTRY_THIS_DIR
* structure, or call svn_wc_entry() on its @a path.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_entries_read(apr_hash_t **entries,
svn_wc_adm_access_t *adm_access,
svn_boolean_t show_hidden,
apr_pool_t *pool);
/** Return a duplicate of @a entry, allocated in @a pool. No part of the new
* entry will be shared with @a entry.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_wc_entry_t *
svn_wc_entry_dup(const svn_wc_entry_t *entry,
apr_pool_t *pool);
/** @} */
/**
* This struct contains information about a working copy node.
*
* @note Fields may be added to the end of this structure in future
* versions. Therefore, users shouldn't allocate structures of this
* type, to preserve binary compatibility.
*
* @since New in 1.7.
*/
typedef struct svn_wc_info_t
{
/** The schedule of this item
* ### Do we still need schedule? */
svn_wc_schedule_t schedule;
/** If copied, the URL from which the copy was made, else @c NULL. */
const char *copyfrom_url;
/** If copied, the revision from which the copy was made,
* else #SVN_INVALID_REVNUM. */
svn_revnum_t copyfrom_rev;
/** The checksum of the node, if it is a file. */
const svn_checksum_t *checksum;
/** A changelist the item is in, @c NULL if this node is not in a
* changelist. */
const char *changelist;
/** The depth of the item, see #svn_depth_t */
svn_depth_t depth;
/**
* The size of the file after being translated into its local
* representation, or #SVN_INVALID_FILESIZE if unknown.
* Not applicable for directories.
*/
svn_filesize_t recorded_size;
/**
* The time at which the file had the recorded size recorded_size and was
* considered unmodified. */
apr_time_t recorded_time;
/** Array of const svn_wc_conflict_description2_t * which contains info
* on any conflict of which this node is a victim. Otherwise NULL. */
const apr_array_header_t *conflicts;
/** The local absolute path of the working copy root. */
const char *wcroot_abspath;
/** The path the node was moved from, if it was moved here. Else NULL.
* @since New in 1.8. */
const char *moved_from_abspath;
/** The path the node was moved to, if it was moved away. Else NULL.
* @since New in 1.8. */
const char *moved_to_abspath;
} svn_wc_info_t;
/**
* Return a duplicate of @a info, allocated in @a pool. No part of the new
* structure will be shared with @a info.
*
* @since New in 1.7.
*/
svn_wc_info_t *
svn_wc_info_dup(const svn_wc_info_t *info,
apr_pool_t *pool);
/** Given @a local_abspath in a dir under version control, decide if it is
* in a state of conflict; return the answers in @a *text_conflicted_p, @a
* *prop_conflicted_p, and @a *tree_conflicted_p. If one or two of the
* answers are uninteresting, simply pass @c NULL pointers for those.
*
* If @a local_abspath is unversioned or does not exist, return
* #SVN_ERR_WC_PATH_NOT_FOUND.
*
* If the @a local_abspath has corresponding text conflict files (with suffix
* .mine, .theirs, etc.) that cannot be found, assume that the text conflict
* has been resolved by the user and return @c FALSE in @a
* *text_conflicted_p.
*
* Similarly, if a property conflicts file (.prej suffix) is said to exist,
* but it cannot be found, assume that the property conflicts have been
* resolved by the user and return @c FALSE in @a *prop_conflicted_p.
*
* @a *tree_conflicted_p can't be auto-resolved in this fashion. An
* explicit `resolved' is needed.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_conflicted_p3(svn_boolean_t *text_conflicted_p,
svn_boolean_t *prop_conflicted_p,
svn_boolean_t *tree_conflicted_p,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_conflicted_p3(), but with a path/adm_access parameter
* pair in place of a wc_ctx/local_abspath pair.
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_conflicted_p2(svn_boolean_t *text_conflicted_p,
svn_boolean_t *prop_conflicted_p,
svn_boolean_t *tree_conflicted_p,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/** Given a @a dir_path under version control, decide if one of its entries
* (@a entry) is in a state of conflict; return the answers in @a
* text_conflicted_p and @a prop_conflicted_p. These pointers must not be
* null.
*
* If the @a entry mentions that text conflict files (with suffix .mine,
* .theirs, etc.) exist, but they cannot be found, assume the text conflict
* has been resolved by the user and return FALSE in @a *text_conflicted_p.
*
* Similarly, if the @a entry mentions that a property conflicts file (.prej
* suffix) exists, but it cannot be found, assume the property conflicts
* have been resolved by the user and return FALSE in @a *prop_conflicted_p.
*
* The @a entry is not updated.
*
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_conflicted_p(svn_boolean_t *text_conflicted_p,
svn_boolean_t *prop_conflicted_p,
const char *dir_path,
const svn_wc_entry_t *entry,
apr_pool_t *pool);
/** Set @a *url and @a *rev to the ancestor URL and revision for @a path,
* allocating in @a pool. @a adm_access must be an access baton for @a path.
*
* If @a url or @a rev is NULL, then ignore it (just don't return the
* corresponding information).
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_ancestry(char **url,
svn_revnum_t *rev,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/** A callback vtable invoked by the generic entry-walker function.
* @since New in 1.5.
*/
typedef struct svn_wc_entry_callbacks2_t
{
/** An @a entry was found at @a path. */
svn_error_t *(*found_entry)(const char *path,
const svn_wc_entry_t *entry,
void *walk_baton,
apr_pool_t *pool);
/** Handle the error @a err encountered while processing @a path.
* Wrap or squelch @a err as desired, and return an #svn_error_t
* *, or #SVN_NO_ERROR.
*/
svn_error_t *(*handle_error)(const char *path,
svn_error_t *err,
void *walk_baton,
apr_pool_t *pool);
} svn_wc_entry_callbacks2_t;
/** @deprecated Provided for backward compatibility with the 1.4 API. */
typedef struct svn_wc_entry_callbacks_t
{
/** An @a entry was found at @a path. */
svn_error_t *(*found_entry)(const char *path,
const svn_wc_entry_t *entry,
void *walk_baton,
apr_pool_t *pool);
} svn_wc_entry_callbacks_t;
/**
* A generic entry-walker.
*
* Do a potentially recursive depth-first entry-walk beginning on
* @a path, which can be a file or dir. Call callbacks in
* @a walk_callbacks, passing @a walk_baton to each. Use @a pool for
* looping, recursion, and to allocate all entries returned.
* @a adm_access must be an access baton for @a path. The pool
* passed to @a walk_callbacks is a temporary subpool of @a pool.
*
* If @a depth is #svn_depth_empty, invoke the callbacks on @a path
* and return without recursing further. If #svn_depth_files, do
* the same and invoke the callbacks on file children (if any) of
* @a path, then return. If #svn_depth_immediates, do the preceding
* but also invoke callbacks on immediate subdirectories, then return.
* If #svn_depth_infinity, recurse fully starting from @a path.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
* if the client has canceled the operation.
*
* Like our other entries interfaces, entries that are in a 'excluded',
* 'deleted' or 'absent' state (and not scheduled for re-addition) are not
* discovered, unless @a show_hidden is TRUE. Excluded entries are those with
* their depth set to #svn_depth_exclude.
*
* When a new directory is entered, #SVN_WC_ENTRY_THIS_DIR will always
* be returned first.
*
* @note Callers should be aware that each directory will be
* returned *twice*: first as an entry within its parent, and
* subsequently as the '.' entry within itself. The two calls can be
* distinguished by looking for #SVN_WC_ENTRY_THIS_DIR in the 'name'
* field of the entry.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_walk_entries3(const char *path,
svn_wc_adm_access_t *adm_access,
const svn_wc_entry_callbacks2_t *walk_callbacks,
void *walk_baton,
svn_depth_t depth,
svn_boolean_t show_hidden,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_walk_entries3(), but without cancellation support
* or error handling from @a walk_callbacks, and with @a depth always
* set to #svn_depth_infinity.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_walk_entries2(const char *path,
svn_wc_adm_access_t *adm_access,
const svn_wc_entry_callbacks_t *walk_callbacks,
void *walk_baton,
svn_boolean_t show_hidden,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_walk_entries2(), but without cancellation support.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_walk_entries(const char *path,
svn_wc_adm_access_t *adm_access,
const svn_wc_entry_callbacks_t *walk_callbacks,
void *walk_baton,
svn_boolean_t show_hidden,
apr_pool_t *pool);
/** Mark missing @a path as 'deleted' in its @a parent's list of
* entries. @a path should be a directory that is both deleted (via
* svn_wc_delete4) and removed (via a system call). This function
* should only be called during post-commit processing following a
* successful commit editor drive.
*
* Return #SVN_ERR_WC_PATH_FOUND if @a path isn't actually missing.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_mark_missing_deleted(const char *path,
svn_wc_adm_access_t *parent,
apr_pool_t *pool);
/** Ensure that an administrative area exists for @a local_abspath, so
* that @a local_abspath is a working copy subdir based on @a url at @a
* revision, with depth @a depth, and with repository UUID @a repos_uuid
* and repository root URL @a repos_root_url.
*
* @a depth must be a definite depth, it cannot be #svn_depth_unknown.
* @a repos_uuid and @a repos_root_url MUST NOT be @c NULL, and
* @a repos_root_url must be a prefix of @a url.
*
* If the administrative area does not exist, then create it and
* initialize it to an unlocked state.
*
* If the administrative area already exists then the given @a url
* must match the URL in the administrative area and the given
* @a revision must match the BASE of the working copy dir unless
* the admin directory is scheduled for deletion or the
* #SVN_ERR_WC_OBSTRUCTED_UPDATE error will be returned.
*
* Do not ensure existence of @a local_abspath itself; if @a local_abspath
* does not exist, return error.
*
* Use @a scratch_pool for temporary allocations.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_ensure_adm4(svn_wc_context_t *wc_ctx,
const char *local_abspath,
const char *url,
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
svn_depth_t depth,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_ensure_adm4(), but without the wc context parameter.
*
* @note the @a uuid and @a repos parameters were documented as allowing
* @c NULL to be passed. Beginning with 1.7, this will return an error,
* contrary to prior documented behavior: see 'notes/api-errata/1.7/wc005.txt'.
*
* @since New in 1.5.
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_ensure_adm3(const char *path,
const char *uuid,
const char *url,
const char *repos,
svn_revnum_t revision,
svn_depth_t depth,
apr_pool_t *pool);
/**
* Similar to svn_wc_ensure_adm3(), but with @a depth set to
* #svn_depth_infinity.
*
* See the note on svn_wc_ensure_adm3() regarding the @a repos and @a uuid
* parameters.
*
* @since New in 1.3.
* @deprecated Provided for backwards compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_ensure_adm2(const char *path,
const char *uuid,
const char *url,
const char *repos,
svn_revnum_t revision,
apr_pool_t *pool);
/**
* Similar to svn_wc_ensure_adm2(), but with @a repos set to @c NULL.
*
* @note as of 1.7, this function always returns #SVN_ERR_BAD_URL since
* the @a repos parameter may not be @c NULL.
*
* @deprecated Provided for backwards compatibility with the 1.2 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_ensure_adm(const char *path,
const char *uuid,
const char *url,
svn_revnum_t revision,
apr_pool_t *pool);
/** Set the repository root URL of @a path to @a repos, if possible.
*
* Before Subversion 1.7 there could be working copy directories that
* didn't have a stored repository root in some specific circumstances.
* This function allowed setting this root later.
*
* Since Subversion 1.7 this function just returns #SVN_NO_ERROR.
*
* @since New in 1.3.
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_maybe_set_repos_root(svn_wc_adm_access_t *adm_access,
const char *path,
const char *repos,
apr_pool_t *pool);
/**
* @defgroup svn_wc_status Working copy status.
* @{
*
* We have three functions for getting working copy status: one function
* for getting the status of exactly one thing, another for
* getting the statuses of (potentially) multiple things and a third for
* getting the working copy out-of-dateness with respect to the repository.
*
* Why do we have two different functions for getting working copy status?
* The concept of depth, as explained in the documentation for
* svn_depth_t, may be useful in understanding this. Suppose we're
* getting the status of directory D:
*
* To offer all three levels, we could have one unified function,
* taking a `depth' parameter. Unfortunately, because this function
* would have to handle multiple return values as well as the single
* return value case, getting the status of just one entity would
* become cumbersome: you'd have to roll through a hash to find one
* lone status.
*
* So we have svn_wc_status3() for depth-empty (just D itself), and
* svn_wc_walk_status() for depth-immediates and depth-infinity,
* since the latter two involve multiple return values. And for
* out-of-dateness information we have svn_wc_get_status_editor5().
*/
/** The type of status for the working copy. */
enum svn_wc_status_kind
{
/** does not exist */
svn_wc_status_none = 1,
/** is not a versioned thing in this wc */
svn_wc_status_unversioned,
/** exists, but uninteresting */
svn_wc_status_normal,
/** is scheduled for addition */
svn_wc_status_added,
/** under v.c., but is missing */
svn_wc_status_missing,
/** scheduled for deletion */
svn_wc_status_deleted,
/** was deleted and then re-added */
svn_wc_status_replaced,
/** text or props have been modified */
svn_wc_status_modified,
/** local mods received repos mods (### unused) */
svn_wc_status_merged,
/** local mods received conflicting repos mods */
svn_wc_status_conflicted,
/** is unversioned but configured to be ignored */
svn_wc_status_ignored,
/** an unversioned resource is in the way of the versioned resource */
svn_wc_status_obstructed,
/** an unversioned directory path populated by an svn:externals
property; this status is not used for file externals */
svn_wc_status_external,
/** a directory doesn't contain a complete entries list */
svn_wc_status_incomplete
};
/**
* Structure for holding the "status" of a working copy item.
*
* @note Fields may be added to the end of this structure in future
* versions. Therefore, to preserve binary compatibility, users
* should not directly allocate structures of this type.
*
* @since New in 1.7.
*/
typedef struct svn_wc_status3_t
{
/** The kind of node as recorded in the working copy */
svn_node_kind_t kind;
/** The depth of the node as recorded in the working copy
* (#svn_depth_unknown for files or when no depth is set) */
svn_depth_t depth;
/** The actual size of the working file on disk, or SVN_INVALID_FILESIZE
* if unknown (or if the item isn't a file at all). */
svn_filesize_t filesize;
/** If the path is under version control, versioned is TRUE, otherwise
* FALSE. */
svn_boolean_t versioned;
/** Set to TRUE if the item is the victim of a conflict. */
svn_boolean_t conflicted;
/** The status of the node itself. In order of precedence: Obstructions,
* structural changes, text changes. */
enum svn_wc_status_kind node_status;
/** The status of the entry's text. */
enum svn_wc_status_kind text_status;
/** The status of the entry's properties. */
enum svn_wc_status_kind prop_status;
/** a file or directory can be 'copied' if it's scheduled for
* addition-with-history (or part of a subtree that is scheduled as such.).
*/
svn_boolean_t copied;
/** Base revision. */
svn_revnum_t revision;
/** Last revision this was changed */
svn_revnum_t changed_rev;
/** Date of last commit. */
apr_time_t changed_date;
/** Last commit author of this item */
const char *changed_author;
/** The URL of the repository */
const char *repos_root_url;
/** The UUID of the repository */
const char *repos_uuid;
/** The in-repository path relative to the repository root. */
const char *repos_relpath;
/** a file or directory can be 'switched' if the switch command has been
* used. If this is TRUE, then file_external will be FALSE.
*/
svn_boolean_t switched;
/** This directory has a working copy lock */
svn_boolean_t locked;
/** The repository file lock. (Values of path, token, owner, comment
* and are available if a lock is present) */
const svn_lock_t *lock;
/** Which changelist this item is part of, or NULL if not part of any. */
const char *changelist;
/**
* @defgroup svn_wc_status_ood WC out-of-date info from the repository
* @{
*
* When the working copy item is out-of-date compared to the
* repository, the following fields represent the state of the
* youngest revision of the item in the repository. If the working
* copy is not out of date, the fields are initialized as described
* below.
*/
/** Set to the node kind of the youngest commit, or #svn_node_none
* if not out of date. */
svn_node_kind_t ood_kind;
/** The status of the node, based on the text status if the node has no
* restructuring changes */
enum svn_wc_status_kind repos_node_status;
/** The entry's text status in the repository. */
enum svn_wc_status_kind repos_text_status;
/** The entry's property status in the repository. */
enum svn_wc_status_kind repos_prop_status;
/** The entry's lock in the repository, if any. */
const svn_lock_t *repos_lock;
/** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
* if not out of date. */
svn_revnum_t ood_changed_rev;
/** Set to the most recent commit date, or @c 0 if not out of date. */
apr_time_t ood_changed_date;
/** Set to the user name of the youngest commit, or @c NULL if not
* out of date or non-existent. Because a non-existent @c
* svn:author property has the same behavior as an out-of-date
* working copy, examine @c ood_last_cmt_rev to determine whether
* the working copy is out of date. */
const char *ood_changed_author;
/** @} */
/** Set to the local absolute path that this node was moved from, if this
* file or directory has been moved here locally and is the root of that
* move. Otherwise set to NULL.
*
* This will be NULL for moved-here nodes that are just part of a subtree
* that was moved along (and are not themselves a root of a different move
* operation).
*
* @since New in 1.8. */
const char *moved_from_abspath;
/** Set to the local absolute path that this node was moved to, if this file
* or directory has been moved away locally and corresponds to the root
* of the destination side of the move. Otherwise set to NULL.
*
* Note: Saying just "root" here could be misleading. For example:
* svn mv A AA;
* svn mv AA/B BB;
* creates a situation where A/B is moved-to BB, but one could argue that
* the move source's root actually was AA/B. Note that, as far as the
* working copy is concerned, above case is exactly identical to:
* svn mv A/B BB;
* svn mv A AA;
* In both situations, @a moved_to_abspath would be set for nodes A (moved
* to AA) and A/B (moved to BB), only.
*
* This will be NULL for moved-away nodes that were just part of a subtree
* that was moved along (and are not themselves a root of a different move
* operation).
*
* @since New in 1.8. */
const char *moved_to_abspath;
/** @c TRUE iff the item is a file brought in by an svn:externals definition.
* @since New in 1.8. */
svn_boolean_t file_external;
/* NOTE! Please update svn_wc_dup_status3() when adding new fields here. */
} svn_wc_status3_t;
/**
* ### All diffs are not yet known.
* Same as svn_wc_status3_t, but without the #svn_boolean_t 'versioned'
* field. Instead an item that is not versioned has the 'entry' field set to
* @c NULL.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
typedef struct svn_wc_status2_t
{
/** Can be @c NULL if not under version control. */
const svn_wc_entry_t *entry;
/** The status of the entry itself, including its text if it is a file. */
enum svn_wc_status_kind text_status;
/** The status of the entry's properties. */
enum svn_wc_status_kind prop_status;
/** a directory can be 'locked' if a working copy update was interrupted. */
svn_boolean_t locked;
/** a file or directory can be 'copied' if it's scheduled for
* addition-with-history (or part of a subtree that is scheduled as such.).
*/
svn_boolean_t copied;
/** a file or directory can be 'switched' if the switch command has been
* used. If this is TRUE, then file_external will be FALSE.
*/
svn_boolean_t switched;
/** The entry's text status in the repository. */
enum svn_wc_status_kind repos_text_status;
/** The entry's property status in the repository. */
enum svn_wc_status_kind repos_prop_status;
/** The entry's lock in the repository, if any. */
svn_lock_t *repos_lock;
/** Set to the URI (actual or expected) of the item.
* @since New in 1.3
*/
const char *url;
/**
* @defgroup svn_wc_status_ood WC out-of-date info from the repository
* @{
*
* When the working copy item is out-of-date compared to the
* repository, the following fields represent the state of the
* youngest revision of the item in the repository. If the working
* copy is not out of date, the fields are initialized as described
* below.
*/
/** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
* if not out of date.
* @since New in 1.3
*/
svn_revnum_t ood_last_cmt_rev;
/** Set to the most recent commit date, or @c 0 if not out of date.
* @since New in 1.3
*/
apr_time_t ood_last_cmt_date;
/** Set to the node kind of the youngest commit, or #svn_node_none
* if not out of date.
* @since New in 1.3
*/
svn_node_kind_t ood_kind;
/** Set to the user name of the youngest commit, or @c NULL if not
* out of date or non-existent. Because a non-existent @c
* svn:author property has the same behavior as an out-of-date
* working copy, examine @c ood_last_cmt_rev to determine whether
* the working copy is out of date.
* @since New in 1.3
*/
const char *ood_last_cmt_author;
/** @} */
/** Non-NULL if the entry is the victim of a tree conflict.
* @since New in 1.6
*/
svn_wc_conflict_description_t *tree_conflict;
/** If the item is a file that was added to the working copy with an
* svn:externals; if file_external is TRUE, then switched is always
* FALSE.
* @since New in 1.6
*/
svn_boolean_t file_external;
/** The actual status of the text compared to the pristine base of the
* file. This value isn't masked by other working copy statuses.
* @c pristine_text_status is #svn_wc_status_none if this value was
* not calculated during the status walk.
* @since New in 1.6
*/
enum svn_wc_status_kind pristine_text_status;
/** The actual status of the properties compared to the pristine base of
* the node. This value isn't masked by other working copy statuses.
* @c pristine_prop_status is #svn_wc_status_none if this value was
* not calculated during the status walk.
* @since New in 1.6
*/
enum svn_wc_status_kind pristine_prop_status;
} svn_wc_status2_t;
/**
* Same as #svn_wc_status2_t, but without the #svn_lock_t 'repos_lock', const char 'url', #svn_revnum_t 'ood_last_cmt_rev', apr_time_t 'ood_last_cmt_date', #svn_node_kind_t 'ood_kind', const char 'ood_last_cmt_author', #svn_wc_conflict_description_t 'tree_conflict', #svn_boolean_t 'file_external', #svn_wc_status_kind 'pristine_text_status', and #svn_wc_status_kind 'pristine_prop_status' fields.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
typedef struct svn_wc_status_t
{
/** Can be @c NULL if not under version control. */
const svn_wc_entry_t *entry;
/** The status of the entries text. */
enum svn_wc_status_kind text_status;
/** The status of the entries properties. */
enum svn_wc_status_kind prop_status;
/** a directory can be 'locked' if a working copy update was interrupted. */
svn_boolean_t locked;
/** a file or directory can be 'copied' if it's scheduled for
* addition-with-history (or part of a subtree that is scheduled as such.).
*/
svn_boolean_t copied;
/** a file or directory can be 'switched' if the switch command has been
* used.
*/
svn_boolean_t switched;
/** The entry's text status in the repository. */
enum svn_wc_status_kind repos_text_status;
/** The entry's property status in the repository. */
enum svn_wc_status_kind repos_prop_status;
} svn_wc_status_t;
/**
* Return a deep copy of the @a orig_stat status structure, allocated
* in @a pool.
*
* @since New in 1.7.
*/
svn_wc_status3_t *
svn_wc_dup_status3(const svn_wc_status3_t *orig_stat,
apr_pool_t *pool);
/**
* Same as svn_wc_dup_status3(), but for older svn_wc_status_t structures.
*
* @since New in 1.2
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_wc_status2_t *
svn_wc_dup_status2(const svn_wc_status2_t *orig_stat,
apr_pool_t *pool);
/**
* Same as svn_wc_dup_status2(), but for older svn_wc_status_t structures.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_wc_status_t *
svn_wc_dup_status(const svn_wc_status_t *orig_stat,
apr_pool_t *pool);
/**
* Fill @a *status for @a local_abspath, allocating in @a result_pool.
* Use @a scratch_pool for temporary allocations.
*
* Here are some things to note about the returned structure. A quick
* examination of the @c status->text_status after a successful return of
* this function can reveal the following things:
*
* - #svn_wc_status_none : @a local_abspath is not versioned, and is
* not present on disk
*
* - #svn_wc_status_missing : @a local_abspath is versioned, but is
* missing from the working copy.
*
* - #svn_wc_status_unversioned : @a local_abspath is not versioned,
* but is present on disk and not being
* ignored (see above).
*
* The other available results for the @c text_status field are more
* straightforward in their meanings. See the comments on the
* #svn_wc_status_kind structure for some hints.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_status3(svn_wc_status3_t **status,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_status3(), but with a adm_access baton and absolute
* path.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_status2(svn_wc_status2_t **status,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/**
* Same as svn_wc_status2(), but for older svn_wc_status_t structures.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_status(svn_wc_status_t **status,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/**
* A callback for reporting a @a status about @a local_abspath.
*
* @a baton is a closure object; it should be provided by the
* implementation, and passed by the caller.
*
* @a scratch_pool will be cleared between invocations to the callback.
*
* @since New in 1.7.
*/
typedef svn_error_t *(*svn_wc_status_func4_t)(void *baton,
const char *local_abspath,
const svn_wc_status3_t *status,
apr_pool_t *scratch_pool);
/**
* Same as svn_wc_status_func4_t, but with a non-const status and a relative
* path.
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
typedef svn_error_t *(*svn_wc_status_func3_t)(void *baton,
const char *path,
svn_wc_status2_t *status,
apr_pool_t *pool);
/**
* Same as svn_wc_status_func3_t, but without a provided pool or
* the ability to propagate errors.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
typedef void (*svn_wc_status_func2_t)(void *baton,
const char *path,
svn_wc_status2_t *status);
/**
* Same as svn_wc_status_func2_t, but for older svn_wc_status_t structures.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
typedef void (*svn_wc_status_func_t)(void *baton,
const char *path,
svn_wc_status_t *status);
/**
* Walk the working copy status of @a local_abspath using @a wc_ctx, by
* creating #svn_wc_status3_t structures and sending these through
* @a status_func / @a status_baton.
*
* * Assuming the target is a directory, then:
*
* - If @a get_all is FALSE, then only locally-modified entries will be
* returned. If TRUE, then all entries will be returned.
*
* - If @a ignore_text_mods is TRUE, then the walk will not check for
* modified files. Any #svn_wc_status3_t structures returned for files
* will always have a text_status field set to svn_wc_status_normal.
* If @a ignore_text_mods is FALSE, the walk checks for text changes
* and returns #svn_wc_status3_t structures describing any changes.
*
* - If @a depth is #svn_depth_empty, a status structure will
* be returned for the target only; if #svn_depth_files, for the
* target and its immediate file children; if
* #svn_depth_immediates, for the target and its immediate
* children; if #svn_depth_infinity, for the target and
* everything underneath it, fully recursively.
*
* If @a depth is #svn_depth_unknown, take depths from the
* working copy and behave as above in each directory's case.
*
* If the given @a depth is incompatible with the depth found in a
* working copy directory, the found depth always governs.
*
* If @a no_ignore is set, statuses that would typically be ignored
* will instead be reported.
*
* @a ignore_patterns is an array of file patterns matching
* unversioned files to ignore for the purposes of status reporting,
* or @c NULL if the default set of ignorable file patterns should be used.
* Patterns from #SVN_PROP_IGNORE (and, as of 1.8,
* #SVN_PROP_INHERITABLE_IGNORES) properties are always used, even if not
* specified in @a ignore_patterns.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton while walking
* to determine if the client has canceled the operation.
*
* This function uses @a scratch_pool for temporary allocations.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_walk_status(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t no_ignore,
svn_boolean_t ignore_text_mods,
const apr_array_header_t *ignore_patterns,
svn_wc_status_func4_t status_func,
void *status_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/**
* DEPRECATED -- please use APIs from svn_client.h
*
* ---
*
* Set @a *editor and @a *edit_baton to an editor that generates
* #svn_wc_status3_t structures and sends them through @a status_func /
* @a status_baton. @a anchor_abspath is a working copy directory
* directory which will be used as the root of our editor. If @a
* target_basename is not "", it represents a node in the @a anchor_abspath
* which is the subject of the editor drive (otherwise, the @a
* anchor_abspath is the subject).
*
* If @a set_locks_baton is non-@c NULL, it will be set to a baton that can
* be used in a call to the svn_wc_status_set_repos_locks() function.
*
* Callers drive this editor to describe working copy out-of-dateness
* with respect to the repository. If this information is not
* available or not desired, callers should simply call the
* close_edit() function of the @a editor vtable.
*
* If the editor driver calls @a editor's set_target_revision() vtable
* function, then when the edit drive is completed, @a *edit_revision
* will contain the revision delivered via that interface.
*
* Assuming the target is a directory, then:
*
* - If @a get_all is FALSE, then only locally-modified entries will be
* returned. If TRUE, then all entries will be returned.
*
* - If @a depth is #svn_depth_empty, a status structure will
* be returned for the target only; if #svn_depth_files, for the
* target and its immediate file children; if
* #svn_depth_immediates, for the target and its immediate
* children; if #svn_depth_infinity, for the target and
* everything underneath it, fully recursively.
*
* If @a depth is #svn_depth_unknown, take depths from the
* working copy and behave as above in each directory's case.
*
* If the given @a depth is incompatible with the depth found in a
* working copy directory, the found depth always governs.
*
* If @a no_ignore is set, statuses that would typically be ignored
* will instead be reported.
*
* @a ignore_patterns is an array of file patterns matching
* unversioned files to ignore for the purposes of status reporting,
* or @c NULL if the default set of ignorable file patterns should be used.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton while building
* the @a statushash to determine if the client has canceled the operation.
*
* If @a depth_as_sticky is set handle @a depth like when depth_is_sticky is
* passed for updating. This will show excluded nodes show up as added in the
* repository.
*
* If @a server_performs_filtering is TRUE, assume that the server handles
* the ambient depth filtering, so this doesn't have to be handled in the
* editor.
*
* Allocate the editor itself in @a result_pool, and use @a scratch_pool
* for temporary allocations. The editor will do its temporary allocations
* in a subpool of @a result_pool.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_status_editor5(const svn_delta_editor_t **editor,
void **edit_baton,
void **set_locks_baton,
svn_revnum_t *edit_revision,
svn_wc_context_t *wc_ctx,
const char *anchor_abspath,
const char *target_basename,
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t no_ignore,
svn_boolean_t depth_as_sticky,
svn_boolean_t server_performs_filtering,
const apr_array_header_t *ignore_patterns,
svn_wc_status_func4_t status_func,
void *status_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Same as svn_wc_get_status_editor5, but using #svn_wc_status_func3_t
* instead of #svn_wc_status_func4_t. And @a server_performs_filtering
* always set to #TRUE.
*
* This also uses a single pool parameter, stating that all temporary
* allocations are performed in manually constructed/destroyed subpool.
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_status_editor4(const svn_delta_editor_t **editor,
void **edit_baton,
void **set_locks_baton,
svn_revnum_t *edit_revision,
svn_wc_adm_access_t *anchor,
const char *target,
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t no_ignore,
const apr_array_header_t *ignore_patterns,
svn_wc_status_func3_t status_func,
void *status_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_traversal_info_t *traversal_info,
apr_pool_t *pool);
/**
* Same as svn_wc_get_status_editor4(), but using #svn_wc_status_func2_t
* instead of #svn_wc_status_func3_t.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_status_editor3(const svn_delta_editor_t **editor,
void **edit_baton,
void **set_locks_baton,
svn_revnum_t *edit_revision,
svn_wc_adm_access_t *anchor,
const char *target,
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t no_ignore,
const apr_array_header_t *ignore_patterns,
svn_wc_status_func2_t status_func,
void *status_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_traversal_info_t *traversal_info,
apr_pool_t *pool);
/**
* Like svn_wc_get_status_editor3(), but with @a ignore_patterns
* provided from the corresponding value in @a config, and @a recurse
* instead of @a depth. If @a recurse is TRUE, behave as if for
* #svn_depth_infinity; else if @a recurse is FALSE, behave as if for
* #svn_depth_immediates.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_status_editor2(const svn_delta_editor_t **editor,
void **edit_baton,
void **set_locks_baton,
svn_revnum_t *edit_revision,
svn_wc_adm_access_t *anchor,
const char *target,
apr_hash_t *config,
svn_boolean_t recurse,
svn_boolean_t get_all,
svn_boolean_t no_ignore,
svn_wc_status_func2_t status_func,
void *status_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_traversal_info_t *traversal_info,
apr_pool_t *pool);
/**
* Same as svn_wc_get_status_editor2(), but with @a set_locks_baton set
* to @c NULL, and taking a deprecated svn_wc_status_func_t argument.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_status_editor(const svn_delta_editor_t **editor,
void **edit_baton,
svn_revnum_t *edit_revision,
svn_wc_adm_access_t *anchor,
const char *target,
apr_hash_t *config,
svn_boolean_t recurse,
svn_boolean_t get_all,
svn_boolean_t no_ignore,
svn_wc_status_func_t status_func,
void *status_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_traversal_info_t *traversal_info,
apr_pool_t *pool);
/**
* Associate @a locks, a hash table mapping <tt>const char*</tt>
* absolute repository paths to <tt>svn_lock_t</tt> objects, with a
* @a set_locks_baton returned by an earlier call to
* svn_wc_get_status_editor3(). @a repos_root is the repository root URL.
* Perform all allocations in @a pool.
*
* @note @a locks will not be copied, so it must be valid throughout the
* edit. @a pool must also not be destroyed or cleared before the edit is
* finished.
*
* @since New in 1.2.
*/
svn_error_t *
svn_wc_status_set_repos_locks(void *set_locks_baton,
apr_hash_t *locks,
const char *repos_root,
apr_pool_t *pool);
/** @} */
/**
* Copy @a src_abspath to @a dst_abspath, and schedule @a dst_abspath
* for addition to the repository, remembering the copy history. @a wc_ctx
* is used for accessing the working copy and must contain a write lock for
* the parent directory of @a dst_abspath,
*
* If @a metadata_only is TRUE then this is a database-only operation and
* the working directories and files are not copied.
*
* @a src_abspath must be a file or directory under version control;
* the parent of @a dst_abspath must be a directory under version control
* in the same working copy; @a dst_abspath will be the name of the copied
* item, and it must not exist already if @a metadata_only is FALSE. Note that
* when @a src points to a versioned file, the working file doesn't
* necessarily exist in which case its text-base is used instead.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the operation. If it returns an error
* (typically #SVN_ERR_CANCELLED), return that error immediately.
*
* If @a notify_func is non-NULL, call it with @a notify_baton and the path
* of the root node (only) of the destination.
*
* Use @a scratch_pool for temporary allocations.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_copy3(svn_wc_context_t *wc_ctx,
const char *src_abspath,
const char *dst_abspath,
svn_boolean_t metadata_only,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_copy3(), but takes access batons and a relative path
* and a basename instead of absolute paths and a working copy context.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_copy2(const char *src,
svn_wc_adm_access_t *dst_parent,
const char *dst_basename,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_copy2(), but takes an #svn_wc_notify_func_t instead.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_copy(const char *src,
svn_wc_adm_access_t *dst_parent,
const char *dst_basename,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* Move @a src_abspath to @a dst_abspath, by scheduling @a dst_abspath
* for addition to the repository, remembering the history. Mark @a src_abspath
* as deleted after moving.@a wc_ctx is used for accessing the working copy and
* must contain a write lock for the parent directory of @a src_abspath and
* @a dst_abspath.
*
* If @a metadata_only is TRUE then this is a database-only operation and
* the working directories and files are not changed.
*
* @a src_abspath must be a file or directory under version control;
* the parent of @a dst_abspath must be a directory under version control
* in the same working copy; @a dst_abspath will be the name of the copied
* item, and it must not exist already if @a metadata_only is FALSE. Note that
* when @a src points to a versioned file, the working file doesn't
* necessarily exist in which case its text-base is used instead.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the operation. If it returns an error
* (typically #SVN_ERR_CANCELLED), return that error immediately.
*
* If @a notify_func is non-NULL, call it with @a notify_baton and the path
* of the root node (only) of the destination.
*
* Use @a scratch_pool for temporary allocations.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.7 API.
* @see svn_client_move7()
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_move(svn_wc_context_t *wc_ctx,
const char *src_abspath,
const char *dst_abspath,
svn_boolean_t metadata_only,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/**
* Schedule @a local_abspath for deletion. It will be deleted from the
* repository on the next commit. If @a local_abspath refers to a
* directory, then a recursive deletion will occur. @a wc_ctx must hold
* a write lock for the parent of @a local_abspath, @a local_abspath itself
* and everything below @a local_abspath.
*
* If @a keep_local is FALSE, this function immediately deletes all files,
* modified and unmodified, versioned and of @a delete_unversioned is TRUE,
* unversioned from the working copy.
* It also immediately deletes unversioned directories and directories that
* are scheduled to be added below @a local_abspath. Only versioned may
* remain in the working copy, these get deleted by the update following
* the commit.
*
* If @a keep_local is TRUE, all files and directories will be kept in the
* working copy (and will become unversioned on the next commit).
*
* If @a delete_unversioned_target is TRUE and @a local_abspath is not
* versioned, @a local_abspath will be handled as an added files without
* history. So it will be deleted if @a keep_local is FALSE. If @a
* delete_unversioned is FALSE and @a local_abspath is not versioned a
* #SVN_ERR_WC_PATH_NOT_FOUND error will be returned.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the operation. If it returns an error
* (typically #SVN_ERR_CANCELLED), return that error immediately.
*
* For each path marked for deletion, @a notify_func will be called with
* the @a notify_baton and that path. The @a notify_func callback may be
* @c NULL if notification is not needed.
*
* Use @a scratch_pool for temporary allocations. It may be cleared
* immediately upon returning from this function.
*
* @since New in 1.7.
*/
/* ### BH: Maybe add a delete_switched flag that allows deny switched
nodes like file externals? */
svn_error_t *
svn_wc_delete4(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t keep_local,
svn_boolean_t delete_unversioned_target,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_delete4, but uses an access baton and relative path
* instead of a working copy context and absolute path. @a adm_access
* must hold a write lock for the parent of @a path.
*
* @c delete_unversioned_target will always be set to TRUE.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_delete3(const char *path,
svn_wc_adm_access_t *adm_access,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_boolean_t keep_local,
apr_pool_t *pool);
/**
* Similar to svn_wc_delete3(), but with @a keep_local always set to FALSE.
*
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_delete2(const char *path,
svn_wc_adm_access_t *adm_access,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_delete2(), but takes an #svn_wc_notify_func_t instead.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_delete(const char *path,
svn_wc_adm_access_t *adm_access,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* Schedule the single node that exists on disk at @a local_abspath for
* addition to the working copy. The added node will have the properties
* provided in @a props, or none if that is NULL.
*
* Check and canonicalize the properties in the same way as
* svn_wc_prop_set4(). Return an error and don't add the node if the
* properties are not valid on this node. Unlike svn_wc_prop_set4()
* there is no option to skip some of the checks and canonicalizations.
*
* ### The error code on validity check failure should be specified, and
* preferably should be a single code.
*
* The versioned state of the parent path must be a modifiable directory,
* and the versioned state of @a local_abspath must be either nonexistent or
* deleted; if deleted, the new node will be a replacement.
*
* If @a local_abspath does not exist as file, directory or symlink, return
* #SVN_ERR_WC_PATH_NOT_FOUND.
*
* ### TODO: Split into add_dir, add_file, add_symlink?
*
* @since New in 1.8.
*/
svn_error_t *
svn_wc_add_from_disk2(svn_wc_context_t *wc_ctx,
const char *local_abspath,
const apr_hash_t *props,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_add_from_disk2(), but always passes NULL for @a
* props.
*
* This is a replacement for svn_wc_add4() case 2a (which see for
* details).
* @see svn_wc_add4()
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_add_from_disk(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/**
* Put @a local_abspath under version control by registering it as addition
* or copy in the database containing its parent. The new node is scheduled
* for addition to the repository below its parent node.
*
* 1) If the node is already versioned, it MUST BE the root of a separate
* working copy from the same repository as the parent WC. The new node
* and anything below it will be scheduled for addition inside the parent
* working copy as a copy of the original location. The separate working
* copy will be integrated by this step. In this case, which is only used
* by code like that of "svn cp URL@rev path" @a copyfrom_url and
* @a copyfrom_rev MUST BE the url and revision of @a local_abspath
* in the separate working copy.
*
* 2a) If the node was not versioned before it will be scheduled as a local
* addition or 2b) if @a copyfrom_url and @a copyfrom_rev are set as a copy
* of that location. In this last case the function doesn't set the pristine
* version (of a file) and/or pristine properties, which callers should
* handle via different APIs. Usually it is easier to call
* svn_wc_add_repos_file4() (### or a possible svn_wc_add_repos_dir()) than
* using this variant.
*
* If @a local_abspath does not exist as file, directory or symlink, return
* #SVN_ERR_WC_PATH_NOT_FOUND.
*
* If @a local_abspath is an unversioned directory, record @a depth on it;
* otherwise, ignore @a depth. (Use #svn_depth_infinity unless you exactly
* know what you are doing, or you may create an unexpected sparse working
* copy)
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the operation. If it returns an error
* (typically #SVN_ERR_CANCELLED), return that error immediately.
*
* When the @a local_abspath has been added, then @a notify_func will be
* called (if it is not @c NULL) with the @a notify_baton and the path.
*
* @note Case 1 is deprecated. Consider doing a WC-to-WC copy instead.
* @note For case 2a, prefer svn_wc_add_from_disk().
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_add4(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
const char *copyfrom_url,
svn_revnum_t copyfrom_rev,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_add4(), but with an access baton
* and relative path instead of a context and absolute path.
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_add3(const char *path,
svn_wc_adm_access_t *parent_access,
svn_depth_t depth,
const char *copyfrom_url,
svn_revnum_t copyfrom_rev,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_add3(), but with the @a depth parameter always
* #svn_depth_infinity.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_add2(const char *path,
svn_wc_adm_access_t *parent_access,
const char *copyfrom_url,
svn_revnum_t copyfrom_rev,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_add2(), but takes an #svn_wc_notify_func_t instead.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_add(const char *path,
svn_wc_adm_access_t *parent_access,
const char *copyfrom_url,
svn_revnum_t copyfrom_rev,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/** Add a file to a working copy at @a local_abspath, obtaining the
* text-base's contents from @a new_base_contents, the wc file's
* content from @a new_contents, its unmodified properties from @a
* new_base_props and its actual properties from @a new_props. Use
* @a wc_ctx for accessing the working copy.
*
* The unmodified text and props normally come from the repository
* file represented by the copyfrom args, see below. The new file
* will be marked as copy.
*
* @a new_contents and @a new_props may be NULL, in which case
* the working copy text and props are taken from the base files with
* appropriate translation of the file's content.
*
* @a new_contents must be provided in Normal Form. This is required
* in order to pass both special and non-special files through a stream.
*
* @a wc_ctx must contain a write lock for the parent of @a local_abspath.
*
* If @a copyfrom_url is non-NULL, then @a copyfrom_rev must be a
* valid revision number, and together they are the copyfrom history
* for the new file.
*
* The @a cancel_func and @a cancel_baton are a standard cancellation
* callback, or NULL if no callback is needed. @a notify_func and
* @a notify_baton are a notification callback, and (if not NULL)
* will be notified of the addition of this file.
*
* Use @a scratch_pool for temporary allocations.
*
* ### This function is very redundant with svn_wc_add(). Ideally,
* we'd merge them, so that svn_wc_add() would just take optional
* new_props and optional copyfrom information. That way it could be
* used for both 'svn add somefilesittingonmydisk' and for adding
* files from repositories, with or without copyfrom history.
*
* The problem with this Ideal Plan is that svn_wc_add() also takes
* care of recursive URL-rewriting. There's a whole comment in its
* doc string about how that's really weird, outside its core mission,
* etc, etc. So another part of the Ideal Plan is that that
* functionality of svn_wc_add() would move into a separate function.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_add_repos_file4(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_stream_t *new_base_contents,
svn_stream_t *new_contents,
apr_hash_t *new_base_props,
apr_hash_t *new_props,
const char *copyfrom_url,
svn_revnum_t copyfrom_rev,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_add_repos_file4, but uses access batons and a
* relative path instead of a working copy context and absolute path.
*
* ### NOTE: the notification callback/baton is not yet used.
*
* @since New in 1.6.
* @deprecated Provided for compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_add_repos_file3(const char *dst_path,
svn_wc_adm_access_t *adm_access,
svn_stream_t *new_base_contents,
svn_stream_t *new_contents,
apr_hash_t *new_base_props,
apr_hash_t *new_props,
const char *copyfrom_url,
svn_revnum_t copyfrom_rev,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/** Same as svn_wc_add_repos_file3(), except that it has pathnames rather
* than streams for the text base, and actual text, and has no cancellation.
*
* @since New in 1.4.
* @deprecated Provided for compatibility with the 1.5 API
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_add_repos_file2(const char *dst_path,
svn_wc_adm_access_t *adm_access,
const char *new_text_base_path,
const char *new_text_path,
apr_hash_t *new_base_props,
apr_hash_t *new_props,
const char *copyfrom_url,
svn_revnum_t copyfrom_rev,
apr_pool_t *pool);
/** Same as svn_wc_add_repos_file3(), except that it doesn't have the
* BASE arguments or cancellation.
*
* @deprecated Provided for compatibility with the 1.3 API
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_add_repos_file(const char *dst_path,
svn_wc_adm_access_t *adm_access,
const char *new_text_path,
apr_hash_t *new_props,
const char *copyfrom_url,
svn_revnum_t copyfrom_rev,
apr_pool_t *pool);
/** Remove @a local_abspath from revision control. @a wc_ctx must
* hold a write lock on the parent of @a local_abspath, or if that is a
* WC root then on @a local_abspath itself.
*
* If @a local_abspath is a file, all its info will be removed from the
* administrative area. If @a local_abspath is a directory, then the
* administrative area will be deleted, along with *all* the administrative
* areas anywhere in the tree below @a adm_access.
*
* Normally, only administrative data is removed. However, if
* @a destroy_wf is TRUE, then all working file(s) and dirs are deleted
* from disk as well. When called with @a destroy_wf, any locally
* modified files will *not* be deleted, and the special error
* #SVN_ERR_WC_LEFT_LOCAL_MOD might be returned. (Callers only need to
* check for this special return value if @a destroy_wf is TRUE.)
*
* If @a instant_error is TRUE, then return
* #SVN_ERR_WC_LEFT_LOCAL_MOD the instant a locally modified file is
* encountered. Otherwise, leave locally modified files in place and
* return the error only after all the recursion is complete.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the removal. If it returns an error
* (typically #SVN_ERR_CANCELLED), return that error immediately.
*
* WARNING: This routine is exported for careful, measured use by
* libsvn_client. Do *not* call this routine unless you really
* understand what the heck you're doing.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_remove_from_revision_control2(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t destroy_wf,
svn_boolean_t instant_error,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_remove_from_revision_control2() but with a name
* and access baton.
*
* WARNING: This routine was exported for careful, measured use by
* libsvn_client. Do *not* call this routine unless you really
* understand what the heck you're doing.
*
* @deprecated Provided for compatibility with the 1.6 API
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_remove_from_revision_control(svn_wc_adm_access_t *adm_access,
const char *name,
svn_boolean_t destroy_wf,
svn_boolean_t instant_error,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Assuming @a local_abspath is under version control or a tree conflict
* victim and in a state of conflict, then take @a local_abspath *out*
* of this state. If @a resolve_text is TRUE then any text conflict is
* resolved, if @a resolve_tree is TRUE then any tree conflicts are
* resolved. If @a resolve_prop is set to "" all property conflicts are
* resolved, if it is set to any other string value, conflicts on that
* specific property are resolved and when resolve_prop is NULL, no
* property conflicts are resolved.
*
* If @a depth is #svn_depth_empty, act only on @a local_abspath; if
* #svn_depth_files, resolve @a local_abspath and its conflicted file
* children (if any); if #svn_depth_immediates, resolve @a local_abspath
* and all its immediate conflicted children (both files and directories,
* if any); if #svn_depth_infinity, resolve @a local_abspath and every
* conflicted file or directory anywhere beneath it.
*
* If @a conflict_choice is #svn_wc_conflict_choose_base, resolve the
* conflict with the old file contents; if
* #svn_wc_conflict_choose_mine_full, use the original working contents;
* if #svn_wc_conflict_choose_theirs_full, the new contents; and if
* #svn_wc_conflict_choose_merged, don't change the contents at all,
* just remove the conflict status, which is the pre-1.5 behavior.
*
* #svn_wc_conflict_choose_theirs_conflict and
* #svn_wc_conflict_choose_mine_conflict are not legal for binary
* files or properties.
*
* @a wc_ctx is a working copy context, with a write lock, for @a
* local_abspath.
*
* Needless to say, this function doesn't touch conflict markers or
* anything of that sort -- only a human can semantically resolve a
* conflict. Instead, this function simply marks a file as "having
* been resolved", clearing the way for a commit.
*
* The implementation details are opaque, as our "conflicted" criteria
* might change over time. (At the moment, this routine removes the
* three fulltext 'backup' files and any .prej file created in a conflict,
* and modifies @a local_abspath's entry.)
*
* If @a local_abspath is not under version control and not a tree
* conflict, return #SVN_ERR_ENTRY_NOT_FOUND. If @a path isn't in a
* state of conflict to begin with, do nothing, and return #SVN_NO_ERROR.
*
* If @c local_abspath was successfully taken out of a state of conflict,
* report this information to @c notify_func (if non-@c NULL.) If only
* text, only property, or only tree conflict resolution was requested,
* and it was successful, then success gets reported.
*
* Temporary allocations will be performed in @a scratch_pool.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_resolved_conflict5(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
svn_boolean_t resolve_text,
const char *resolve_prop,
svn_boolean_t resolve_tree,
svn_wc_conflict_choice_t conflict_choice,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_resolved_conflict5, but takes an absolute path
* and an access baton. This version doesn't support resolving a specific
* property.conflict.
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_resolved_conflict4(const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t resolve_text,
svn_boolean_t resolve_props,
svn_boolean_t resolve_tree,
svn_depth_t depth,
svn_wc_conflict_choice_t conflict_choice,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_resolved_conflict4(), but without tree-conflict
* resolution support.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_resolved_conflict3(const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t resolve_text,
svn_boolean_t resolve_props,
svn_depth_t depth,
svn_wc_conflict_choice_t conflict_choice,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_resolved_conflict3(), but without automatic conflict
* resolution support, and with @a depth set according to @a recurse:
* if @a recurse is TRUE, @a depth is #svn_depth_infinity, else it is
* #svn_depth_files.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_resolved_conflict2(const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t resolve_text,
svn_boolean_t resolve_props,
svn_boolean_t recurse,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_resolved_conflict2(), but takes an
* svn_wc_notify_func_t and doesn't have cancellation support.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_resolved_conflict(const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t resolve_text,
svn_boolean_t resolve_props,
svn_boolean_t recurse,
svn_wc_notify_func_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/* Commits. */
/**
* Storage type for queued post-commit data.
*
* @since New in 1.5.
*/
typedef struct svn_wc_committed_queue_t svn_wc_committed_queue_t;
/**
* Create a queue for use with svn_wc_queue_committed() and
* svn_wc_process_committed_queue().
*
* The returned queue and all further allocations required for queuing
* new items will also be done from @a pool.
*
* @since New in 1.5.
*/
svn_wc_committed_queue_t *
svn_wc_committed_queue_create(apr_pool_t *pool);
/**
* Queue committed items to be processed later by
* svn_wc_process_committed_queue2().
*
* Record in @a queue that @a local_abspath will need to be bumped
* after a commit succeeds.
*
* If non-NULL, @a wcprop_changes is an array of <tt>svn_prop_t *</tt>
* changes to wc properties; if an #svn_prop_t->value is NULL, then
* that property is deleted.
* ### [JAF] No, a prop whose value is NULL is ignored, not deleted. This
* ### seems to be not a set of changes but rather the new complete set of
* ### props. And it's renamed to 'new_dav_cache' inside; why?
*
* If @a remove_lock is @c TRUE, any entryprops related to a repository
* lock will be removed.
*
* If @a remove_changelist is @c TRUE, any association with a
* changelist will be removed.
*
*
* If @a sha1_checksum is non-NULL, use it to identify the node's pristine
* text.
*
* If @a recurse is TRUE and @a local_abspath is a directory, then bump every
* versioned object at or under @a local_abspath. This is usually done for
* copied trees.
*
* ### In the present implementation, if a recursive directory item is in
* the queue, then any children (at any depth) of that directory that
* are also in the queue as separate items will get:
* 'wcprop_changes' = NULL;
* 'remove_lock' = FALSE;
* 'remove_changelist' from the recursive parent item;
* and any children (at any depth) of that directory that are NOT in
* the queue as separate items will get:
* 'wcprop_changes' = NULL;
* 'remove_lock' = FALSE;
* 'remove_changelist' from the recursive parent item;
*
* @note the @a recurse parameter should be used with extreme care since
* it will bump ALL nodes under the directory, regardless of their
* actual inclusion in the new revision.
*
* All pointer data passed to this function (@a local_abspath,
* @a wcprop_changes and the checksums) should remain valid until the
* queue has been processed by svn_wc_process_committed_queue2().
*
* Temporary allocations will be performed in @a scratch_pool, and persistent
* allocations will use the same pool as @a queue used when it was created.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_queue_committed3(svn_wc_committed_queue_t *queue,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t recurse,
const apr_array_header_t *wcprop_changes,
svn_boolean_t remove_lock,
svn_boolean_t remove_changelist,
const svn_checksum_t *sha1_checksum,
apr_pool_t *scratch_pool);
/** Same as svn_wc_queue_committed3() except @a path doesn't have to be an
* abspath and @a adm_access is unused and a SHA-1 checksum cannot be
* specified.
*
* @since New in 1.6.
*
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_queue_committed2(svn_wc_committed_queue_t *queue,
const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t recurse,
const apr_array_header_t *wcprop_changes,
svn_boolean_t remove_lock,
svn_boolean_t remove_changelist,
const svn_checksum_t *md5_checksum,
apr_pool_t *scratch_pool);
/** Same as svn_wc_queue_committed2() but the @a queue parameter has an
* extra indirection and @a digest is supplied instead of a checksum type.
*
* @note despite the extra indirection, this function does NOT allocate
* the queue for you. svn_wc_committed_queue_create() must be called.
*
* @since New in 1.5
*
* @deprecated Provided for backwards compatibility with 1.5
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_queue_committed(svn_wc_committed_queue_t **queue,
const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t recurse,
const apr_array_header_t *wcprop_changes,
svn_boolean_t remove_lock,
svn_boolean_t remove_changelist,
const unsigned char *digest,
apr_pool_t *pool);
/**
* Bump all items in @a queue to @a new_revnum after a commit succeeds.
* @a rev_date and @a rev_author are the (server-side) date and author
* of the new revision; one or both may be @c NULL.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
* if the client wants to cancel the operation.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_process_committed_queue2(svn_wc_committed_queue_t *queue,
svn_wc_context_t *wc_ctx,
svn_revnum_t new_revnum,
const char *rev_date,
const char *rev_author,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/** @see svn_wc_process_committed_queue2()
*
* @since New in 1.5.
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_process_committed_queue(svn_wc_committed_queue_t *queue,
svn_wc_adm_access_t *adm_access,
svn_revnum_t new_revnum,
const char *rev_date,
const char *rev_author,
apr_pool_t *pool);
/**
* @note this function has improper expectations around the operation and
* execution of other parts of the Subversion WC library. The resulting
* coupling makes this interface near-impossible to support. Documentation
* has been removed, as a result.
*
* @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
* for backwards compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_process_committed4(const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t recurse,
svn_revnum_t new_revnum,
const char *rev_date,
const char *rev_author,
const apr_array_header_t *wcprop_changes,
svn_boolean_t remove_lock,
svn_boolean_t remove_changelist,
const unsigned char *digest,
apr_pool_t *pool);
/** @see svn_wc_process_committed4()
*
* @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
* for backwards compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_process_committed3(const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t recurse,
svn_revnum_t new_revnum,
const char *rev_date,
const char *rev_author,
const apr_array_header_t *wcprop_changes,
svn_boolean_t remove_lock,
const unsigned char *digest,
apr_pool_t *pool);
/** @see svn_wc_process_committed4()
*
* @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
* for backwards compatibility with the 1.3 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_process_committed2(const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t recurse,
svn_revnum_t new_revnum,
const char *rev_date,
const char *rev_author,
const apr_array_header_t *wcprop_changes,
svn_boolean_t remove_lock,
apr_pool_t *pool);
/** @see svn_wc_process_committed4()
*
* @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
* for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_process_committed(const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t recurse,
svn_revnum_t new_revnum,
const char *rev_date,
const char *rev_author,
const apr_array_header_t *wcprop_changes,
apr_pool_t *pool);
/**
* Do a depth-first crawl in a working copy, beginning at @a local_abspath,
* using @a wc_ctx for accessing the working copy.
*
* Communicate the `state' of the working copy's revisions and depths
* to @a reporter/@a report_baton. Obviously, if @a local_abspath is a
* file instead of a directory, this depth-first crawl will be a short one.
*
* No locks or logs are created, nor are any animals harmed in the
* process unless @a restore_files is TRUE. No cleanup is necessary.
*
* After all revisions are reported, @a reporter->finish_report() is
* called, which immediately causes the RA layer to update the working
* copy. Thus the return value may very well reflect the result of
* the update!
*
* If @a depth is #svn_depth_empty, then report state only for
* @a path itself. If #svn_depth_files, do the same and include
* immediate file children of @a path. If #svn_depth_immediates,
* then behave as if for #svn_depth_files but also report the
* property states of immediate subdirectories. If @a depth is
* #svn_depth_infinity, then report state fully recursively. All
* descents are only as deep as @a path's own depth permits, of
* course. If @a depth is #svn_depth_unknown, then just use
* #svn_depth_infinity, which in practice means depth of @a path.
*
* Iff @a honor_depth_exclude is TRUE, the crawler will report paths
* whose ambient depth is #svn_depth_exclude as being excluded, and
* thus prevent the server from pushing update data for those paths;
* therefore, don't set this flag if you wish to pull in excluded paths.
* Note that #svn_depth_exclude on the target @a path is never
* honored, even if @a honor_depth_exclude is TRUE, because we need to
* be able to explicitly pull in a target. For example, if this is
* the working copy...
*
* svn co greek_tree_repos wc_dir
* svn up --set-depth exclude wc_dir/A/B/E # now A/B/E is excluded
*
* ...then 'svn up wc_dir/A/B' would report E as excluded (assuming
* @a honor_depth_exclude is TRUE), but 'svn up wc_dir/A/B/E' would
* not, because the latter is trying to explicitly pull in E. In
* general, we never report the update target as excluded.
*
* Iff @a depth_compatibility_trick is TRUE, then set the @c start_empty
* flag on @a reporter->set_path() and @a reporter->link_path() calls
* as necessary to trick a pre-1.5 (i.e., depth-unaware) server into
* sending back all the items the client might need to upgrade a
* working copy from a shallower depth to a deeper one.
*
* If @a restore_files is TRUE, then unexpectedly missing working files
* will be restored from the administrative directory's cache. For each
* file restored, the @a notify_func function will be called with the
* @a notify_baton and the path of the restored file. @a notify_func may
* be @c NULL if this notification is not required. If @a
* use_commit_times is TRUE, then set restored files' timestamps to
* their last-commit-times.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_crawl_revisions5(svn_wc_context_t *wc_ctx,
const char *local_abspath,
const svn_ra_reporter3_t *reporter,
void *report_baton,
svn_boolean_t restore_files,
svn_depth_t depth,
svn_boolean_t honor_depth_exclude,
svn_boolean_t depth_compatibility_trick,
svn_boolean_t use_commit_times,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_crawl_revisions5, but with a relative path and
* access baton instead of an absolute path and wc_ctx.
*
* Passes NULL for @a cancel_func and @a cancel_baton.
*
* @since New in 1.6.
* @deprecated Provided for compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_crawl_revisions4(const char *path,
svn_wc_adm_access_t *adm_access,
const svn_ra_reporter3_t *reporter,
void *report_baton,
svn_boolean_t restore_files,
svn_depth_t depth,
svn_boolean_t honor_depth_exclude,
svn_boolean_t depth_compatibility_trick,
svn_boolean_t use_commit_times,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_wc_traversal_info_t *traversal_info,
apr_pool_t *pool);
/**
* Similar to svn_wc_crawl_revisions4, but with @a honor_depth_exclude always
* set to false.
*
* @deprecated Provided for compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_crawl_revisions3(const char *path,
svn_wc_adm_access_t *adm_access,
const svn_ra_reporter3_t *reporter,
void *report_baton,
svn_boolean_t restore_files,
svn_depth_t depth,
svn_boolean_t depth_compatibility_trick,
svn_boolean_t use_commit_times,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_wc_traversal_info_t *traversal_info,
apr_pool_t *pool);
/**
* Similar to svn_wc_crawl_revisions3, but taking svn_ra_reporter2_t
* instead of svn_ra_reporter3_t, and therefore only able to report
* #svn_depth_infinity for depths; and taking @a recurse instead of @a
* depth; and with @a depth_compatibility_trick always false.
*
* @deprecated Provided for compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_crawl_revisions2(const char *path,
svn_wc_adm_access_t *adm_access,
const svn_ra_reporter2_t *reporter,
void *report_baton,
svn_boolean_t restore_files,
svn_boolean_t recurse,
svn_boolean_t use_commit_times,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_wc_traversal_info_t *traversal_info,
apr_pool_t *pool);
/**
* Similar to svn_wc_crawl_revisions2(), but takes an #svn_wc_notify_func_t
* and a #svn_ra_reporter_t instead.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_crawl_revisions(const char *path,
svn_wc_adm_access_t *adm_access,
const svn_ra_reporter_t *reporter,
void *report_baton,
svn_boolean_t restore_files,
svn_boolean_t recurse,
svn_boolean_t use_commit_times,
svn_wc_notify_func_t notify_func,
void *notify_baton,
svn_wc_traversal_info_t *traversal_info,
apr_pool_t *pool);
/**
* @defgroup svn_wc_roots Working copy roots
* @{
*/
/** If @a is_wcroot is not @c NULL, set @a *is_wcroot to @c TRUE if @a
* local_abspath is the root of the working copy, otherwise to @c FALSE.
*
* If @a is_switched is not @c NULL, set @a *is_switched to @c TRUE if @a
* local_abspath is not the root of the working copy, and switched against its
* parent.
*
* If @a kind is not @c NULL, set @a *kind to the node kind of @a
* local_abspath.
*
* Use @a scratch_pool for any temporary allocations.
*
* @since New in 1.8.
*/
svn_error_t *
svn_wc_check_root(svn_boolean_t *is_wcroot,
svn_boolean_t *is_switched,
svn_node_kind_t *kind,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
/** Set @a *wc_root to @c TRUE if @a local_abspath represents a "working copy
* root", @c FALSE otherwise. Here, @a local_abspath is a "working copy root"
* if its parent directory is not a WC or if it is switched. Also, a deleted
* tree-conflict victim is considered a "working copy root" because it has no
* URL.
*
* If @a local_abspath is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
*
* Use @a scratch_pool for any temporary allocations.
*
* @note For legacy reasons only a directory can be a wc-root. However, this
* function will also set wc_root to @c TRUE for a switched file.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.7 API. Consider
* using svn_wc_check_root() instead.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_is_wc_root2(svn_boolean_t *wc_root,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_is_wc_root2(), but with an access baton and relative
* path.
*
* @note If @a path is '', this function will always return @c TRUE.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_is_wc_root(svn_boolean_t *wc_root,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/** @} */
/* Updates. */
/** Conditionally split @a path into an @a anchor and @a target for the
* purpose of updating and committing.
*
* @a anchor is the directory at which the update or commit editor
* should be rooted.
*
* @a target is the actual subject (relative to the @a anchor) of the
* update/commit, or "" if the @a anchor itself is the subject.
*
* Allocate @a anchor and @a target in @a result_pool; @a scratch_pool
* is used for temporary allocations.
*
* @note Even though this API uses a #svn_wc_context_t, it accepts a
* (possibly) relative path and returns a (possibly) relative path in
* @a *anchor. The reason being that the outputs are generally used to
* open access batons, and such opening currently requires relative paths.
* In the long-run, I expect this API to be removed from 1.7, due to the
* remove of access batons, but for the time being, the #svn_wc_context_t
* parameter allows us to avoid opening a duplicate database, just for this
* function.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_get_actual_target2(const char **anchor,
const char **target,
svn_wc_context_t *wc_ctx,
const char *path,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_get_actual_target2(), but without the wc context, and
* with a absolute path.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_actual_target(const char *path,
const char **anchor,
const char **target,
apr_pool_t *pool);
/**
* @defgroup svn_wc_update_switch Update and switch (update-like functionality)
* @{
*/
/**
* A simple callback type to wrap svn_ra_get_file(); see that
* docstring for more information.
*
* This technique allows libsvn_client to 'wrap' svn_ra_get_file() and
* pass it down into libsvn_wc functions, thus allowing the WC layer
* to legally call the RA function via (blind) callback.
*
* @since New in 1.5
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
typedef svn_error_t *(*svn_wc_get_file_t)(void *baton,
const char *path,
svn_revnum_t revision,
svn_stream_t *stream,
svn_revnum_t *fetched_rev,
apr_hash_t **props,
apr_pool_t *pool);
/**
* A simple callback type to wrap svn_ra_get_dir2() for avoiding issue #3569,
* where a directory is updated to a revision without some of its children
* recorded in the working copy. A future update won't bring these files in
* because the repository assumes they are already there.
*
* We really only need the names of the dirents for a not-present marking,
* but we also store the node-kind if we receive one.
*
* @a *dirents should be set to a hash mapping <tt>const char *</tt> child
* names, to <tt>const svn_dirent_t *</tt> instances.
*
* @since New in 1.7.
*/
typedef svn_error_t *(*svn_wc_dirents_func_t)(void *baton,
apr_hash_t **dirents,
const char *repos_root_url,
const char *repos_relpath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* DEPRECATED -- please use APIs from svn_client.h
*
* ---
*
* Set @a *editor and @a *edit_baton to an editor and baton for updating a
* working copy.
*
* @a anchor_abspath is a local working copy directory, with a fully recursive
* write lock in @a wc_ctx, which will be used as the root of our editor.
*
* @a target_basename is the entry in @a anchor_abspath that will actually be
* updated, or the empty string if all of @a anchor_abspath should be updated.
*
* The editor invokes @a notify_func with @a notify_baton as the update
* progresses, if @a notify_func is non-NULL.
*
* If @a cancel_func is non-NULL, the editor will invoke @a cancel_func with
* @a cancel_baton as the update progresses to see if it should continue.
*
* If @a conflict_func is non-NULL, then invoke it with @a
* conflict_baton whenever a conflict is encountered, giving the
* callback a chance to resolve the conflict before the editor takes
* more drastic measures (such as marking a file conflicted, or
* bailing out of the update).
*
* If @a external_func is non-NULL, then invoke it with @a external_baton
* whenever external changes are encountered, giving the callback a chance
* to store the external information for processing.
*
* If @a diff3_cmd is non-NULL, then use it as the diff3 command for
* any merging; otherwise, use the built-in merge code.
*
* @a preserved_exts is an array of filename patterns which, when
* matched against the extensions of versioned files, determine for
* which such files any related generated conflict files will preserve
* the original file's extension as their own. If a file's extension
* does not match any of the patterns in @a preserved_exts (which is
* certainly the case if @a preserved_exts is @c NULL or empty),
* generated conflict files will carry Subversion's custom extensions.
*
* @a target_revision is a pointer to a revision location which, after
* successful completion of the drive of this editor, will be
* populated with the revision to which the working copy was updated.
*
* If @a use_commit_times is TRUE, then all edited/added files will
* have their working timestamp set to the last-committed-time. If
* FALSE, the working files will be touched with the 'now' time.
*
* If @a allow_unver_obstructions is TRUE, then allow unversioned
* obstructions when adding a path.
*
* If @a adds_as_modification is TRUE, a local addition at the same path
* as an incoming addition of the same node kind results in a normal node
* with a possible local modification, instead of a tree conflict.
*
* If @a depth is #svn_depth_infinity, update fully recursively.
* Else if it is #svn_depth_immediates, update the uppermost
* directory, its file entries, and the presence or absence of
* subdirectories (but do not descend into the subdirectories).
* Else if it is #svn_depth_files, update the uppermost directory
* and its immediate file entries, but not subdirectories.
* Else if it is #svn_depth_empty, update exactly the uppermost
* target, and don't touch its entries.
*
* If @a depth_is_sticky is set and @a depth is not
* #svn_depth_unknown, then in addition to updating PATHS, also set
* their sticky ambient depth value to @a depth.
*
* If @a server_performs_filtering is TRUE, assume that the server handles
* the ambient depth filtering, so this doesn't have to be handled in the
* editor.
*
* If @a clean_checkout is TRUE, assume that we are checking out into an
* empty directory, and so bypass a number of conflict checks that are
* unnecessary in this case.
*
* If @a fetch_dirents_func is not NULL, the update editor may call this
* callback, when asked to perform a depth restricted update. It will do this
* before returning the editor to allow using the primary ra session for this.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_update_editor4(const svn_delta_editor_t **editor,
void **edit_baton,
svn_revnum_t *target_revision,
svn_wc_context_t *wc_ctx,
const char *anchor_abspath,
const char *target_basename,
svn_boolean_t use_commit_times,
svn_depth_t depth,
svn_boolean_t depth_is_sticky,
svn_boolean_t allow_unver_obstructions,
svn_boolean_t adds_as_modification,
svn_boolean_t server_performs_filtering,
svn_boolean_t clean_checkout,
const char *diff3_cmd,
const apr_array_header_t *preserved_exts,
svn_wc_dirents_func_t fetch_dirents_func,
void *fetch_dirents_baton,
svn_wc_conflict_resolver_func2_t conflict_func,
void *conflict_baton,
svn_wc_external_update_t external_func,
void *external_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_get_update_editor4, but uses access batons and relative
* path instead of a working copy context-abspath pair and
* svn_wc_traversal_info_t instead of an externals callback. Also,
* @a fetch_func and @a fetch_baton are ignored.
*
* If @a ti is non-NULL, record traversal info in @a ti, for use by
* post-traversal accessors such as svn_wc_edited_externals().
*
* All locks, both those in @a anchor and newly acquired ones, will be
* released when the editor driver calls @c close_edit.
*
* Always sets @a adds_as_modification to TRUE, @a server_performs_filtering
* and @a clean_checkout to FALSE.
*
* Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
* svn_wc_conflict_resolver_func2_t.
*
* This function assumes that @a diff3_cmd is path encoded. Later versions
* assume utf-8.
*
* Always passes a null dirent function.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_update_editor3(svn_revnum_t *target_revision,
svn_wc_adm_access_t *anchor,
const char *target,
svn_boolean_t use_commit_times,
svn_depth_t depth,
svn_boolean_t depth_is_sticky,
svn_boolean_t allow_unver_obstructions,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_conflict_resolver_func_t conflict_func,
void *conflict_baton,
svn_wc_get_file_t fetch_func,
void *fetch_baton,
const char *diff3_cmd,
const apr_array_header_t *preserved_exts,
const svn_delta_editor_t **editor,
void **edit_baton,
svn_wc_traversal_info_t *ti,
apr_pool_t *pool);
/**
* Similar to svn_wc_get_update_editor3() but with the @a
* allow_unver_obstructions parameter always set to FALSE, @a
* conflict_func and baton set to NULL, @a fetch_func and baton set to
* NULL, @a preserved_exts set to NULL, @a depth_is_sticky set to
* FALSE, and @a depth set according to @a recurse: if @a recurse is
* TRUE, pass #svn_depth_infinity, if FALSE, pass #svn_depth_files.
*
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_update_editor2(svn_revnum_t *target_revision,
svn_wc_adm_access_t *anchor,
const char *target,
svn_boolean_t use_commit_times,
svn_boolean_t recurse,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
const char *diff3_cmd,
const svn_delta_editor_t **editor,
void **edit_baton,
svn_wc_traversal_info_t *ti,
apr_pool_t *pool);
/**
* Similar to svn_wc_get_update_editor2(), but takes an svn_wc_notify_func_t
* instead.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_update_editor(svn_revnum_t *target_revision,
svn_wc_adm_access_t *anchor,
const char *target,
svn_boolean_t use_commit_times,
svn_boolean_t recurse,
svn_wc_notify_func_t notify_func,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
const char *diff3_cmd,
const svn_delta_editor_t **editor,
void **edit_baton,
svn_wc_traversal_info_t *ti,
apr_pool_t *pool);
/**
* DEPRECATED -- please use APIs from svn_client.h
*
* ---
*
* A variant of svn_wc_get_update_editor4().
*
* Set @a *editor and @a *edit_baton to an editor and baton for "switching"
* a working copy to a new @a switch_url. (Right now, this URL must be
* within the same repository that the working copy already comes
* from.) @a switch_url must not be @c NULL.
*
* All other parameters behave as for svn_wc_get_update_editor4().
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_switch_editor4(const svn_delta_editor_t **editor,
void **edit_baton,
svn_revnum_t *target_revision,
svn_wc_context_t *wc_ctx,
const char *anchor_abspath,
const char *target_basename,
const char *switch_url,
svn_boolean_t use_commit_times,
svn_depth_t depth,
svn_boolean_t depth_is_sticky,
svn_boolean_t allow_unver_obstructions,
svn_boolean_t server_performs_filtering,
const char *diff3_cmd,
const apr_array_header_t *preserved_exts,
svn_wc_dirents_func_t fetch_dirents_func,
void *fetch_dirents_baton,
svn_wc_conflict_resolver_func2_t conflict_func,
void *conflict_baton,
svn_wc_external_update_t external_func,
void *external_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_get_switch_editor4, but uses access batons and relative
* path instead of a working copy context and svn_wc_traversal_info_t instead
* of an externals callback.
*
* If @a ti is non-NULL, record traversal info in @a ti, for use by
* post-traversal accessors such as svn_wc_edited_externals().
*
* All locks, both those in @a anchor and newly acquired ones, will be
* released when the editor driver calls @c close_edit.
*
* Always sets @a server_performs_filtering to FALSE.
*
* Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
* svn_wc_conflict_resolver_func2_t.
*
* This function assumes that @a diff3_cmd is path encoded. Later versions
* assume utf-8.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_switch_editor3(svn_revnum_t *target_revision,
svn_wc_adm_access_t *anchor,
const char *target,
const char *switch_url,
svn_boolean_t use_commit_times,
svn_depth_t depth,
svn_boolean_t depth_is_sticky,
svn_boolean_t allow_unver_obstructions,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_conflict_resolver_func_t conflict_func,
void *conflict_baton,
const char *diff3_cmd,
const apr_array_header_t *preserved_exts,
const svn_delta_editor_t **editor,
void **edit_baton,
svn_wc_traversal_info_t *ti,
apr_pool_t *pool);
/**
* Similar to svn_wc_get_switch_editor3() but with the
* @a allow_unver_obstructions parameter always set to FALSE,
* @a preserved_exts set to NULL, @a conflict_func and baton set to NULL,
* @a depth_is_sticky set to FALSE, and @a depth set according to @a
* recurse: if @a recurse is TRUE, pass #svn_depth_infinity, if
* FALSE, pass #svn_depth_files.
*
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_switch_editor2(svn_revnum_t *target_revision,
svn_wc_adm_access_t *anchor,
const char *target,
const char *switch_url,
svn_boolean_t use_commit_times,
svn_boolean_t recurse,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
const char *diff3_cmd,
const svn_delta_editor_t **editor,
void **edit_baton,
svn_wc_traversal_info_t *ti,
apr_pool_t *pool);
/**
* Similar to svn_wc_get_switch_editor2(), but takes an
* #svn_wc_notify_func_t instead.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_switch_editor(svn_revnum_t *target_revision,
svn_wc_adm_access_t *anchor,
const char *target,
const char *switch_url,
svn_boolean_t use_commit_times,
svn_boolean_t recurse,
svn_wc_notify_func_t notify_func,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
const char *diff3_cmd,
const svn_delta_editor_t **editor,
void **edit_baton,
svn_wc_traversal_info_t *ti,
apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_wc_properties Properties
* @{
*/
/** Set @a *props to a hash table mapping <tt>char *</tt> names onto
* <tt>svn_string_t *</tt> values for all the regular properties of
* @a local_abspath. Allocate the table, names, and values in
* @a result_pool. If the node has no properties, then an empty hash
* is returned. Use @a wc_ctx to access the working copy, and @a
* scratch_pool for temporary allocations.
*
* If the node does not exist, #SVN_ERR_WC_PATH_NOT_FOUND is returned.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_prop_list2(apr_hash_t **props,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_prop_list2() but with a #svn_wc_adm_access_t /
* relative path parameter pair.
*
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_prop_list(apr_hash_t **props,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/** Return the set of "pristine" properties for @a local_abspath.
*
* There are node states where properties do not make sense. For these
* cases, NULL will be returned in @a *props. Otherwise, a hash table
* will always be returned (but may be empty, indicating no properties).
*
* If the node is locally-added, then @a *props will be set to NULL since
* pristine properties are undefined. Note: if this addition is replacing a
* previously-deleted node, then the replaced node's properties are not
* available until the addition is reverted.
*
* If the node has been copied (from another node in the repository), then
* the pristine properties will correspond to those original properties.
*
* If the node is locally-deleted, these properties will correspond to
* the BASE node's properties, as checked-out from the repository. Note: if
* this deletion is a child of a copy, then the pristine properties will
* correspond to that copy's properties, not any potential BASE node. The
* BASE node's properties will not be accessible until the copy is reverted.
*
* Nodes that are incomplete, excluded, absent, or not present at the
* node's revision will return NULL in @a props.
*
* If the node is not versioned, SVN_ERR_WC_PATH_NOT_FOUND will be returned.
*
* @a props will be allocated in @a result_pool, and all temporary
* allocations will be performed in @a scratch_pool.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_get_pristine_props(apr_hash_t **props,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Set @a *value to the value of property @a name for @a local_abspath,
* allocating @a *value in @a result_pool. If no such prop, set @a *value
* to @c NULL. @a name may be a regular or wc property; if it is an
* entry property, return the error #SVN_ERR_BAD_PROP_KIND. @a wc_ctx
* is used to access the working copy.
*
* If @a local_abspath is not a versioned path, return
* #SVN_ERR_WC_PATH_NOT_FOUND
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_prop_get2(const svn_string_t **value,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
const char *name,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_prop_get2(), but with a #svn_wc_adm_access_t /
* relative path parameter pair.
*
* When @a path is not versioned, set @a *value to NULL.
*
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_prop_get(const svn_string_t **value,
const char *name,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/**
* Set property @a name to @a value for @a local_abspath, or if @a value is
* NULL, remove property @a name from @a local_abspath. Use @a wc_ctx to
* access @a local_abspath.
*
* @a name may be a regular property or a "wc property". If @a name is
* an "entry property", return the error #SVN_ERR_BAD_PROP_KIND (even if
* @a skip_checks is TRUE).
*
* If @a name is a "wc property", then just update the WC DAV cache for
* @a local_abspath with @a name and @a value. In this case, @a depth
* must be #svn_depth_empty.
*
* The rest of this description applies when @a name is a regular property.
*
* If @a name is a name in the reserved "svn:" name space, and @a value is
* non-null, then canonicalize the property value and check the property
* name and value as documented for svn_wc_canonicalize_svn_prop().
* @a skip_checks controls the level of checking as documented there.
*
* Return an error if the canonicalization or the check fails.
* The error will be either #SVN_ERR_ILLEGAL_TARGET (if the
* property is not appropriate for @a path), or
* #SVN_ERR_BAD_MIME_TYPE (if @a name is "svn:mime-type", but @a value
* is not a valid mime-type).
* ### That is not currently right -- several other errors can be raised.
*
* @a depth follows the usual semantics for depth.
*
* @a changelist_filter is an array of <tt>const char *</tt> changelist
* names, used as a restrictive filter on items whose properties are
* set; that is, don't set properties on any item unless it's a member
* of one of those changelists. If @a changelist_filter is empty (or
* altogether @c NULL), no changelist filtering occurs.
*
* If @a cancel_func is non-NULL, then it will be invoked (with the
* @a cancel_baton value passed) during the processing of the property
* set (i.e. when @a depth indicates some amount of recursion).
*
* For each file or directory operated on, @a notify_func will be called
* with its path and the @a notify_baton. @a notify_func may be @c NULL
* if you are not interested in this information.
*
* Use @a scratch_pool for temporary allocation.
*
* @note If the caller is setting both svn:mime-type and svn:eol-style in
* separate calls, and @a skip_checks is false, there is an ordering
* dependency between them, as the validity check for svn:eol-style makes
* use of the current value of svn:mime-type.
*
* ### The error code on validity check failure should be specified, and
* should be a single code or a very small set of possibilities.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_prop_set4(svn_wc_context_t *wc_ctx,
const char *local_abspath,
const char *name,
const svn_string_t *value,
svn_depth_t depth,
svn_boolean_t skip_checks,
const apr_array_header_t *changelist_filter,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_prop_set4(), but with a #svn_wc_adm_access_t /
* relative path parameter pair, no @a depth parameter, no changelist
* filtering (for the depth-based property setting), and no cancellation.
*
* @since New in 1.6.
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_prop_set3(const char *name,
const svn_string_t *value,
const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t skip_checks,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* Like svn_wc_prop_set3(), but without the notification callbacks.
*
* @since New in 1.2.
* @deprecated Provided for backwards compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_prop_set2(const char *name,
const svn_string_t *value,
const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t skip_checks,
apr_pool_t *pool);
/**
* Like svn_wc_prop_set2(), but with @a skip_checks always FALSE.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_prop_set(const char *name,
const svn_string_t *value,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/** Return TRUE iff @a name is a 'normal' property name. 'Normal' is
* defined as a user-visible and user-tweakable property that shows up
* when you fetch a proplist.
*
* The function currently parses the namespace like so:
*
* - 'svn:wc:' ==> a wcprop, stored/accessed separately via different API.
*
* - 'svn:entry:' ==> an "entry" prop, shunted into the 'entries' file.
*
* If these patterns aren't found, then the property is assumed to be
* Normal.
*/
svn_boolean_t
svn_wc_is_normal_prop(const char *name);
/** Return TRUE iff @a name is a 'wc' property name. */
svn_boolean_t
svn_wc_is_wc_prop(const char *name);
/** Return TRUE iff @a name is a 'entry' property name. */
svn_boolean_t
svn_wc_is_entry_prop(const char *name);
/** Callback type used by #svn_wc_canonicalize_svn_prop.
*
* If @a mime_type is non-null, it sets @a *mime_type to the value of
* #SVN_PROP_MIME_TYPE for the path passed to
* #svn_wc_canonicalize_svn_prop (allocated from @a pool). If @a
* stream is non-null, it writes the contents of the file to @a
* stream.
*
* (Currently, this is used if you are attempting to set the
* #SVN_PROP_EOL_STYLE property, to make sure that the value matches
* the mime type and contents.)
*
* @since New in 1.5.
*/
typedef svn_error_t *(*svn_wc_canonicalize_svn_prop_get_file_t)(
const svn_string_t **mime_type,
svn_stream_t *stream,
void *baton,
apr_pool_t *pool);
/** Canonicalize the value of an svn:* property @a propname with
* value @a propval.
*
* If the property is not appropriate for a node of kind @a kind, or
* is otherwise invalid, throw an error. Otherwise, set @a *propval_p
* to a canonicalized version of the property value.
*
* The exact set of canonicalizations and checks may vary across different
* versions of this API. Currently:
*
* - svn:executable
* - svn:needs-lock
* - svn:special
* - set the value to '*'
*
* - svn:keywords
* - strip leading and trailing white space
*
* - svn:ignore
* - svn:global-ignores
* - svn:auto-props
* - add a final a newline character if missing
*
* - svn:externals
* - add a final a newline character if missing
* - check for valid syntax
* - check for no duplicate entries
*
* - svn:mergeinfo
* - canonicalize
* - check for validity
*
* Also, unless @a skip_some_checks is TRUE:
*
* - svn:eol-style
* - strip leading and trailing white space
* - check value is recognized
* - check file content has a self-consistent EOL style
* (but not necessarily that it matches @a propval)
*
* - svn:mime-type
* - strip white space
* - check for reasonable syntax
*
* The EOL-style check (if not skipped) requires access to the contents and
* MIME type of the target if it is a file. It will call @a prop_getter with
* @a getter_baton. The callback must set the MIME type and/or write the
* contents of the file to the given stream. If @a skip_some_checks is true,
* then @a prop_getter is not used and may be NULL.
*
* @a path should be the path of the file in question; it is only used
* for error messages.
*
* ### The error code on validity check failure should be specified, and
* should be a single code or a very small set of possibilities.
*
* ### This is not actually related to the WC, but it does need to call
* ### svn_wc_parse_externals_description3.
*
* @since New in 1.5.
*/
svn_error_t *
svn_wc_canonicalize_svn_prop(const svn_string_t **propval_p,
const char *propname,
const svn_string_t *propval,
const char *path,
svn_node_kind_t kind,
svn_boolean_t skip_some_checks,
svn_wc_canonicalize_svn_prop_get_file_t prop_getter,
void *getter_baton,
apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_wc_diffs Diffs
* @{
*/
/**
* DEPRECATED -- please use APIs from svn_client.h
*
* ---
*
* Return an @a editor/@a edit_baton for diffing a working copy against the
* repository. The editor is allocated in @a result_pool; temporary
* calculations are performed in @a scratch_pool.
*
* This editor supports diffing either the actual files and properties in the
* working copy (when @a use_text_base is #FALSE), or the current pristine
* information (when @a use_text_base is #TRUE) against the editor driver.
*
* @a anchor_abspath/@a target represent the base of the hierarchy to be
* compared. The diff callback paths will be relative to this path.
*
* Diffs will be reported as valid relpaths, with @a anchor_abspath being
* the root ("").
*
* @a callbacks/@a callback_baton is the callback table to use.
*
* If @a depth is #svn_depth_empty, just diff exactly @a target or
* @a anchor_path if @a target is empty. If #svn_depth_files then do the same
* and for top-level file entries as well (if any). If
* #svn_depth_immediates, do the same as #svn_depth_files but also diff
* top-level subdirectories at #svn_depth_empty. If #svn_depth_infinity,
* then diff fully recursively.
*
* @a ignore_ancestry determines whether paths that have discontinuous node
* ancestry are treated as delete/add or as simple modifications. If
* @a ignore_ancestry is @c FALSE, then any discontinuous node ancestry will
* result in the diff given as a full delete followed by an add.
*
* @a show_copies_as_adds determines whether paths added with history will
* appear as a diff against their copy source, or whether such paths will
* appear as if they were newly added in their entirety.
* @a show_copies_as_adds implies not @a ignore_ancestry.
*
* If @a use_git_diff_format is TRUE, copied paths will be treated as added
* if they weren't modified after being copied. This allows the callbacks
* to generate appropriate --git diff headers for such files.
* @a use_git_diff_format implies @a show_copies_as_adds, and as such implies
* not @a ignore_ancestry.
*
* Normally, the difference from repository->working_copy is shown.
* If @a reverse_order is TRUE, then show working_copy->repository diffs.
*
* If @a cancel_func is non-NULL, it will be used along with @a cancel_baton
* to periodically check if the client has canceled the operation.
*
* @a changelist_filter is an array of <tt>const char *</tt> changelist
* names, used as a restrictive filter on items whose differences are
* reported; that is, don't generate diffs about any item unless
* it's a member of one of those changelists. If @a changelist_filter is
* empty (or altogether @c NULL), no changelist filtering occurs.
*
* If @a server_performs_filtering is TRUE, assume that the server handles
* the ambient depth filtering, so this doesn't have to be handled in the
* editor.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_diff_editor6(const svn_delta_editor_t **editor,
void **edit_baton,
svn_wc_context_t *wc_ctx,
const char *anchor_abspath,
const char *target,
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t show_copies_as_adds,
svn_boolean_t use_git_diff_format,
svn_boolean_t use_text_base,
svn_boolean_t reverse_order,
svn_boolean_t server_performs_filtering,
const apr_array_header_t *changelist_filter,
const svn_wc_diff_callbacks4_t *callbacks,
void *callback_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_get_diff_editor6(), but with an access baton and relative
* path. @a server_performs_filtering always true and with a
* #svn_wc_diff_callbacks3_t instead of #svn_wc_diff_callbacks4_t,
* @a show_copies_as_adds, and @a use_git_diff_format set to @c FALSE.
*
* Diffs will be reported as below the relative path stored in @a anchor.
*
* @since New in 1.6.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_diff_editor5(svn_wc_adm_access_t *anchor,
const char *target,
const svn_wc_diff_callbacks3_t *callbacks,
void *callback_baton,
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t use_text_base,
svn_boolean_t reverse_order,
svn_cancel_func_t cancel_func,
void *cancel_baton,
const apr_array_header_t *changelist_filter,
const svn_delta_editor_t **editor,
void **edit_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_get_diff_editor5(), but with an
* #svn_wc_diff_callbacks2_t instead of #svn_wc_diff_callbacks3_t.
*
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_diff_editor4(svn_wc_adm_access_t *anchor,
const char *target,
const svn_wc_diff_callbacks2_t *callbacks,
void *callback_baton,
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t use_text_base,
svn_boolean_t reverse_order,
svn_cancel_func_t cancel_func,
void *cancel_baton,
const apr_array_header_t *changelist_filter,
const svn_delta_editor_t **editor,
void **edit_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_get_diff_editor4(), but with @a changelist_filter
* passed as @c NULL, and @a depth set to #svn_depth_infinity if @a
* recurse is TRUE, or #svn_depth_files if @a recurse is FALSE.
*
* @deprecated Provided for backward compatibility with the 1.4 API.
* @since New in 1.2.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_diff_editor3(svn_wc_adm_access_t *anchor,
const char *target,
const svn_wc_diff_callbacks2_t *callbacks,
void *callback_baton,
svn_boolean_t recurse,
svn_boolean_t ignore_ancestry,
svn_boolean_t use_text_base,
svn_boolean_t reverse_order,
svn_cancel_func_t cancel_func,
void *cancel_baton,
const svn_delta_editor_t **editor,
void **edit_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_get_diff_editor3(), but with an
* #svn_wc_diff_callbacks_t instead of #svn_wc_diff_callbacks2_t.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_diff_editor2(svn_wc_adm_access_t *anchor,
const char *target,
const svn_wc_diff_callbacks_t *callbacks,
void *callback_baton,
svn_boolean_t recurse,
svn_boolean_t ignore_ancestry,
svn_boolean_t use_text_base,
svn_boolean_t reverse_order,
svn_cancel_func_t cancel_func,
void *cancel_baton,
const svn_delta_editor_t **editor,
void **edit_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_get_diff_editor2(), but with @a ignore_ancestry
* always set to @c FALSE.
*
* @deprecated Provided for backward compatibility with the 1.0 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_diff_editor(svn_wc_adm_access_t *anchor,
const char *target,
const svn_wc_diff_callbacks_t *callbacks,
void *callback_baton,
svn_boolean_t recurse,
svn_boolean_t use_text_base,
svn_boolean_t reverse_order,
svn_cancel_func_t cancel_func,
void *cancel_baton,
const svn_delta_editor_t **editor,
void **edit_baton,
apr_pool_t *pool);
/**
* Compare working copy against the text-base.
*
* @a target_abspath represents the base of the hierarchy to be compared.
*
* @a callbacks/@a callback_baton is the callback table to use when two
* files are to be compared.
*
* If @a depth is #svn_depth_empty, just diff exactly @a target_path.
* If #svn_depth_files then do the same
* and for top-level file entries as well (if any). If
* #svn_depth_immediates, do the same as #svn_depth_files but also diff
* top-level subdirectories at #svn_depth_empty. If #svn_depth_infinity,
* then diff fully recursively.
*
* @a ignore_ancestry determines whether paths that have discontinuous node
* ancestry are treated as delete/add or as simple modifications. If
* @a ignore_ancestry is @c FALSE, then any discontinuous node ancestry will
* result in the diff given as a full delete followed by an add.
*
* @a show_copies_as_adds determines whether paths added with history will
* appear as a diff against their copy source, or whether such paths will
* appear as if they were newly added in their entirety.
*
* If @a use_git_diff_format is TRUE, copied paths will be treated as added
* if they weren't modified after being copied. This allows the callbacks
* to generate appropriate --git diff headers for such files.
*
* @a changelist_filter is an array of <tt>const char *</tt> changelist
* names, used as a restrictive filter on items whose differences are
* reported; that is, don't generate diffs about any item unless
* it's a member of one of those changelists. If @a changelist_filter is
* empty (or altogether @c NULL), no changelist filtering occurs.
*
* If @a cancel_func is non-NULL, invoke it with @a cancel_baton at various
* points during the operation. If it returns an error (typically
* #SVN_ERR_CANCELLED), return that error immediately.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_diff6(svn_wc_context_t *wc_ctx,
const char *target_abspath,
const svn_wc_diff_callbacks4_t *callbacks,
void *callback_baton,
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t show_copies_as_adds,
svn_boolean_t use_git_diff_format,
const apr_array_header_t *changelist_filter,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_diff6(), but with a #svn_wc_diff_callbacks3_t argument
* instead of #svn_wc_diff_callbacks4_t, @a show_copies_as_adds,
* and @a use_git_diff_format set to * @c FALSE.
* It also doesn't allow specifying a cancel function.
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_diff5(svn_wc_adm_access_t *anchor,
const char *target,
const svn_wc_diff_callbacks3_t *callbacks,
void *callback_baton,
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
const apr_array_header_t *changelist_filter,
apr_pool_t *pool);
/**
* Similar to svn_wc_diff5(), but with a #svn_wc_diff_callbacks2_t argument
* instead of #svn_wc_diff_callbacks3_t.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.5 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_diff4(svn_wc_adm_access_t *anchor,
const char *target,
const svn_wc_diff_callbacks2_t *callbacks,
void *callback_baton,
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
const apr_array_header_t *changelist_filter,
apr_pool_t *pool);
/**
* Similar to svn_wc_diff4(), but with @a changelist_filter passed @c NULL,
* and @a depth set to #svn_depth_infinity if @a recurse is TRUE, or
* #svn_depth_files if @a recurse is FALSE.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_diff3(svn_wc_adm_access_t *anchor,
const char *target,
const svn_wc_diff_callbacks2_t *callbacks,
void *callback_baton,
svn_boolean_t recurse,
svn_boolean_t ignore_ancestry,
apr_pool_t *pool);
/**
* Similar to svn_wc_diff3(), but with a #svn_wc_diff_callbacks_t argument
* instead of #svn_wc_diff_callbacks2_t.
*
* @since New in 1.1.
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_diff2(svn_wc_adm_access_t *anchor,
const char *target,
const svn_wc_diff_callbacks_t *callbacks,
void *callback_baton,
svn_boolean_t recurse,
svn_boolean_t ignore_ancestry,
apr_pool_t *pool);
/**
* Similar to svn_wc_diff2(), but with @a ignore_ancestry always set
* to @c FALSE.
*
* @deprecated Provided for backward compatibility with the 1.0 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_diff(svn_wc_adm_access_t *anchor,
const char *target,
const svn_wc_diff_callbacks_t *callbacks,
void *callback_baton,
svn_boolean_t recurse,
apr_pool_t *pool);
/** Given a @a local_abspath to a file or directory under version control,
* discover any local changes made to properties and/or the set of 'pristine'
* properties. @a wc_ctx will be used to access the working copy.
*
* If @a propchanges is non-@c NULL, return these changes as an array of
* #svn_prop_t structures stored in @a *propchanges. The structures and
* array will be allocated in @a result_pool. If there are no local property
* modifications on @a local_abspath, then set @a *propchanges will be empty.
*
* If @a original_props is non-@c NULL, then set @a *original_props to
* hashtable (<tt>const char *name</tt> -> <tt>const svn_string_t *value</tt>)
* that represents the 'pristine' property list of @a path. This hashtable is
* allocated in @a result_pool.
*
* Use @a scratch_pool for temporary allocations.
*/
svn_error_t *
svn_wc_get_prop_diffs2(apr_array_header_t **propchanges,
apr_hash_t **original_props,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_get_prop_diffs2(), but with a #svn_wc_adm_access_t /
* relative path parameter pair.
*
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_prop_diffs(apr_array_header_t **propchanges,
apr_hash_t **original_props,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_wc_merging Merging
* @{
*/
/** The outcome of a merge carried out (or tried as a dry-run) by
* svn_wc_merge()
*/
typedef enum svn_wc_merge_outcome_t
{
/** The working copy is (or would be) unchanged. The changes to be
* merged were already present in the working copy
*/
svn_wc_merge_unchanged,
/** The working copy has been (or would be) changed. */
svn_wc_merge_merged,
/** The working copy has been (or would be) changed, but there was (or
* would be) a conflict
*/
svn_wc_merge_conflict,
/** No merge was performed, probably because the target file was
* either absent or not under version control.
*/
svn_wc_merge_no_merge
} svn_wc_merge_outcome_t;
/** Given absolute paths to three fulltexts, merge the differences between
* @a left_abspath and @a right_abspath into @a target_abspath.
* It may help to know that @a left_abspath, @a right_abspath and @a
* target_abspath correspond to "OLDER", "YOURS", and "MINE",
* respectively, in the diff3 documentation.
*
* @a wc_ctx should contain a write lock for the directory containing @a
* target_abspath.
*
* This function assumes that @a left_abspath and @a right_abspath are
* in repository-normal form (linefeeds, with keywords contracted); if
* necessary, @a target_abspath is temporarily converted to this form to
* receive the changes, then translated back again.
*
* If @a target_abspath is absent, or present but not under version
* control, then set @a *merge_content_outcome to #svn_wc_merge_no_merge and
* return success without merging anything. (The reasoning is that if
* the file is not versioned, then it is probably unrelated to the
* changes being considered, so they should not be merged into it.
* Furthermore, merging into an unversioned file is a lossy operation.)
*
* @a dry_run determines whether the working copy is modified. When it
* is @c FALSE the merge will cause @a target_abspath to be modified, when
* it is @c TRUE the merge will be carried out to determine the result but
* @a target_abspath will not be modified.
*
* If @a diff3_cmd is non-NULL, then use it as the diff3 command for
* any merging; otherwise, use the built-in merge code. If @a
* merge_options is non-NULL, either pass its elements to @a diff3_cmd or
* parse it and use as options to the internal merge code (see
* svn_diff_file_options_parse()). @a merge_options must contain
* <tt>const char *</tt> elements.
*
* If @a merge_props_state is non-NULL, merge @a prop_diff into the
* working properties before merging the text. (If @a merge_props_state
* is NULL, do not merge any property changes; in this case, @a prop_diff
* is only used to help determine the text merge result.) Handle any
* conflicts as described for svn_wc_merge_props3(), with the parameters
* @a dry_run, @a conflict_func and @a conflict_baton. Return the
* outcome of the property merge in @a *merge_props_state.
*
* The outcome of the text merge is returned in @a *merge_content_outcome. If
* there is a conflict and @a dry_run is @c FALSE, then attempt to call @a
* conflict_func with @a conflict_baton (if non-NULL). If the
* conflict callback cannot resolve the conflict, then:
*
* * Put conflict markers around the conflicting regions in
* @a target_abspath, labeled with @a left_label, @a right_label, and
* @a target_label. (If any of these labels are @c NULL, default
* values will be used.)
*
* * Copy @a left_abspath, @a right_abspath, and the original @a
* target_abspath to unique names in the same directory as @a
* target_abspath, ending with the suffixes ".LEFT_LABEL", ".RIGHT_LABEL",
* and ".TARGET_LABEL" respectively.
*
* * Mark @a target_abspath as "text-conflicted", and track the above
* mentioned backup files as well.
*
* * If @a left_version and/or @a right_version are not NULL, provide
* these values to the conflict handler and track these while the conflict
* exists.
*
* Binary case:
*
* If @a target_abspath is a binary file, then no merging is attempted,
* the merge is deemed to be a conflict. If @a dry_run is @c FALSE the
* working @a target_abspath is untouched, and copies of @a left_abspath and
* @a right_abspath are created next to it using @a left_label and
* @a right_label. @a target_abspath is marked as "text-conflicted", and
* begins tracking the two backup files and the version information.
*
* If @a dry_run is @c TRUE no files are changed. The outcome of the merge
* is returned in @a *merge_content_outcome.
* ### (and what about @a *merge_props_state?)
*
* ### BH: Two kinds of outcome is not how it should be.
*
* ### For text, we report the outcome as 'merged' if there was some
* incoming change that we dealt with (even if we decided to no-op?)
* but the callers then convert this outcome into a notification
* of 'merged' only if there was already a local modification;
* otherwise they notify it as simply 'updated'. But for props
* we report a notify state of 'merged' here if there was an
* incoming change regardless of the local-mod state. Inconsistent.
*
* Use @a scratch_pool for any temporary allocation.
*
* @since New in 1.8.
*/
svn_error_t *
svn_wc_merge5(enum svn_wc_merge_outcome_t *merge_content_outcome,
enum svn_wc_notify_state_t *merge_props_state,
svn_wc_context_t *wc_ctx,
const char *left_abspath,
const char *right_abspath,
const char *target_abspath,
const char *left_label,
const char *right_label,
const char *target_label,
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t dry_run,
const char *diff3_cmd,
const apr_array_header_t *merge_options,
apr_hash_t *original_props,
const apr_array_header_t *prop_diff,
svn_wc_conflict_resolver_func2_t conflict_func,
void *conflict_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_merge5() but with @a merge_props_state and @a
* original_props always passed as NULL.
*
* Unlike svn_wc_merge5(), this function doesn't merge property
* changes. Callers of this function must first use
* svn_wc_merge_props3() to get this functionality.
*
* @since New in 1.7.
* @deprecated Provided for backwards compatibility with the 1.7 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_merge4(enum svn_wc_merge_outcome_t *merge_outcome,
svn_wc_context_t *wc_ctx,
const char *left_abspath,
const char *right_abspath,
const char *target_abspath,
const char *left_label,
const char *right_label,
const char *target_label,
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t dry_run,
const char *diff3_cmd,
const apr_array_header_t *merge_options,
const apr_array_header_t *prop_diff,
svn_wc_conflict_resolver_func2_t conflict_func,
void *conflict_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_merge4() but takes relative paths and an access
* baton. It doesn't support a cancel function or tracking origin version
* information.
*
* Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
* svn_wc_conflict_resolver_func2_t.
*
* This function assumes that @a diff3_cmd is path encoded. Later versions
* assume utf-8.
*
* @since New in 1.5.
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_merge3(enum svn_wc_merge_outcome_t *merge_outcome,
const char *left,
const char *right,
const char *merge_target,
svn_wc_adm_access_t *adm_access,
const char *left_label,
const char *right_label,
const char *target_label,
svn_boolean_t dry_run,
const char *diff3_cmd,
const apr_array_header_t *merge_options,
const apr_array_header_t *prop_diff,
svn_wc_conflict_resolver_func_t conflict_func,
void *conflict_baton,
apr_pool_t *pool);
/** Similar to svn_wc_merge3(), but with @a prop_diff, @a
* conflict_func, @a conflict_baton set to NULL.
*
* @deprecated Provided for backwards compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_merge2(enum svn_wc_merge_outcome_t *merge_outcome,
const char *left,
const char *right,
const char *merge_target,
svn_wc_adm_access_t *adm_access,
const char *left_label,
const char *right_label,
const char *target_label,
svn_boolean_t dry_run,
const char *diff3_cmd,
const apr_array_header_t *merge_options,
apr_pool_t *pool);
/** Similar to svn_wc_merge2(), but with @a merge_options set to NULL.
*
* @deprecated Provided for backwards compatibility with the 1.3 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_merge(const char *left,
const char *right,
const char *merge_target,
svn_wc_adm_access_t *adm_access,
const char *left_label,
const char *right_label,
const char *target_label,
svn_boolean_t dry_run,
enum svn_wc_merge_outcome_t *merge_outcome,
const char *diff3_cmd,
apr_pool_t *pool);
/** Given a @a local_abspath under version control, merge an array of @a
* propchanges into the path's existing properties. @a propchanges is
* an array of #svn_prop_t objects, and @a baseprops is a hash
* representing the original set of properties that @a propchanges is
* working against. @a wc_ctx contains a lock for @a local_abspath.
*
* Only the working properties will be changed.
*
* If @a state is non-NULL, set @a *state to the state of the properties
* after the merge.
*
* If a conflict is found when merging a property, and @a dry_run is
* false and @a conflict_func is not null, then call @a conflict_func
* with @a conflict_baton and a description of the conflict. If any
* conflicts are not resolved by such callbacks, describe the unresolved
* conflicts in a temporary .prej file (or append to an already-existing
* .prej file) and mark the path as conflicted in the WC DB.
*
* If @a cancel_func is non-NULL, invoke it with @a cancel_baton at various
* points during the operation. If it returns an error (typically
* #SVN_ERR_CANCELLED), return that error immediately.
*
* If @a local_abspath is not under version control, return the error
* #SVN_ERR_WC_PATH_NOT_FOUND and don't touch anyone's properties.
*
* If @a local_abspath has a status in which it doesn't have properties
* (E.g. deleted) return the error SVN_ERR_WC_PATH_UNEXPECTED_STATUS.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_merge_props3(svn_wc_notify_state_t *state,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
apr_hash_t *baseprops,
const apr_array_header_t *propchanges,
svn_boolean_t dry_run,
svn_wc_conflict_resolver_func2_t conflict_func,
void *conflict_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_merge_props3, but takes an access baton and relative
* path, no cancel_function, and no left and right version.
*
* This function has the @a base_merge parameter which (when TRUE) will
* apply @a propchanges to this node's pristine set of properties. This
* functionality is not supported since API version 1.7 and will give an
* error if requested (unless @a dry_run is TRUE). For details see
* 'notes/api-errata/1.7/wc006.txt'.
*
* Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
* svn_wc_conflict_resolver_func2_t.
*
* For compatibility reasons this function returns
* #SVN_ERR_UNVERSIONED_RESOURCE, when svn_wc_merge_props3 would return either
* #SVN_ERR_WC_PATH_NOT_FOUND or #SVN_ERR_WC_PATH_UNEXPECTED_STATUS.
*
* @since New in 1.5. The base_merge option is not supported since 1.7.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_merge_props2(svn_wc_notify_state_t *state,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_hash_t *baseprops,
const apr_array_header_t *propchanges,
svn_boolean_t base_merge,
svn_boolean_t dry_run,
svn_wc_conflict_resolver_func_t conflict_func,
void *conflict_baton,
apr_pool_t *pool);
/**
* Same as svn_wc_merge_props2(), but with a @a conflict_func (and
* baton) of NULL.
*
* @since New in 1.3. The base_merge option is not supported since 1.7.
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_merge_props(svn_wc_notify_state_t *state,
const char *path,
svn_wc_adm_access_t *adm_access,
apr_hash_t *baseprops,
const apr_array_header_t *propchanges,
svn_boolean_t base_merge,
svn_boolean_t dry_run,
apr_pool_t *pool);
/**
* Similar to svn_wc_merge_props(), but no baseprops are given.
* Instead, it's assumed that the incoming propchanges are based
* against the working copy's own baseprops. While this assumption is
* correct for 'svn update', it's incorrect for 'svn merge', and can
* cause flawed behavior. (See issue #2035.)
*
* @since The base_merge option is not supported since 1.7.
* @deprecated Provided for backward compatibility with the 1.2 API.
* Replaced by svn_wc_merge_props().
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_merge_prop_diffs(svn_wc_notify_state_t *state,
const char *path,
svn_wc_adm_access_t *adm_access,
const apr_array_header_t *propchanges,
svn_boolean_t base_merge,
svn_boolean_t dry_run,
apr_pool_t *pool);
/** @} */
/** Given a @a path to a wc file, return in @a *contents a readonly stream to
* the pristine contents of the file that would serve as base content for the
* next commit. That means:
*
* When there is no change in node history scheduled, i.e. when there are only
* local text-mods, prop-mods or a delete, return the last checked-out or
* updated-/switched-to contents of the file.
*
* If the file is simply added or replaced (no copy-/move-here involved),
* set @a *contents to @c NULL.
*
* When the file has been locally copied-/moved-here, return the contents of
* the copy/move source (even if the copy-/move-here replaces a locally
* deleted file).
*
* If @a local_abspath refers to an unversioned or non-existing path, return
* @c SVN_ERR_WC_PATH_NOT_FOUND. Use @a wc_ctx to access the working copy.
* @a contents may not be @c NULL (unlike @a *contents).
*
* @since New in 1.7. */
svn_error_t *
svn_wc_get_pristine_contents2(svn_stream_t **contents,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_get_pristine_contents2, but takes no working copy
* context and a path that can be relative
*
* @since New in 1.6.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_pristine_contents(svn_stream_t **contents,
const char *path,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Set @a *pristine_path to the path of the "normal" pristine text file for
* the versioned file @a path.
*
* If @a path does not have a pristine text, set @a *pristine_path to a path where
* nothing exists on disk (in a directory that does exist).
*
* @note: Before version 1.7, the behaviour in that case was to provide the
* path where the pristine text *would be* if it were present. The new
* behaviour is intended to provide backward compatibility for callers that
* open or test the provided path immediately, and not for callers that
* store the path for later use.
*
* @deprecated Provided for backwards compatibility with the 1.5 API.
* Callers should use svn_wc_get_pristine_contents() instead.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_pristine_copy_path(const char *path,
const char **pristine_path,
apr_pool_t *pool);
/**
* Recurse from @a local_abspath, cleaning up unfinished log business. Perform
* any temporary allocations in @a scratch_pool. Any working copy locks under
* @a local_abspath will be taken over and then cleared by this function.
*
* WARNING: there is no mechanism that will protect locks that are still being
* used.
*
* If @a cancel_func is non-NULL, invoke it with @a cancel_baton at various
* points during the operation. If it returns an error (typically
* #SVN_ERR_CANCELLED), return that error immediately.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_cleanup3(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_cleanup3() but uses relative paths and creates its own
* #svn_wc_context_t.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_cleanup2(const char *path,
const char *diff3_cmd,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_cleanup2(). @a optional_adm_access is an historic
* relic and not used, it may be NULL.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_cleanup(const char *path,
svn_wc_adm_access_t *optional_adm_access,
const char *diff3_cmd,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/** Callback for retrieving a repository root for a url from upgrade.
*
* Called by svn_wc_upgrade() when no repository root and/or repository
* uuid are recorded in the working copy. For normal Subversion 1.5 and
* later working copies, this callback will not be used.
*
* @since New in 1.7.
*/
typedef svn_error_t * (*svn_wc_upgrade_get_repos_info_t)(
const char **repos_root,
const char **repos_uuid,
void *baton,
const char *url,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Upgrade the working copy at @a local_abspath to the latest metadata
* storage format. @a local_abspath should be an absolute path to the
* root of the working copy.
*
* If @a cancel_func is non-NULL, invoke it with @a cancel_baton at
* various points during the operation. If it returns an error
* (typically #SVN_ERR_CANCELLED), return that error immediately.
*
* For each directory converted, @a notify_func will be called with
* in @a notify_baton action #svn_wc_notify_upgraded_path and as path
* the path of the upgraded directory. @a notify_func may be @c NULL
* if this notification is not needed.
*
* If the old working copy doesn't contain a repository root and/or
* repository uuid, @a repos_info_func (if non-NULL) will be called
* with @a repos_info_baton to provide the missing information.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_upgrade(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_wc_upgrade_get_repos_info_t repos_info_func,
void *repos_info_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/** Relocation validation callback typedef.
*
* Called for each relocated file/directory. @a uuid, if non-NULL, contains
* the expected repository UUID, @a url contains the tentative URL.
*
* @a baton is a closure object; it should be provided by the
* implementation, and passed by the caller.
*
* If @a root_url is passed, then the implementation should make sure that
* @a url is the repository root.
* @a pool may be used for temporary allocations.
*
* @since New in 1.5.
*/
typedef svn_error_t *(*svn_wc_relocation_validator3_t)(void *baton,
const char *uuid,
const char *url,
const char *root_url,
apr_pool_t *pool);
/** Similar to #svn_wc_relocation_validator3_t, but with
* the @a root argument.
*
* If @a root is TRUE, then the implementation should make sure that @a url
* is the repository root. Else, it can be a URL inside the repository.
*
* @deprecated Provided for backwards compatibility with the 1.4 API.
*/
typedef svn_error_t *(*svn_wc_relocation_validator2_t)(void *baton,
const char *uuid,
const char *url,
svn_boolean_t root,
apr_pool_t *pool);
/** Similar to #svn_wc_relocation_validator2_t, but without
* the @a root and @a pool arguments. @a uuid will not be NULL in this version
* of the function.
*
* @deprecated Provided for backwards compatibility with the 1.3 API.
*/
typedef svn_error_t *(*svn_wc_relocation_validator_t)(void *baton,
const char *uuid,
const char *url);
/** Recursively change repository references at @a wcroot_abspath
* (which is the root directory of a working copy). The pre-change
* URL should begin with @a from, and the post-change URL will begin
* with @a to. @a validator (and its baton, @a validator_baton), will
* be called for the newly generated base URL and calculated repo
* root.
*
* @a wc_ctx is an working copy context.
*
* @a scratch_pool will be used for temporary allocations.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_relocate4(svn_wc_context_t *wc_ctx,
const char *wcroot_abspath,
const char *from,
const char *to,
svn_wc_relocation_validator3_t validator,
void *validator_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_relocate4(), but with a #svn_wc_adm_access_t /
* relative path parameter pair.
*
* @note As of the 1.7 API, @a path is required to be a working copy
* root directory, and @a recurse is required to be TRUE.
*
* @since New in 1.5.
* @deprecated Provided for limited backwards compatibility with the
* 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_relocate3(const char *path,
svn_wc_adm_access_t *adm_access,
const char *from,
const char *to,
svn_boolean_t recurse,
svn_wc_relocation_validator3_t validator,
void *validator_baton,
apr_pool_t *pool);
/** Similar to svn_wc_relocate3(), but uses #svn_wc_relocation_validator2_t.
*
* @since New in 1.4.
* @deprecated Provided for backwards compatibility with the 1.4 API. */
SVN_DEPRECATED
svn_error_t *
svn_wc_relocate2(const char *path,
svn_wc_adm_access_t *adm_access,
const char *from,
const char *to,
svn_boolean_t recurse,
svn_wc_relocation_validator2_t validator,
void *validator_baton,
apr_pool_t *pool);
/** Similar to svn_wc_relocate2(), but uses #svn_wc_relocation_validator_t.
*
* @deprecated Provided for backwards compatibility with the 1.3 API. */
SVN_DEPRECATED
svn_error_t *
svn_wc_relocate(const char *path,
svn_wc_adm_access_t *adm_access,
const char *from,
const char *to,
svn_boolean_t recurse,
svn_wc_relocation_validator_t validator,
void *validator_baton,
apr_pool_t *pool);
/**
* Revert changes to @a local_abspath. Perform necessary allocations in
* @a scratch_pool.
*
* @a wc_ctx contains the necessary locks required for performing the
* operation.
*
* If @a depth is #svn_depth_empty, revert just @a path (if a
* directory, then revert just the properties on that directory).
* Else if #svn_depth_files, revert @a path and any files
* directly under @a path if it is directory. Else if
* #svn_depth_immediates, revert all of the preceding plus
* properties on immediate subdirectories; else if #svn_depth_infinity,
* revert path and everything under it fully recursively.
*
* @a changelist_filter is an array of <tt>const char *</tt> changelist
* names, used as a restrictive filter on items reverted; that is,
* don't revert any item unless it's a member of one of those
* changelists. If @a changelist_filter is empty (or altogether @c NULL),
* no changelist filtering occurs.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the reversion process. If it returns an
* error (typically #SVN_ERR_CANCELLED), return that error
* immediately.
*
* If @a use_commit_times is TRUE, then all reverted working-files
* will have their timestamp set to the last-committed-time. If
* FALSE, the reverted working-files will be touched with the 'now' time.
*
* For each item reverted, @a notify_func will be called with @a notify_baton
* and the path of the reverted item. @a notify_func may be @c NULL if this
* notification is not needed.
*
* If @a path is not under version control, return the error
* #SVN_ERR_UNVERSIONED_RESOURCE.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_revert4(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
svn_boolean_t use_commit_times,
const apr_array_header_t *changelist_filter,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_revert4() but takes a relative path and access baton.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_revert3(const char *path,
svn_wc_adm_access_t *parent_access,
svn_depth_t depth,
svn_boolean_t use_commit_times,
const apr_array_header_t *changelist_filter,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_revert3(), but with @a changelist_filter passed as @c
* NULL, and @a depth set according to @a recursive: if @a recursive
* is TRUE, @a depth is #svn_depth_infinity; if FALSE, @a depth is
* #svn_depth_empty.
*
* @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files;
* revert is deliberately different.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_revert2(const char *path,
svn_wc_adm_access_t *parent_access,
svn_boolean_t recursive,
svn_boolean_t use_commit_times,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* Similar to svn_wc_revert2(), but takes an #svn_wc_notify_func_t instead.
*
* @deprecated Provided for backward compatibility with the 1.1 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_revert(const char *path,
svn_wc_adm_access_t *parent_access,
svn_boolean_t recursive,
svn_boolean_t use_commit_times,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* Restores a missing node, @a local_abspath using the @a wc_ctx. Records
* the new last modified time of the file for status processing.
*
* If @a use_commit_times is TRUE, then set restored files' timestamps
* to their last-commit-times.
*
* Returns SVN_ERROR_WC_PATH_NOT_FOUND if LOCAL_ABSPATH is not versioned and
* SVN_ERROR_WC_PATH_UNEXPECTED_STATUS if LOCAL_ABSPATH is in a status where
* it can't be restored.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_restore(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t use_commit_times,
apr_pool_t *scratch_pool);
/* Tmp files */
/** Create a unique temporary file in administrative tmp/ area of
* directory @a path. Return a handle in @a *fp and the path
* in @a *new_name. Either @a fp or @a new_name can be NULL.
*
* The flags will be <tt>APR_WRITE | APR_CREATE | APR_EXCL</tt> and
* optionally @c APR_DELONCLOSE (if the @a delete_when argument is
* set to #svn_io_file_del_on_close).
*
* This means that as soon as @a fp is closed, the tmp file will vanish.
*
* @since New in 1.4
* @deprecated For compatibility with 1.6 API
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_create_tmp_file2(apr_file_t **fp,
const char **new_name,
const char *path,
svn_io_file_del_t delete_when,
apr_pool_t *pool);
/** Same as svn_wc_create_tmp_file2(), but with @a new_name set to @c NULL,
* and without the ability to delete the file on pool cleanup.
*
* @deprecated For compatibility with 1.3 API
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_create_tmp_file(apr_file_t **fp,
const char *path,
svn_boolean_t delete_on_close,
apr_pool_t *pool);
/**
* @defgroup svn_wc_translate EOL conversion and keyword expansion
* @{
*/
/** Set @a xlated_path to a translated copy of @a src
* or to @a src itself if no translation is necessary.
* That is, if @a versioned_file's properties indicate newline conversion or
* keyword expansion, point @a *xlated_path to a copy of @a src
* whose newlines and keywords are converted using the translation
* as requested by @a flags.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
* if the client has canceled the operation.
*
* When translating to the normal form, inconsistent eol styles will be
* repaired when appropriate for the given setting. When translating
* from normal form, no EOL repair is performed (consistency is assumed).
* This behaviour can be overridden by specifying
* #SVN_WC_TRANSLATE_FORCE_EOL_REPAIR.
*
* The caller can explicitly request a new file to be returned by setting the
* #SVN_WC_TRANSLATE_FORCE_COPY flag in @a flags.
*
* This function is generally used to get a file that can be compared
* meaningfully against @a versioned_file's text base, if
* @c SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_file itself
* if @c SVN_WC_TRANSLATE_FROM_NF is specified.
*
* If a new output file is created, it is created in the temp file area
* belonging to @a versioned_file. By default it will be deleted at pool
* cleanup. If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the
* default pool cleanup handler to remove @a *xlated_path is not registered.
* If the input file is returned as the output, its lifetime is not
* specified.
*
* If an error is returned, the effect on @a *xlated_path is undefined.
*
* @since New in 1.4
* @deprecated Provided for compatibility with the 1.6 API
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_translated_file2(const char **xlated_path,
const char *src,
const char *versioned_file,
svn_wc_adm_access_t *adm_access,
apr_uint32_t flags,
apr_pool_t *pool);
/** Same as svn_wc_translated_file2, but will never clean up
* temporary files.
*
* @deprecated Provided for compatibility with the 1.3 API
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_translated_file(const char **xlated_p,
const char *vfile,
svn_wc_adm_access_t *adm_access,
svn_boolean_t force_repair,
apr_pool_t *pool);
/** Returns a @a stream allocated in @a pool with access to the given
* @a path taking the file properties from @a versioned_file using
* @a adm_access.
*
* If @a flags includes #SVN_WC_TRANSLATE_FROM_NF, the stream will
* translate from Normal Form to working copy form while writing to
* @a path; stream read operations are not supported.
* Conversely, if @a flags includes #SVN_WC_TRANSLATE_TO_NF, the stream will
* translate from working copy form to Normal Form while reading from
* @a path; stream write operations are not supported.
*
* The @a flags are the same constants as those used for
* svn_wc_translated_file2().
*
* @since New in 1.5.
* @deprecated Provided for compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_translated_stream(svn_stream_t **stream,
const char *path,
const char *versioned_file,
svn_wc_adm_access_t *adm_access,
apr_uint32_t flags,
apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_wc_deltas Text/Prop Deltas Using an Editor
* @{
*/
/** Send the local modifications for versioned file @a local_abspath (with
* matching @a file_baton) through @a editor, then close @a file_baton
* afterwards. Use @a scratch_pool for any temporary allocation.
*
* If @a new_text_base_md5_checksum is non-NULL, set
* @a *new_text_base_md5_checksum to the MD5 checksum of (@a local_abspath
* translated to repository-normal form), allocated in @a result_pool.
*
* If @a new_text_base_sha1_checksum in non-NULL, store a copy of (@a
* local_abspath translated to repository-normal form) in the pristine text
* store, and set @a *new_text_base_sha1_checksum to its SHA-1 checksum.
*
* If @a fulltext, send the untranslated copy of @a local_abspath through
* @a editor as full-text; else send it as svndiff against the current text
* base.
*
* If sending a diff, and the recorded checksum for @a local_abspath's
* text-base does not match the current actual checksum, then remove the tmp
* copy (and set @a *tempfile to NULL if appropriate), and return the
* error #SVN_ERR_WC_CORRUPT_TEXT_BASE.
*
* @note This is intended for use with both infix and postfix
* text-delta styled editor drivers.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_transmit_text_deltas3(const svn_checksum_t **new_text_base_md5_checksum,
const svn_checksum_t **new_text_base_sha1_checksum,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t fulltext,
const svn_delta_editor_t *editor,
void *file_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_transmit_text_deltas3(), but with a relative path
* and adm_access baton, and the checksum output is an MD5 digest instead of
* two svn_checksum_t objects.
*
* If @a tempfile is non-NULL, make a copy of @a path with keywords
* and eol translated to repository-normal form, and set @a *tempfile to the
* absolute path to this copy, allocated in @a result_pool. The copy will
* be in the temporary-text-base directory. Do not clean up the copy;
* caller can do that. (The purpose of handing back the tmp copy is that it
* is usually about to become the new text base anyway, but the installation
* of the new text base is outside the scope of this function.)
*
* @since New in 1.4.
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_transmit_text_deltas2(const char **tempfile,
unsigned char digest[],
const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t fulltext,
const svn_delta_editor_t *editor,
void *file_baton,
apr_pool_t *pool);
/** Similar to svn_wc_transmit_text_deltas2(), but with @a digest set to NULL.
*
* @deprecated Provided for backwards compatibility with the 1.3 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_transmit_text_deltas(const char *path,
svn_wc_adm_access_t *adm_access,
svn_boolean_t fulltext,
const svn_delta_editor_t *editor,
void *file_baton,
const char **tempfile,
apr_pool_t *pool);
/** Given a @a local_abspath, transmit all local property
* modifications using the appropriate @a editor method (in conjunction
* with @a baton). Use @a scratch_pool for any temporary allocation.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_transmit_prop_deltas2(svn_wc_context_t *wc_ctx,
const char *local_abspath,
const svn_delta_editor_t *editor,
void *baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_transmit_prop_deltas2(), but with a relative path,
* adm_access baton and tempfile.
*
* If a temporary file remains after this function is finished, the
* path to that file is returned in @a *tempfile (so the caller can
* clean this up if it wishes to do so).
*
* @note Starting version 1.5, no tempfile will ever be returned
* anymore. If @a *tempfile is passed, its value is set to @c NULL.
*
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_transmit_prop_deltas(const char *path,
svn_wc_adm_access_t *adm_access,
const svn_wc_entry_t *entry,
const svn_delta_editor_t *editor,
void *baton,
const char **tempfile,
apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_wc_ignore Ignoring unversioned files and directories
* @{
*/
/** Get the run-time configured list of ignore patterns from the
* #svn_config_t's in the @a config hash, and store them in @a *patterns.
* Allocate @a *patterns and its contents in @a pool.
*/
svn_error_t *
svn_wc_get_default_ignores(apr_array_header_t **patterns,
apr_hash_t *config,
apr_pool_t *pool);
/** Get the list of ignore patterns from the #svn_config_t's in the
* @a config hash and the local ignore patterns from the directory
* at @a local_abspath, using @a wc_ctx, and store them in @a *patterns.
* Allocate @a *patterns and its contents in @a result_pool, use @a
* scratch_pool for temporary allocations.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_get_ignores2(apr_array_header_t **patterns,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_hash_t *config,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_get_ignores2(), but with a #svn_wc_adm_access_t
* parameter in place of #svn_wc_context_t and @c local_abspath parameters.
*
* @since New in 1.3.
* @deprecated Provided for backwards compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_get_ignores(apr_array_header_t **patterns,
apr_hash_t *config,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/** Return TRUE iff @a str matches any of the elements of @a list, a
* list of zero or more ignore patterns.
*
* @since New in 1.5.
*/
svn_boolean_t
svn_wc_match_ignore_list(const char *str,
const apr_array_header_t *list,
apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_wc_repos_locks Repository locks
* @{
*/
/** Add @a lock to the working copy for @a local_abspath. If @a
* local_abspath is read-only, due to locking properties, make it writable.
* Perform temporary allocations in @a scratch_pool.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_add_lock2(svn_wc_context_t *wc_ctx,
const char *abspath,
const svn_lock_t *lock,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_add_lock2(), but with a #svn_wc_adm_access_t /
* relative path parameter pair.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
* @since New in 1.2.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_add_lock(const char *path,
const svn_lock_t *lock,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/** Remove any lock from @a local_abspath. If @a local_abspath has a
* lock and the locking so specifies, make the file read-only. Don't
* return an error if @a local_abspath didn't have a lock. Perform temporary
* allocations in @a scratch_pool.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_remove_lock2(svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_remove_lock2(), but with a #svn_wc_adm_access_t /
* relative path parameter pair.
*
* @deprecated Provided for backward compatibility with the 1.6 API.
* @since New in 1.2.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_remove_lock(const char *path,
svn_wc_adm_access_t *adm_access,
apr_pool_t *pool);
/** @} */
/** A structure to report a summary of a working copy, including the
* mix of revisions found within it, whether any parts are switched or
* locally modified, and whether it is a sparse checkout.
*
* @note Fields may be added to the end of this structure in future
* versions. Therefore, to preserve binary compatibility, users
* should not directly allocate structures of this type.
*
* @since New in 1.4
*/
typedef struct svn_wc_revision_status_t
{
svn_revnum_t min_rev; /**< Lowest revision found */
svn_revnum_t max_rev; /**< Highest revision found */
svn_boolean_t switched; /**< Is anything switched? */
svn_boolean_t modified; /**< Is anything modified? */
/** Whether any WC paths are at a depth other than #svn_depth_infinity.
* @since New in 1.5.
*/
svn_boolean_t sparse_checkout;
} svn_wc_revision_status_t;
/** Set @a *result_p to point to a new #svn_wc_revision_status_t structure
* containing a summary of the revision range and status of the working copy
* at @a local_abspath (not including "externals"). @a local_abspath must
* be absolute. Return SVN_ERR_WC_PATH_NOT_FOUND if @a local_abspath is not
* a working copy path.
*
* Set @a (*result_p)->min_rev and @a (*result_p)->max_rev respectively to the
* lowest and highest revision numbers in the working copy. If @a committed
* is TRUE, summarize the last-changed revisions, else the base revisions.
*
* Set @a (*result_p)->switched to indicate whether any item in the WC is
* switched relative to its parent. If @a trail_url is non-NULL, use it to
* determine if @a local_abspath itself is switched. It should be any trailing
* portion of @a local_abspath's expected URL, long enough to include any parts
* that the caller considers might be changed by a switch. If it does not
* match the end of @a local_abspath's actual URL, then report a "switched"
* status.
*
* Set @a (*result_p)->modified to indicate whether any item is locally
* modified.
*
* If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
* if the client has canceled the operation.
*
* Allocate *result_p in @a result_pool, use @a scratch_pool for temporary
* allocations.
*
* @a wc_ctx should be a valid working copy context.
*
* @since New in 1.7
*/
svn_error_t *
svn_wc_revision_status2(svn_wc_revision_status_t **result_p,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
const char *trail_url,
svn_boolean_t committed,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_revision_status2(), but with a (possibly) local
* path and no wc_ctx parameter.
*
* @since New in 1.4.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_revision_status(svn_wc_revision_status_t **result_p,
const char *wc_path,
const char *trail_url,
svn_boolean_t committed,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/**
* Set @a local_abspath's 'changelist' attribute to @a changelist iff
* @a changelist is not @c NULL; otherwise, remove any current
* changelist assignment from @a local_abspath. @a changelist may not
* be the empty string. Recurse to @a depth.
*
* @a changelist_filter is an array of <tt>const char *</tt> changelist
* names, used as a restrictive filter on items whose changelist
* assignments are adjusted; that is, don't tweak the changeset of any
* item unless it's currently a member of one of those changelists.
* If @a changelist_filter is empty (or altogether @c NULL), no changelist
* filtering occurs.
*
* If @a cancel_func is not @c NULL, call it with @a cancel_baton to
* determine if the client has canceled the operation.
*
* If @a notify_func is not @c NULL, call it with @a notify_baton to
* report the change (using notification types
* #svn_wc_notify_changelist_set and #svn_wc_notify_changelist_clear).
*
* Use @a scratch_pool for temporary allocations.
*
* @note For now, directories are NOT allowed to be associated with
* changelists; there is confusion about whether they should behave
* as depth-0 or depth-infinity objects. If @a local_abspath is a directory,
* return an error.
*
* @note This metadata is purely a client-side "bookkeeping"
* convenience, and is entirely managed by the working copy.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_set_changelist2(svn_wc_context_t *wc_ctx,
const char *local_abspath,
const char *changelist,
svn_depth_t depth,
const apr_array_header_t *changelist_filter,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_set_changelist2(), but with an access baton and
* relative path.
*
* @since New in 1.5.
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_set_changelist(const char *path,
const char *changelist,
svn_wc_adm_access_t *adm_access,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *pool);
/**
* The callback type used by svn_wc_get_changelists() and
* svn_client_get_changelists().
*
* On each invocation, @a path is a newly discovered member of the
* changelist, and @a baton is a private function closure.
*
* @since New in 1.5.
*/
typedef svn_error_t *(*svn_changelist_receiver_t) (void *baton,
const char *path,
const char *changelist,
apr_pool_t *pool);
/**
* ### TODO: Doc string, please.
*
* @since New in 1.7.
*/
svn_error_t *
svn_wc_get_changelists(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
const apr_array_header_t *changelist_filter,
svn_changelist_receiver_t callback_func,
void *callback_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/** Crop @a local_abspath according to @a depth.
*
* Remove any item that exceeds the boundary of @a depth (relative to
* @a local_abspath) from revision control. Leave modified items behind
* (unversioned), while removing unmodified ones completely.
*
* @a depth can be svn_depth_empty, svn_depth_files or svn_depth_immediates.
* Excluding nodes is handled by svn_wc_exclude().
*
* If @a local_abspath starts out with a shallower depth than @a depth,
* do not upgrade it to @a depth (that would not be cropping); however, do
* check children and crop them appropriately according to @a depth.
*
* Returns immediately with an #SVN_ERR_UNSUPPORTED_FEATURE error if @a
* local_abspath is not a directory, or if @a depth is not restrictive
* (e.g., #svn_depth_infinity).
*
* @a wc_ctx contains a tree lock, for the local path to the working copy
* which will be used as the root of this operation.
*
* If @a cancel_func is not @c NULL, call it with @a cancel_baton at
* various points to determine if the client has canceled the operation.
*
* If @a notify_func is not @c NULL, call it with @a notify_baton to
* report changes as they are made.
*
* @since New in 1.7
*/
svn_error_t *
svn_wc_crop_tree2(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_crop_tree2(), but uses an access baton and target.
*
* svn_wc_crop_tree() also allows #svn_depth_exclude, which is now
* handled via svn_wc_exclude()
*
* @a target is a basename in @a anchor or "" for @a anchor itself.
*
* @since New in 1.6
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_crop_tree(svn_wc_adm_access_t *anchor,
const char *target,
svn_depth_t depth,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/** Remove the local node for @a local_abspath from the working copy and
* add an excluded node placeholder in its place.
*
* This feature is only supported for unmodified nodes. An
* #SVN_ERR_UNSUPPORTED_FEATURE error is returned if the node can't be
* excluded in its current state.
*
* @a wc_ctx contains a tree lock, for the local path to the working copy
* which will be used as the root of this operation
*
* If @a notify_func is not @c NULL, call it with @a notify_baton to
* report changes as they are made.
*
* If @a cancel_func is not @c NULL, call it with @a cancel_baton at
* various points to determine if the client has canceled the operation.
*
*
* @since New in 1.7
*/
svn_error_t *
svn_wc_exclude(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/** @} */
/**
* Set @a kind to the #svn_node_kind_t of @a abspath. Use @a wc_ctx to access
* the working copy, and @a scratch_pool for all temporary allocations.
*
* If @a abspath is not under version control, set @a kind to #svn_node_none.
*
* If @a show_hidden and @a show_deleted are both @c FALSE, the kind of
* scheduled for delete, administrative only 'not present' and excluded
* nodes is reported as #svn_node_none. This is recommended as a check
* for 'is there a versioned file or directory here?'
*
* If @a show_deleted is FALSE, but @a show_hidden is @c TRUE then only
* scheduled for delete and administrative only 'not present' nodes are
* reported as #svn_node_none. This is recommended as check for
* 'Can I add a node here?'
*
* If @a show_deleted is TRUE, but @a show_hidden is FALSE, then only
* administrative only 'not present' nodes and excluded nodes are reported as
* #svn_node_none. This behavior is the behavior bescribed as 'hidden'
* before Subversion 1.7.
*
* If @a show_hidden and @a show_deleted are both @c TRUE all nodes are
* reported.
*
* @since New in 1.8.
*/
svn_error_t *
svn_wc_read_kind2(svn_node_kind_t *kind,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t show_deleted,
svn_boolean_t show_hidden,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_read_kind2() but with @a show_deleted always
* passed as TRUE.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.7 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_read_kind(svn_node_kind_t *kind,
svn_wc_context_t *wc_ctx,
const char *abspath,
svn_boolean_t show_hidden,
apr_pool_t *scratch_pool);
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_WC_H */
|