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
|
Short help:
$ hg
Mercurial Distributed SCM
basic commands:
add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
serve start stand-alone webserver
status show changed files in the working directory
summary summarize working directory state
update update working directory (or switch revisions)
(use 'hg help' for the full list of commands or 'hg -v' for details)
$ hg -q
add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
serve start stand-alone webserver
status show changed files in the working directory
summary summarize working directory state
update update working directory (or switch revisions)
Extra extensions will be printed in help output in a non-reliable order since
the extension is unknown.
#if no-extraextensions
$ hg help
Mercurial Distributed SCM
list of commands:
Repository creation:
clone make a copy of an existing repository
init create a new repository in the given directory
Remote repository management:
incoming show new changesets found in source
outgoing show changesets not found in the destination
paths show aliases for remote repositories
pull pull changes from the specified source
push push changes to the specified destination
serve start stand-alone webserver
Change creation:
commit commit the specified files or all outstanding changes
Change manipulation:
backout reverse effect of earlier changeset
graft copy changes from other branches onto the current branch
merge merge another revision into working directory
Change organization:
bookmarks create a new bookmark or list existing bookmarks
branch set or show the current branch name
branches list repository named branches
phase set or show the current phase name
tag add one or more tags for the current or given revision
tags list repository tags
File content management:
annotate show changeset information by line for each file
cat output the current or given revision of files
copy mark files as copied for the next commit
diff diff repository (or selected files)
grep search for a pattern in specified files
Change navigation:
bisect subdivision search of changesets
heads show branch heads
identify identify the working directory or specified revision
log show revision history of entire repository or files
Working directory management:
add add the specified files on the next commit
addremove add all new files, delete all missing files
files list tracked files
forget forget the specified files on the next commit
remove remove the specified files on the next commit
rename rename files; equivalent of copy + remove
resolve redo merges or set/view the merge status of files
revert restore files to their checkout state
root print the root (top) of the current working directory
shelve save and set aside changes from the working directory
status show changed files in the working directory
summary summarize working directory state
unshelve restore a shelved change to the working directory
update update working directory (or switch revisions)
Change import/export:
archive create an unversioned archive of a repository revision
bundle create a bundle file
export dump the header and diffs for one or more changesets
import import an ordered set of patches
unbundle apply one or more bundle files
Repository maintenance:
manifest output the current or given revision of the project manifest
recover roll back an interrupted transaction
verify verify the integrity of the repository
Help:
config show combined config settings from all hgrc files
help show help for a given topic or a help overview
version output version and copyright information
additional help topics:
Mercurial identifiers:
filesets Specifying File Sets
hgignore Syntax for Mercurial Ignore Files
patterns File Name Patterns
revisions Specifying Revisions
urls URL Paths
Mercurial output:
color Colorizing Outputs
dates Date Formats
diffs Diff Formats
templating Template Usage
Mercurial configuration:
config Configuration Files
environment Environment Variables
extensions Using Additional Features
flags Command-line flags
hgweb Configuring hgweb
merge-tools Merge Tools
pager Pager Support
Concepts:
bundlespec Bundle File Formats
glossary Glossary
phases Working with Phases
subrepos Subrepositories
Miscellaneous:
deprecated Deprecated Features
internals Technical implementation topics
scripting Using Mercurial from scripts and automation
(use 'hg help -v' to show built-in aliases and global options)
$ hg -q help
Repository creation:
clone make a copy of an existing repository
init create a new repository in the given directory
Remote repository management:
incoming show new changesets found in source
outgoing show changesets not found in the destination
paths show aliases for remote repositories
pull pull changes from the specified source
push push changes to the specified destination
serve start stand-alone webserver
Change creation:
commit commit the specified files or all outstanding changes
Change manipulation:
backout reverse effect of earlier changeset
graft copy changes from other branches onto the current branch
merge merge another revision into working directory
Change organization:
bookmarks create a new bookmark or list existing bookmarks
branch set or show the current branch name
branches list repository named branches
phase set or show the current phase name
tag add one or more tags for the current or given revision
tags list repository tags
File content management:
annotate show changeset information by line for each file
cat output the current or given revision of files
copy mark files as copied for the next commit
diff diff repository (or selected files)
grep search for a pattern in specified files
Change navigation:
bisect subdivision search of changesets
heads show branch heads
identify identify the working directory or specified revision
log show revision history of entire repository or files
Working directory management:
add add the specified files on the next commit
addremove add all new files, delete all missing files
files list tracked files
forget forget the specified files on the next commit
remove remove the specified files on the next commit
rename rename files; equivalent of copy + remove
resolve redo merges or set/view the merge status of files
revert restore files to their checkout state
root print the root (top) of the current working directory
shelve save and set aside changes from the working directory
status show changed files in the working directory
summary summarize working directory state
unshelve restore a shelved change to the working directory
update update working directory (or switch revisions)
Change import/export:
archive create an unversioned archive of a repository revision
bundle create a bundle file
export dump the header and diffs for one or more changesets
import import an ordered set of patches
unbundle apply one or more bundle files
Repository maintenance:
manifest output the current or given revision of the project manifest
recover roll back an interrupted transaction
verify verify the integrity of the repository
Help:
config show combined config settings from all hgrc files
help show help for a given topic or a help overview
version output version and copyright information
additional help topics:
Mercurial identifiers:
filesets Specifying File Sets
hgignore Syntax for Mercurial Ignore Files
patterns File Name Patterns
revisions Specifying Revisions
urls URL Paths
Mercurial output:
color Colorizing Outputs
dates Date Formats
diffs Diff Formats
templating Template Usage
Mercurial configuration:
config Configuration Files
environment Environment Variables
extensions Using Additional Features
flags Command-line flags
hgweb Configuring hgweb
merge-tools Merge Tools
pager Pager Support
Concepts:
bundlespec Bundle File Formats
glossary Glossary
phases Working with Phases
subrepos Subrepositories
Miscellaneous:
deprecated Deprecated Features
internals Technical implementation topics
scripting Using Mercurial from scripts and automation
Test extension help:
$ hg help extensions --config extensions.rebase= --config extensions.children=
Using Additional Features
"""""""""""""""""""""""""
Mercurial has the ability to add new features through the use of
extensions. Extensions may add new commands, add options to existing
commands, change the default behavior of commands, or implement hooks.
To enable the "foo" extension, either shipped with Mercurial or in the
Python search path, create an entry for it in your configuration file,
like this:
[extensions]
foo =
You may also specify the full path to an extension:
[extensions]
myfeature = ~/.hgext/myfeature.py
See 'hg help config' for more information on configuration files.
Extensions are not loaded by default for a variety of reasons: they can
increase startup overhead; they may be meant for advanced usage only; they
may provide potentially dangerous abilities (such as letting you destroy
or modify history); they might not be ready for prime time; or they may
alter some usual behaviors of stock Mercurial. It is thus up to the user
to activate extensions as needed.
To explicitly disable an extension enabled in a configuration file of
broader scope, prepend its path with !:
[extensions]
# disabling extension bar residing in /path/to/extension/bar.py
bar = !/path/to/extension/bar.py
# ditto, but no path was supplied for extension baz
baz = !
enabled extensions:
children command to display child changesets (DEPRECATED)
rebase command to move sets of revisions to a different ancestor
disabled extensions:
acl hooks for controlling repository access
blackbox log repository events to a blackbox for debugging
bugzilla hooks for integrating with the Bugzilla bug tracker
censor erase file content at a given revision
churn command to display statistics about repository history
clonebundles advertise pre-generated bundles to seed clones
closehead close arbitrary heads without checking them out first
convert import revisions from foreign VCS repositories into
Mercurial
eol automatically manage newlines in repository files
extdiff command to allow external programs to compare revisions
factotum http authentication with factotum
fastexport export repositories as git fast-import stream
githelp try mapping git commands to Mercurial commands
gpg commands to sign and verify changesets
hgk browse the repository in a graphical way
highlight syntax highlighting for hgweb (requires Pygments)
histedit interactive history editing
keyword expand keywords in tracked files
largefiles track large binary files
mq manage a stack of patches
notify hooks for sending email push notifications
patchbomb command to send changesets as (a series of) patch emails
purge command to delete untracked files from the working
directory
relink recreates hardlinks between repository clones
schemes extend schemes with shortcuts to repository swarms
share share a common history between several working directories
strip strip changesets and their descendants from history
transplant command to transplant changesets from another branch
win32mbcs allow the use of MBCS paths with problematic encodings
zeroconf discover and advertise repositories on the local network
#endif
Verify that deprecated extensions are included if --verbose:
$ hg -v help extensions | grep children
children command to display child changesets (DEPRECATED)
Verify that extension keywords appear in help templates
$ hg help --config extensions.transplant= templating|grep transplant > /dev/null
Test short command list with verbose option
$ hg -v help shortlist
Mercurial Distributed SCM
basic commands:
abort abort an unfinished operation (EXPERIMENTAL)
add add the specified files on the next commit
annotate, blame
show changeset information by line for each file
clone make a copy of an existing repository
commit, ci commit the specified files or all outstanding changes
continue resumes an interrupted operation (EXPERIMENTAL)
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
init create a new repository in the given directory
log, history show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
remove, rm remove the specified files on the next commit
serve start stand-alone webserver
status, st show changed files in the working directory
summary, sum summarize working directory state
update, up, checkout, co
update working directory (or switch revisions)
global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
--cwd DIR change working directory
-y --noninteractive do not prompt, automatically pick the first choice for
all prompts
-q --quiet suppress output
-v --verbose enable additional output
--color TYPE when to colorize (boolean, always, auto, never, or
debug)
--config CONFIG [+] set/override config option (use 'section.name=value')
--debug enable debugging output
--debugger start debugger
--encoding ENCODE set the charset encoding (default: ascii)
--encodingmode MODE set the charset encoding mode (default: strict)
--traceback always print a traceback on exception
--time time how long the command takes
--profile print command execution profile
--version output version information and exit
-h --help display help and exit
--hidden consider hidden changesets
--pager TYPE when to paginate (boolean, always, auto, or never)
(default: auto)
(use 'hg help' for the full list of commands)
$ hg add -h
hg add [OPTION]... [FILE]...
add the specified files on the next commit
Schedule files to be version controlled and added to the repository.
The files will be added to the repository at the next commit. To undo an
add before that, see 'hg forget'.
If no names are given, add all files to the repository (except files
matching ".hgignore").
Returns 0 if all files are successfully added.
options ([+] can be repeated):
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
-S --subrepos recurse into subrepositories
-n --dry-run do not perform actions, just print output
(some details hidden, use --verbose to show complete help)
Verbose help for add
$ hg add -hv
hg add [OPTION]... [FILE]...
add the specified files on the next commit
Schedule files to be version controlled and added to the repository.
The files will be added to the repository at the next commit. To undo an
add before that, see 'hg forget'.
If no names are given, add all files to the repository (except files
matching ".hgignore").
Examples:
- New (unknown) files are added automatically by 'hg add':
$ ls
foo.c
$ hg status
? foo.c
$ hg add
adding foo.c
$ hg status
A foo.c
- Specific files to be added can be specified:
$ ls
bar.c foo.c
$ hg status
? bar.c
? foo.c
$ hg add bar.c
$ hg status
A bar.c
? foo.c
Returns 0 if all files are successfully added.
options ([+] can be repeated):
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
-S --subrepos recurse into subrepositories
-n --dry-run do not perform actions, just print output
global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
--cwd DIR change working directory
-y --noninteractive do not prompt, automatically pick the first choice for
all prompts
-q --quiet suppress output
-v --verbose enable additional output
--color TYPE when to colorize (boolean, always, auto, never, or
debug)
--config CONFIG [+] set/override config option (use 'section.name=value')
--debug enable debugging output
--debugger start debugger
--encoding ENCODE set the charset encoding (default: ascii)
--encodingmode MODE set the charset encoding mode (default: strict)
--traceback always print a traceback on exception
--time time how long the command takes
--profile print command execution profile
--version output version information and exit
-h --help display help and exit
--hidden consider hidden changesets
--pager TYPE when to paginate (boolean, always, auto, or never)
(default: auto)
Test the textwidth config option
$ hg root -h --config ui.textwidth=50
hg root
print the root (top) of the current working
directory
Print the root directory of the current
repository.
Returns 0 on success.
options:
-T --template TEMPLATE display with template
(some details hidden, use --verbose to show
complete help)
Test help option with version option
$ hg add -h --version
Mercurial Distributed SCM (version *) (glob)
(see https://mercurial-scm.org for more information)
Copyright (C) 2005-* Matt Mackall and others (glob)
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ hg add --skjdfks
hg add: option --skjdfks not recognized
hg add [OPTION]... [FILE]...
add the specified files on the next commit
options ([+] can be repeated):
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
-S --subrepos recurse into subrepositories
-n --dry-run do not perform actions, just print output
(use 'hg add -h' to show more help)
[255]
Test ambiguous command help
$ hg help ad
list of commands:
add add the specified files on the next commit
addremove add all new files, delete all missing files
(use 'hg help -v ad' to show built-in aliases and global options)
Test command without options
$ hg help verify
hg verify
verify the integrity of the repository
Verify the integrity of the current repository.
This will perform an extensive check of the repository's integrity,
validating the hashes and checksums of each entry in the changelog,
manifest, and tracked files, as well as the integrity of their crosslinks
and indices.
Please see https://mercurial-scm.org/wiki/RepositoryCorruption for more
information about recovery from corruption of the repository.
Returns 0 on success, 1 if errors are encountered.
options:
(some details hidden, use --verbose to show complete help)
$ hg help diff
hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
diff repository (or selected files)
Show differences between revisions for the specified files.
Differences between files are shown using the unified diff format.
Note:
'hg diff' may generate unexpected results for merges, as it will
default to comparing against the working directory's first parent
changeset if no revisions are specified.
When two revision arguments are given, then changes are shown between
those revisions. If only one revision is specified then that revision is
compared to the working directory, and, when no revisions are specified,
the working directory files are compared to its first parent.
Alternatively you can specify -c/--change with a revision to see the
changes in that changeset relative to its first parent.
Without the -a/--text option, diff will avoid generating diffs of files it
detects as binary. With -a, diff will generate a diff anyway, probably
with undesirable results.
Use the -g/--git option to generate diffs in the git extended diff format.
For more information, read 'hg help diffs'.
Returns 0 on success.
options ([+] can be repeated):
-r --rev REV [+] revision
-c --change REV change made by revision
-a --text treat all files as text
-g --git use git extended diff format
--binary generate binary diffs in git mode (default)
--nodates omit dates from diff headers
--noprefix omit a/ and b/ prefixes from filenames
-p --show-function show which function each change is in
--reverse produce a diff that undoes the changes
-w --ignore-all-space ignore white space when comparing lines
-b --ignore-space-change ignore changes in the amount of white space
-B --ignore-blank-lines ignore changes whose lines are all blank
-Z --ignore-space-at-eol ignore changes in whitespace at EOL
-U --unified NUM number of lines of context to show
--stat output diffstat-style summary of changes
--root DIR produce diffs relative to subdirectory
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
-S --subrepos recurse into subrepositories
(some details hidden, use --verbose to show complete help)
$ hg help status
hg status [OPTION]... [FILE]...
aliases: st
show changed files in the working directory
Show status of files in the repository. If names are given, only files
that match are shown. Files that are clean or ignored or the source of a
copy/move operation, are not listed unless -c/--clean, -i/--ignored,
-C/--copies or -A/--all are given. Unless options described with "show
only ..." are given, the options -mardu are used.
Option -q/--quiet hides untracked (unknown and ignored) files unless
explicitly requested with -u/--unknown or -i/--ignored.
Note:
'hg status' may appear to disagree with diff if permissions have
changed or a merge has occurred. The standard diff format does not
report permission changes and diff only reports changes relative to one
merge parent.
If one revision is given, it is used as the base revision. If two
revisions are given, the differences between them are shown. The --change
option can also be used as a shortcut to list the changed files of a
revision from its first parent.
The codes used to show the status of files are:
M = modified
A = added
R = removed
C = clean
! = missing (deleted by non-hg command, but still tracked)
? = not tracked
I = ignored
= origin of the previous file (with --copies)
Returns 0 on success.
options ([+] can be repeated):
-A --all show status of all files
-m --modified show only modified files
-a --added show only added files
-r --removed show only removed files
-d --deleted show only missing files
-c --clean show only files without changes
-u --unknown show only unknown (not tracked) files
-i --ignored show only ignored files
-n --no-status hide status prefix
-C --copies show source of copied files
-0 --print0 end filenames with NUL, for use with xargs
--rev REV [+] show difference from revision
--change REV list the changed files of a revision
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
-S --subrepos recurse into subrepositories
-T --template TEMPLATE display with template
(some details hidden, use --verbose to show complete help)
$ hg -q help status
hg status [OPTION]... [FILE]...
show changed files in the working directory
$ hg help foo
abort: no such help topic: foo
(try 'hg help --keyword foo')
[255]
$ hg skjdfks
hg: unknown command 'skjdfks'
(use 'hg help' for a list of commands)
[255]
Typoed command gives suggestion
$ hg puls
hg: unknown command 'puls'
(did you mean one of pull, push?)
[255]
Not enabled extension gets suggested
$ hg rebase
hg: unknown command 'rebase'
'rebase' is provided by the following extension:
rebase command to move sets of revisions to a different ancestor
(use 'hg help extensions' for information on enabling extensions)
[255]
Disabled extension gets suggested
$ hg --config extensions.rebase=! rebase
hg: unknown command 'rebase'
'rebase' is provided by the following extension:
rebase command to move sets of revisions to a different ancestor
(use 'hg help extensions' for information on enabling extensions)
[255]
Checking that help adapts based on the config:
$ hg help diff --config ui.tweakdefaults=true | egrep -e '^ *(-g|config)'
-g --[no-]git use git extended diff format (default: on from
config)
Make sure that we don't run afoul of the help system thinking that
this is a section and erroring out weirdly.
$ hg .log
hg: unknown command '.log'
(did you mean log?)
[255]
$ hg log.
hg: unknown command 'log.'
(did you mean log?)
[255]
$ hg pu.lh
hg: unknown command 'pu.lh'
(did you mean one of pull, push?)
[255]
$ cat > helpext.py <<EOF
> import os
> from mercurial import commands, fancyopts, registrar
>
> def func(arg):
> return '%sfoo' % arg
> class customopt(fancyopts.customopt):
> def newstate(self, oldstate, newparam, abort):
> return '%sbar' % oldstate
> cmdtable = {}
> command = registrar.command(cmdtable)
>
> @command(b'nohelp',
> [(b'', b'longdesc', 3, b'x'*67),
> (b'n', b'', None, b'normal desc'),
> (b'', b'newline', b'', b'line1\nline2'),
> (b'', b'default-off', False, b'enable X'),
> (b'', b'default-on', True, b'enable Y'),
> (b'', b'callableopt', func, b'adds foo'),
> (b'', b'customopt', customopt(''), b'adds bar'),
> (b'', b'customopt-withdefault', customopt('foo'), b'adds bar')],
> b'hg nohelp',
> norepo=True)
> @command(b'debugoptADV', [(b'', b'aopt', None, b'option is (ADVANCED)')])
> @command(b'debugoptDEP', [(b'', b'dopt', None, b'option is (DEPRECATED)')])
> @command(b'debugoptEXP', [(b'', b'eopt', None, b'option is (EXPERIMENTAL)')])
> def nohelp(ui, *args, **kwargs):
> pass
>
> @command(b'hashelp', [], b'hg hashelp', norepo=True)
> def hashelp(ui, *args, **kwargs):
> """Extension command's help"""
>
> def uisetup(ui):
> ui.setconfig(b'alias', b'shellalias', b'!echo hi', b'helpext')
> ui.setconfig(b'alias', b'hgalias', b'summary', b'helpext')
> ui.setconfig(b'alias', b'hgalias:doc', b'My doc', b'helpext')
> ui.setconfig(b'alias', b'hgalias:category', b'navigation', b'helpext')
> ui.setconfig(b'alias', b'hgaliasnodoc', b'summary', b'helpext')
>
> EOF
$ echo '[extensions]' >> $HGRCPATH
$ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH
Test for aliases
$ hg help | grep hgalias
hgalias My doc
$ hg help hgalias
hg hgalias [--remote]
alias for: hg summary
My doc
defined by: helpext
options:
--remote check for push and pull
(some details hidden, use --verbose to show complete help)
$ hg help hgaliasnodoc
hg hgaliasnodoc [--remote]
alias for: hg summary
summarize working directory state
This generates a brief summary of the working directory state, including
parents, branch, commit status, phase and available updates.
With the --remote option, this will check the default paths for incoming
and outgoing changes. This can be time-consuming.
Returns 0 on success.
defined by: helpext
options:
--remote check for push and pull
(some details hidden, use --verbose to show complete help)
$ hg help shellalias
hg shellalias
shell alias for: echo hi
(no help text available)
defined by: helpext
(some details hidden, use --verbose to show complete help)
Test command with no help text
$ hg help nohelp
hg nohelp
(no help text available)
options:
--longdesc VALUE
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxx (default: 3)
-n -- normal desc
--newline VALUE line1 line2
--default-off enable X
--[no-]default-on enable Y (default: on)
--callableopt VALUE adds foo
--customopt VALUE adds bar
--customopt-withdefault VALUE adds bar (default: foo)
(some details hidden, use --verbose to show complete help)
Test that default list of commands includes extension commands that have help,
but not those that don't, except in verbose mode, when a keyword is passed, or
when help about the extension is requested.
#if no-extraextensions
$ hg help | grep hashelp
hashelp Extension command's help
$ hg help | grep nohelp
[1]
$ hg help -v | grep nohelp
nohelp (no help text available)
$ hg help -k nohelp
Commands:
nohelp hg nohelp
Extension Commands:
nohelp (no help text available)
$ hg help helpext
helpext extension - no help text available
list of commands:
hashelp Extension command's help
nohelp (no help text available)
(use 'hg help -v helpext' to show built-in aliases and global options)
#endif
Test list of internal help commands
$ hg help debug
debug commands (internal and unsupported):
debugancestor
find the ancestor revision of two revisions in a given index
debugantivirusrunning
attempt to trigger an antivirus scanner to see if one is active
debugapplystreamclonebundle
apply a stream clone bundle file
debugbackupbundle
lists the changesets available in backup bundles
debugbuilddag
builds a repo with a given DAG from scratch in the current
empty repo
debugbundle lists the contents of a bundle
debugcapabilities
lists the capabilities of a remote peer
debugchangedfiles
list the stored files changes for a revision
debugcheckstate
validate the correctness of the current dirstate
debugcolor show available color, effects or style
debugcommands
list all available commands and options
debugcomplete
returns the completion list associated with the given command
debugcreatestreamclonebundle
create a stream clone bundle file
debugdag format the changelog or an index DAG as a concise textual
description
debugdata dump the contents of a data file revision
debugdate parse and display a date
debugdeltachain
dump information about delta chains in a revlog
debugdirstate
show the contents of the current dirstate
debugdiscovery
runs the changeset discovery protocol in isolation
debugdownload
download a resource using Mercurial logic and config
debugextensions
show information about active extensions
debugfileset parse and apply a fileset specification
debugformat display format information about the current repository
debugfsinfo show information detected about current filesystem
debuggetbundle
retrieves a bundle from a repo
debugignore display the combined ignore pattern and information about
ignored files
debugindex dump index data for a storage primitive
debugindexdot
dump an index DAG as a graphviz dot file
debugindexstats
show stats related to the changelog index
debuginstall test Mercurial installation
debugknown test whether node ids are known to a repo
debuglocks show or modify state of locks
debugmanifestfulltextcache
show, clear or amend the contents of the manifest fulltext
cache
debugmergestate
print merge state
debugnamecomplete
complete "names" - tags, open branch names, bookmark names
debugnodemap write and inspect on disk nodemap
debugobsolete
create arbitrary obsolete marker
debugoptADV (no help text available)
debugoptDEP (no help text available)
debugoptEXP (no help text available)
debugp1copies
dump copy information compared to p1
debugp2copies
dump copy information compared to p2
debugpathcomplete
complete part or all of a tracked path
debugpathcopies
show copies between two revisions
debugpeer establish a connection to a peer repository
debugpickmergetool
examine which merge tool is chosen for specified file
debugpushkey access the pushkey key/value protocol
debugpvec (no help text available)
debugrebuilddirstate
rebuild the dirstate as it would look like for the given
revision
debugrebuildfncache
rebuild the fncache file
debugrename dump rename information
debugrequires
print the current repo requirements
debugrevlog show data and statistics about a revlog
debugrevlogindex
dump the contents of a revlog index
debugrevspec parse and apply a revision specification
debugserve run a server with advanced settings
debugsetparents
manually set the parents of the current working directory
debugsidedata
dump the side data for a cl/manifest/file revision
debugssl test a secure connection to a server
debugsub (no help text available)
debugsuccessorssets
show set of successors for revision
debugtagscache
display the contents of .hg/cache/hgtagsfnodes1
debugtemplate
parse and apply a template
debuguigetpass
show prompt to type password
debuguiprompt
show plain prompt
debugupdatecaches
warm all known caches in the repository
debugupgraderepo
upgrade a repository to use different features
debugwalk show how files match on given patterns
debugwhyunstable
explain instabilities of a changeset
debugwireargs
(no help text available)
debugwireproto
send wire protocol commands to a server
(use 'hg help -v debug' to show built-in aliases and global options)
internals topic renders index of available sub-topics
$ hg help internals
Technical implementation topics
"""""""""""""""""""""""""""""""
To access a subtopic, use "hg help internals.{subtopic-name}"
bid-merge Bid Merge Algorithm
bundle2 Bundle2
bundles Bundles
cbor CBOR
censor Censor
changegroups Changegroups
config Config Registrar
extensions Extension API
mergestate Mergestate
requirements Repository Requirements
revlogs Revision Logs
wireprotocol Wire Protocol
wireprotocolrpc
Wire Protocol RPC
wireprotocolv2
Wire Protocol Version 2
sub-topics can be accessed
$ hg help internals.changegroups
Changegroups
""""""""""""
Changegroups are representations of repository revlog data, specifically
the changelog data, root/flat manifest data, treemanifest data, and
filelogs.
There are 3 versions of changegroups: "1", "2", and "3". From a high-
level, versions "1" and "2" are almost exactly the same, with the only
difference being an additional item in the *delta header*. Version "3"
adds support for storage flags in the *delta header* and optionally
exchanging treemanifests (enabled by setting an option on the
"changegroup" part in the bundle2).
Changegroups when not exchanging treemanifests consist of 3 logical
segments:
+---------------------------------+
| | | |
| changeset | manifest | filelogs |
| | | |
| | | |
+---------------------------------+
When exchanging treemanifests, there are 4 logical segments:
+-------------------------------------------------+
| | | | |
| changeset | root | treemanifests | filelogs |
| | manifest | | |
| | | | |
+-------------------------------------------------+
The principle building block of each segment is a *chunk*. A *chunk* is a
framed piece of data:
+---------------------------------------+
| | |
| length | data |
| (4 bytes) | (<length - 4> bytes) |
| | |
+---------------------------------------+
All integers are big-endian signed integers. Each chunk starts with a
32-bit integer indicating the length of the entire chunk (including the
length field itself).
There is a special case chunk that has a value of 0 for the length
("0x00000000"). We call this an *empty chunk*.
Delta Groups
============
A *delta group* expresses the content of a revlog as a series of deltas,
or patches against previous revisions.
Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
to signal the end of the delta group:
+------------------------------------------------------------------------+
| | | | | |
| chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
| (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
| | | | | |
+------------------------------------------------------------------------+
Each *chunk*'s data consists of the following:
+---------------------------------------+
| | |
| delta header | delta data |
| (various by version) | (various) |
| | |
+---------------------------------------+
The *delta data* is a series of *delta*s that describe a diff from an
existing entry (either that the recipient already has, or previously
specified in the bundle/changegroup).
The *delta header* is different between versions "1", "2", and "3" of the
changegroup format.
Version 1 (headerlen=80):
+------------------------------------------------------+
| | | | |
| node | p1 node | p2 node | link node |
| (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
| | | | |
+------------------------------------------------------+
Version 2 (headerlen=100):
+------------------------------------------------------------------+
| | | | | |
| node | p1 node | p2 node | base node | link node |
| (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
| | | | | |
+------------------------------------------------------------------+
Version 3 (headerlen=102):
+------------------------------------------------------------------------------+
| | | | | | |
| node | p1 node | p2 node | base node | link node | flags |
| (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
| | | | | | |
+------------------------------------------------------------------------------+
The *delta data* consists of "chunklen - 4 - headerlen" bytes, which
contain a series of *delta*s, densely packed (no separators). These deltas
describe a diff from an existing entry (either that the recipient already
has, or previously specified in the bundle/changegroup). The format is
described more fully in "hg help internals.bdiff", but briefly:
+---------------------------------------------------------------+
| | | | |
| start offset | end offset | new length | content |
| (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
| | | | |
+---------------------------------------------------------------+
Please note that the length field in the delta data does *not* include
itself.
In version 1, the delta is always applied against the previous node from
the changegroup or the first parent if this is the first entry in the
changegroup.
In version 2 and up, the delta base node is encoded in the entry in the
changegroup. This allows the delta to be expressed against any parent,
which can result in smaller deltas and more efficient encoding of data.
The *flags* field holds bitwise flags affecting the processing of revision
data. The following flags are defined:
32768
Censored revision. The revision's fulltext has been replaced by censor
metadata. May only occur on file revisions.
16384
Ellipsis revision. Revision hash does not match data (likely due to
rewritten parents).
8192
Externally stored. The revision fulltext contains "key:value" "\n"
delimited metadata defining an object stored elsewhere. Used by the LFS
extension.
For historical reasons, the integer values are identical to revlog version
1 per-revision storage flags and correspond to bits being set in this
2-byte field. Bits were allocated starting from the most-significant bit,
hence the reverse ordering and allocation of these flags.
Changeset Segment
=================
The *changeset segment* consists of a single *delta group* holding
changelog data. The *empty chunk* at the end of the *delta group* denotes
the boundary to the *manifest segment*.
Manifest Segment
================
The *manifest segment* consists of a single *delta group* holding manifest
data. If treemanifests are in use, it contains only the manifest for the
root directory of the repository. Otherwise, it contains the entire
manifest data. The *empty chunk* at the end of the *delta group* denotes
the boundary to the next segment (either the *treemanifests segment* or
the *filelogs segment*, depending on version and the request options).
Treemanifests Segment
---------------------
The *treemanifests segment* only exists in changegroup version "3", and
only if the 'treemanifest' param is part of the bundle2 changegroup part
(it is not possible to use changegroup version 3 outside of bundle2).
Aside from the filenames in the *treemanifests segment* containing a
trailing "/" character, it behaves identically to the *filelogs segment*
(see below). The final sub-segment is followed by an *empty chunk*
(logically, a sub-segment with filename size 0). This denotes the boundary
to the *filelogs segment*.
Filelogs Segment
================
The *filelogs segment* consists of multiple sub-segments, each
corresponding to an individual file whose data is being described:
+--------------------------------------------------+
| | | | | |
| filelog0 | filelog1 | filelog2 | ... | 0x0 |
| | | | | (4 bytes) |
| | | | | |
+--------------------------------------------------+
The final filelog sub-segment is followed by an *empty chunk* (logically,
a sub-segment with filename size 0). This denotes the end of the segment
and of the overall changegroup.
Each filelog sub-segment consists of the following:
+------------------------------------------------------+
| | | |
| filename length | filename | delta group |
| (4 bytes) | (<length - 4> bytes) | (various) |
| | | |
+------------------------------------------------------+
That is, a *chunk* consisting of the filename (not terminated or padded)
followed by N chunks constituting the *delta group* for this file. The
*empty chunk* at the end of each *delta group* denotes the boundary to the
next filelog sub-segment.
non-existent subtopics print an error
$ hg help internals.foo
abort: no such help topic: internals.foo
(try 'hg help --keyword foo')
[255]
test advanced, deprecated and experimental options are hidden in command help
$ hg help debugoptADV
hg debugoptADV
(no help text available)
options:
(some details hidden, use --verbose to show complete help)
$ hg help debugoptDEP
hg debugoptDEP
(no help text available)
options:
(some details hidden, use --verbose to show complete help)
$ hg help debugoptEXP
hg debugoptEXP
(no help text available)
options:
(some details hidden, use --verbose to show complete help)
test advanced, deprecated and experimental options are shown with -v
$ hg help -v debugoptADV | grep aopt
--aopt option is (ADVANCED)
$ hg help -v debugoptDEP | grep dopt
--dopt option is (DEPRECATED)
$ hg help -v debugoptEXP | grep eopt
--eopt option is (EXPERIMENTAL)
#if gettext
test deprecated option is hidden with translation with untranslated description
(use many globy for not failing on changed transaction)
$ LANGUAGE=sv hg help debugoptDEP
hg debugoptDEP
(*) (glob)
options:
(some details hidden, use --verbose to show complete help)
#endif
Test commands that collide with topics (issue4240)
$ hg config -hq
hg config [-u] [NAME]...
show combined config settings from all hgrc files
$ hg showconfig -hq
hg config [-u] [NAME]...
show combined config settings from all hgrc files
Test a help topic
$ hg help dates
Date Formats
""""""""""""
Some commands allow the user to specify a date, e.g.:
- backout, commit, import, tag: Specify the commit date.
- log, revert, update: Select revision(s) by date.
Many date formats are valid. Here are some examples:
- "Wed Dec 6 13:18:29 2006" (local timezone assumed)
- "Dec 6 13:18 -0600" (year assumed, time offset provided)
- "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
- "Dec 6" (midnight)
- "13:18" (today assumed)
- "3:39" (3:39AM assumed)
- "3:39pm" (15:39)
- "2006-12-06 13:18:29" (ISO 8601 format)
- "2006-12-6 13:18"
- "2006-12-6"
- "12-6"
- "12/6"
- "12/6/6" (Dec 6 2006)
- "today" (midnight)
- "yesterday" (midnight)
- "now" - right now
Lastly, there is Mercurial's internal format:
- "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
This is the internal representation format for dates. The first number is
the number of seconds since the epoch (1970-01-01 00:00 UTC). The second
is the offset of the local timezone, in seconds west of UTC (negative if
the timezone is east of UTC).
The log command also accepts date ranges:
- "<DATE" - at or before a given date/time
- ">DATE" - on or after a given date/time
- "DATE to DATE" - a date range, inclusive
- "-DAYS" - within a given number of days of today
Test repeated config section name
$ hg help config.host
"http_proxy.host"
Host name and (optional) port of the proxy server, for example
"myproxy:8000".
"smtp.host"
Host name of mail server, e.g. "mail.example.com".
Test section name with dot
$ hg help config.ui.username
"ui.username"
The committer of a changeset created when running "commit". Typically
a person's name and email address, e.g. "Fred Widget
<fred@example.com>". Environment variables in the username are
expanded.
(default: "$EMAIL" or "username@hostname". If the username in hgrc is
empty, e.g. if the system admin set "username =" in the system hgrc,
it has to be specified manually or in a different hgrc file)
$ hg help config.annotate.git
abort: help section not found: config.annotate.git
[255]
$ hg help config.update.check
"commands.update.check"
Determines what level of checking 'hg update' will perform before
moving to a destination revision. Valid values are "abort", "none",
"linear", and "noconflict". "abort" always fails if the working
directory has uncommitted changes. "none" performs no checking, and
may result in a merge with uncommitted changes. "linear" allows any
update as long as it follows a straight line in the revision history,
and may trigger a merge with uncommitted changes. "noconflict" will
allow any update which would not trigger a merge with uncommitted
changes, if any are present. (default: "linear")
$ hg help config.commands.update.check
"commands.update.check"
Determines what level of checking 'hg update' will perform before
moving to a destination revision. Valid values are "abort", "none",
"linear", and "noconflict". "abort" always fails if the working
directory has uncommitted changes. "none" performs no checking, and
may result in a merge with uncommitted changes. "linear" allows any
update as long as it follows a straight line in the revision history,
and may trigger a merge with uncommitted changes. "noconflict" will
allow any update which would not trigger a merge with uncommitted
changes, if any are present. (default: "linear")
$ hg help config.ommands.update.check
abort: help section not found: config.ommands.update.check
[255]
Unrelated trailing paragraphs shouldn't be included
$ hg help config.extramsg | grep '^$'
Test capitalized section name
$ hg help scripting.HGPLAIN > /dev/null
Help subsection:
$ hg help config.charsets |grep "Email example:" > /dev/null
[1]
Show nested definitions
("profiling.type"[break]"ls"[break]"stat"[break])
$ hg help config.type | egrep '^$'|wc -l
\s*3 (re)
$ hg help config.profiling.type.ls
"profiling.type.ls"
Use Python's built-in instrumenting profiler. This profiler works on
all platforms, but each line number it reports is the first line of
a function. This restriction makes it difficult to identify the
expensive parts of a non-trivial function.
Separate sections from subsections
$ hg help config.format | egrep '^ ("|-)|^\s*$' | uniq
"format"
--------
"usegeneraldelta"
"dotencode"
"usefncache"
"usestore"
"sparse-revlog"
"revlog-compression"
"bookmarks-in-store"
"profiling"
-----------
"format"
"progress"
----------
"format"
Last item in help config.*:
$ hg help config.`hg help config|grep '^ "'| \
> tail -1|sed 's![ "]*!!g'`| \
> grep 'hg help -c config' > /dev/null
[1]
note to use help -c for general hg help config:
$ hg help config |grep 'hg help -c config' > /dev/null
Test templating help
$ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
desc String. The text of the changeset description.
diffstat String. Statistics of changes with the following format:
firstline Any text. Returns the first line of text.
nonempty Any text. Returns '(none)' if the string is empty.
Test deprecated items
$ hg help -v templating | grep currentbookmark
currentbookmark
$ hg help templating | (grep currentbookmark || true)
Test help hooks
$ cat > helphook1.py <<EOF
> from mercurial import help
>
> def rewrite(ui, topic, doc):
> return doc + b'\nhelphook1\n'
>
> def extsetup(ui):
> help.addtopichook(b'revisions', rewrite)
> EOF
$ cat > helphook2.py <<EOF
> from mercurial import help
>
> def rewrite(ui, topic, doc):
> return doc + b'\nhelphook2\n'
>
> def extsetup(ui):
> help.addtopichook(b'revisions', rewrite)
> EOF
$ echo '[extensions]' >> $HGRCPATH
$ echo "helphook1 = `pwd`/helphook1.py" >> $HGRCPATH
$ echo "helphook2 = `pwd`/helphook2.py" >> $HGRCPATH
$ hg help revsets | grep helphook
helphook1
helphook2
help -c should only show debug --debug
$ hg help -c --debug|egrep debug|wc -l|egrep '^\s*0\s*$'
[1]
help -c should only show deprecated for -v
$ hg help -c -v|egrep DEPRECATED|wc -l|egrep '^\s*0\s*$'
[1]
Test -s / --system
$ hg help config.files -s windows |grep 'etc/mercurial' | \
> wc -l | sed -e 's/ //g'
0
$ hg help config.files --system unix | grep 'USER' | \
> wc -l | sed -e 's/ //g'
0
Test -e / -c / -k combinations
$ hg help -c|egrep '^[A-Z].*:|^ debug'
Commands:
$ hg help -e|egrep '^[A-Z].*:|^ debug'
Extensions:
$ hg help -k|egrep '^[A-Z].*:|^ debug'
Topics:
Commands:
Extensions:
Extension Commands:
$ hg help -c schemes
abort: no such help topic: schemes
(try 'hg help --keyword schemes')
[255]
$ hg help -e schemes |head -1
schemes extension - extend schemes with shortcuts to repository swarms
$ hg help -c -k dates |egrep '^(Topics|Extensions|Commands):'
Commands:
$ hg help -e -k a |egrep '^(Topics|Extensions|Commands):'
Extensions:
$ hg help -e -c -k date |egrep '^(Topics|Extensions|Commands):'
Extensions:
Commands:
$ hg help -c commit > /dev/null
$ hg help -e -c commit > /dev/null
$ hg help -e commit
abort: no such help topic: commit
(try 'hg help --keyword commit')
[255]
Test keyword search help
$ cat > prefixedname.py <<EOF
> '''matched against word "clone"
> '''
> EOF
$ echo '[extensions]' >> $HGRCPATH
$ echo "dot.dot.prefixedname = `pwd`/prefixedname.py" >> $HGRCPATH
$ hg help -k clone
Topics:
config Configuration Files
extensions Using Additional Features
glossary Glossary
phases Working with Phases
subrepos Subrepositories
urls URL Paths
Commands:
bookmarks create a new bookmark or list existing bookmarks
clone make a copy of an existing repository
paths show aliases for remote repositories
pull pull changes from the specified source
update update working directory (or switch revisions)
Extensions:
clonebundles advertise pre-generated bundles to seed clones
narrow create clones which fetch history data for subset of files
(EXPERIMENTAL)
prefixedname matched against word "clone"
relink recreates hardlinks between repository clones
Extension Commands:
qclone clone main and patch repository at same time
Test unfound topic
$ hg help nonexistingtopicthatwillneverexisteverever
abort: no such help topic: nonexistingtopicthatwillneverexisteverever
(try 'hg help --keyword nonexistingtopicthatwillneverexisteverever')
[255]
Test unfound keyword
$ hg help --keyword nonexistingwordthatwillneverexisteverever
abort: no matches
(try 'hg help' for a list of topics)
[255]
Test omit indicating for help
$ cat > addverboseitems.py <<EOF
> r'''extension to test omit indicating.
>
> This paragraph is never omitted (for extension)
>
> .. container:: verbose
>
> This paragraph is omitted,
> if :hg:\`help\` is invoked without \`\`-v\`\` (for extension)
>
> This paragraph is never omitted, too (for extension)
> '''
> from __future__ import absolute_import
> from mercurial import commands, help
> testtopic = br"""This paragraph is never omitted (for topic).
>
> .. container:: verbose
>
> This paragraph is omitted,
> if :hg:\`help\` is invoked without \`\`-v\`\` (for topic)
>
> This paragraph is never omitted, too (for topic)
> """
> def extsetup(ui):
> help.helptable.append(([b"topic-containing-verbose"],
> b"This is the topic to test omit indicating.",
> lambda ui: testtopic))
> EOF
$ echo '[extensions]' >> $HGRCPATH
$ echo "addverboseitems = `pwd`/addverboseitems.py" >> $HGRCPATH
$ hg help addverboseitems
addverboseitems extension - extension to test omit indicating.
This paragraph is never omitted (for extension)
This paragraph is never omitted, too (for extension)
(some details hidden, use --verbose to show complete help)
no commands defined
$ hg help -v addverboseitems
addverboseitems extension - extension to test omit indicating.
This paragraph is never omitted (for extension)
This paragraph is omitted, if 'hg help' is invoked without "-v" (for
extension)
This paragraph is never omitted, too (for extension)
no commands defined
$ hg help topic-containing-verbose
This is the topic to test omit indicating.
""""""""""""""""""""""""""""""""""""""""""
This paragraph is never omitted (for topic).
This paragraph is never omitted, too (for topic)
(some details hidden, use --verbose to show complete help)
$ hg help -v topic-containing-verbose
This is the topic to test omit indicating.
""""""""""""""""""""""""""""""""""""""""""
This paragraph is never omitted (for topic).
This paragraph is omitted, if 'hg help' is invoked without "-v" (for
topic)
This paragraph is never omitted, too (for topic)
Test section lookup
$ hg help revset.merge
"merge()"
Changeset is a merge changeset.
$ hg help glossary.dag
DAG
The repository of changesets of a distributed version control system
(DVCS) can be described as a directed acyclic graph (DAG), consisting
of nodes and edges, where nodes correspond to changesets and edges
imply a parent -> child relation. This graph can be visualized by
graphical tools such as 'hg log --graph'. In Mercurial, the DAG is
limited by the requirement for children to have at most two parents.
$ hg help hgrc.paths
"paths"
-------
Assigns symbolic names and behavior to repositories.
Options are symbolic names defining the URL or directory that is the
location of the repository. Example:
[paths]
my_server = https://example.com/my_repo
local_path = /home/me/repo
These symbolic names can be used from the command line. To pull from
"my_server": 'hg pull my_server'. To push to "local_path": 'hg push
local_path'.
Options containing colons (":") denote sub-options that can influence
behavior for that specific path. Example:
[paths]
my_server = https://example.com/my_path
my_server:pushurl = ssh://example.com/my_path
The following sub-options can be defined:
"pushurl"
The URL to use for push operations. If not defined, the location
defined by the path's main entry is used.
"pushrev"
A revset defining which revisions to push by default.
When 'hg push' is executed without a "-r" argument, the revset defined
by this sub-option is evaluated to determine what to push.
For example, a value of "." will push the working directory's revision
by default.
Revsets specifying bookmarks will not result in the bookmark being
pushed.
The following special named paths exist:
"default"
The URL or directory to use when no source or remote is specified.
'hg clone' will automatically define this path to the location the
repository was cloned from.
"default-push"
(deprecated) The URL or directory for the default 'hg push' location.
"default:pushurl" should be used instead.
$ hg help glossary.mcguffin
abort: help section not found: glossary.mcguffin
[255]
$ hg help glossary.mc.guffin
abort: help section not found: glossary.mc.guffin
[255]
$ hg help template.files
files List of strings. All files modified, added, or removed by
this changeset.
files(pattern)
All files of the current changeset matching the pattern. See
'hg help patterns'.
Test section lookup by translated message
str.lower() instead of encoding.lower(str) on translated message might
make message meaningless, because some encoding uses 0x41(A) - 0x5a(Z)
as the second or later byte of multi-byte character.
For example, "\x8bL\x98^" (translation of "record" in ja_JP.cp932)
contains 0x4c (L). str.lower() replaces 0x4c(L) by 0x6c(l) and this
replacement makes message meaningless.
This tests that section lookup by translated string isn't broken by
such str.lower().
$ "$PYTHON" <<EOF
> def escape(s):
> return b''.join(b'\\u%x' % ord(uc) for uc in s.decode('cp932'))
> # translation of "record" in ja_JP.cp932
> upper = b"\x8bL\x98^"
> # str.lower()-ed section name should be treated as different one
> lower = b"\x8bl\x98^"
> with open('ambiguous.py', 'wb') as fp:
> fp.write(b"""# ambiguous section names in ja_JP.cp932
> u'''summary of extension
>
> %s
> ----
>
> Upper name should show only this message
>
> %s
> ----
>
> Lower name should show only this message
>
> subsequent section
> ------------------
>
> This should be hidden at 'hg help ambiguous' with section name.
> '''
> """ % (escape(upper), escape(lower)))
> EOF
$ cat >> $HGRCPATH <<EOF
> [extensions]
> ambiguous = ./ambiguous.py
> EOF
$ "$PYTHON" <<EOF | sh
> from mercurial.utils import procutil
> upper = b"\x8bL\x98^"
> procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % upper)
> EOF
\x8bL\x98^ (esc)
----
Upper name should show only this message
$ "$PYTHON" <<EOF | sh
> from mercurial.utils import procutil
> lower = b"\x8bl\x98^"
> procutil.stdout.write(b"hg --encoding cp932 help -e ambiguous.%s\n" % lower)
> EOF
\x8bl\x98^ (esc)
----
Lower name should show only this message
$ cat >> $HGRCPATH <<EOF
> [extensions]
> ambiguous = !
> EOF
Show help content of disabled extensions
$ cat >> $HGRCPATH <<EOF
> [extensions]
> ambiguous = !./ambiguous.py
> EOF
$ hg help -e ambiguous
ambiguous extension - (no help text available)
(use 'hg help extensions' for information on enabling extensions)
Test dynamic list of merge tools only shows up once
$ hg help merge-tools
Merge Tools
"""""""""""
To merge files Mercurial uses merge tools.
A merge tool combines two different versions of a file into a merged file.
Merge tools are given the two files and the greatest common ancestor of
the two file versions, so they can determine the changes made on both
branches.
Merge tools are used both for 'hg resolve', 'hg merge', 'hg update', 'hg
backout' and in several extensions.
Usually, the merge tool tries to automatically reconcile the files by
combining all non-overlapping changes that occurred separately in the two
different evolutions of the same initial base file. Furthermore, some
interactive merge programs make it easier to manually resolve conflicting
merges, either in a graphical way, or by inserting some conflict markers.
Mercurial does not include any interactive merge programs but relies on
external tools for that.
Available merge tools
=====================
External merge tools and their properties are configured in the merge-
tools configuration section - see hgrc(5) - but they can often just be
named by their executable.
A merge tool is generally usable if its executable can be found on the
system and if it can handle the merge. The executable is found if it is an
absolute or relative executable path or the name of an application in the
executable search path. The tool is assumed to be able to handle the merge
if it can handle symlinks if the file is a symlink, if it can handle
binary files if the file is binary, and if a GUI is available if the tool
requires a GUI.
There are some internal merge tools which can be used. The internal merge
tools are:
":dump"
Creates three versions of the files to merge, containing the contents of
local, other and base. These files can then be used to perform a merge
manually. If the file to be merged is named "a.txt", these files will
accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
they will be placed in the same directory as "a.txt".
This implies premerge. Therefore, files aren't dumped, if premerge runs
successfully. Use :forcedump to forcibly write files out.
(actual capabilities: binary, symlink)
":fail"
Rather than attempting to merge files that were modified on both
branches, it marks them as unresolved. The resolve command must be used
to resolve these conflicts.
(actual capabilities: binary, symlink)
":forcedump"
Creates three versions of the files as same as :dump, but omits
premerge.
(actual capabilities: binary, symlink)
":local"
Uses the local 'p1()' version of files as the merged version.
(actual capabilities: binary, symlink)
":merge"
Uses the internal non-interactive simple merge algorithm for merging
files. It will fail if there are any conflicts and leave markers in the
partially merged file. Markers will have two sections, one for each side
of merge.
":merge-local"
Like :merge, but resolve all conflicts non-interactively in favor of the
local 'p1()' changes.
":merge-other"
Like :merge, but resolve all conflicts non-interactively in favor of the
other 'p2()' changes.
":merge3"
Uses the internal non-interactive simple merge algorithm for merging
files. It will fail if there are any conflicts and leave markers in the
partially merged file. Marker will have three sections, one from each
side of the merge and one for the base content.
":other"
Uses the other 'p2()' version of files as the merged version.
(actual capabilities: binary, symlink)
":prompt"
Asks the user which of the local 'p1()' or the other 'p2()' version to
keep as the merged version.
(actual capabilities: binary, symlink)
":tagmerge"
Uses the internal tag merge algorithm (experimental).
":union"
Uses the internal non-interactive simple merge algorithm for merging
files. It will use both left and right sides for conflict regions. No
markers are inserted.
Internal tools are always available and do not require a GUI but will by
default not handle symlinks or binary files. See next section for detail
about "actual capabilities" described above.
Choosing a merge tool
=====================
Mercurial uses these rules when deciding which merge tool to use:
1. If a tool has been specified with the --tool option to merge or
resolve, it is used. If it is the name of a tool in the merge-tools
configuration, its configuration is used. Otherwise the specified tool
must be executable by the shell.
2. If the "HGMERGE" environment variable is present, its value is used and
must be executable by the shell.
3. If the filename of the file to be merged matches any of the patterns in
the merge-patterns configuration section, the first usable merge tool
corresponding to a matching pattern is used.
4. If ui.merge is set it will be considered next. If the value is not the
name of a configured tool, the specified value is used and must be
executable by the shell. Otherwise the named tool is used if it is
usable.
5. If any usable merge tools are present in the merge-tools configuration
section, the one with the highest priority is used.
6. If a program named "hgmerge" can be found on the system, it is used -
but it will by default not be used for symlinks and binary files.
7. If the file to be merged is not binary and is not a symlink, then
internal ":merge" is used.
8. Otherwise, ":prompt" is used.
For historical reason, Mercurial treats merge tools as below while
examining rules above.
step specified via binary symlink
----------------------------------
1. --tool o/o o/o
2. HGMERGE o/o o/o
3. merge-patterns o/o(*) x/?(*)
4. ui.merge x/?(*) x/?(*)
Each capability column indicates Mercurial behavior for internal/external
merge tools at examining each rule.
- "o": "assume that a tool has capability"
- "x": "assume that a tool does not have capability"
- "?": "check actual capability of a tool"
If "merge.strict-capability-check" configuration is true, Mercurial checks
capabilities of merge tools strictly in (*) cases above (= each capability
column becomes "?/?"). It is false by default for backward compatibility.
Note:
After selecting a merge program, Mercurial will by default attempt to
merge the files using a simple merge algorithm first. Only if it
doesn't succeed because of conflicting changes will Mercurial actually
execute the merge program. Whether to use the simple merge algorithm
first can be controlled by the premerge setting of the merge tool.
Premerge is enabled by default unless the file is binary or a symlink.
See the merge-tools and ui sections of hgrc(5) for details on the
configuration of merge tools.
Compression engines listed in `hg help bundlespec`
$ hg help bundlespec | grep gzip
"v1" bundles can only use the "gzip", "bzip2", and "none" compression
An algorithm that produces smaller bundles than "gzip".
This engine will likely produce smaller bundles than "gzip" but will be
"gzip"
better compression than "gzip". It also frequently yields better (?)
Test usage of section marks in help documents
$ cd "$TESTDIR"/../doc
$ "$PYTHON" check-seclevel.py
$ cd $TESTTMP
#if serve
Test the help pages in hgweb.
Dish up an empty repo; serve it cold.
$ hg init "$TESTTMP/test"
$ hg serve -R "$TESTTMP/test" -n test -p $HGPORT -d --pid-file=hg.pid
$ cat hg.pid >> $DAEMON_PIDS
$ get-with-headers.py $LOCALIP:$HGPORT "help"
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
<title>Help: Index</title>
</head>
<body>
<div class="container">
<div class="menu">
<div class="logo">
<a href="https://mercurial-scm.org/">
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
<li><a href="/shortlog">log</a></li>
<li><a href="/graph">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
<li class="active">help</li>
</ul>
</div>
<div class="main">
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
<form class="search" action="/log">
<p><input name="rev" id="search1" type="text" size="30" value="" /></p>
<div id="hint">Find changesets by keywords (author, files, the commit message), revision
number or hash, or <a href="/help/revsets">revset expression</a>.</div>
</form>
<table class="bigtable">
<tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
<tr><td>
<a href="/help/bundlespec">
bundlespec
</a>
</td><td>
Bundle File Formats
</td></tr>
<tr><td>
<a href="/help/color">
color
</a>
</td><td>
Colorizing Outputs
</td></tr>
<tr><td>
<a href="/help/config">
config
</a>
</td><td>
Configuration Files
</td></tr>
<tr><td>
<a href="/help/dates">
dates
</a>
</td><td>
Date Formats
</td></tr>
<tr><td>
<a href="/help/deprecated">
deprecated
</a>
</td><td>
Deprecated Features
</td></tr>
<tr><td>
<a href="/help/diffs">
diffs
</a>
</td><td>
Diff Formats
</td></tr>
<tr><td>
<a href="/help/environment">
environment
</a>
</td><td>
Environment Variables
</td></tr>
<tr><td>
<a href="/help/extensions">
extensions
</a>
</td><td>
Using Additional Features
</td></tr>
<tr><td>
<a href="/help/filesets">
filesets
</a>
</td><td>
Specifying File Sets
</td></tr>
<tr><td>
<a href="/help/flags">
flags
</a>
</td><td>
Command-line flags
</td></tr>
<tr><td>
<a href="/help/glossary">
glossary
</a>
</td><td>
Glossary
</td></tr>
<tr><td>
<a href="/help/hgignore">
hgignore
</a>
</td><td>
Syntax for Mercurial Ignore Files
</td></tr>
<tr><td>
<a href="/help/hgweb">
hgweb
</a>
</td><td>
Configuring hgweb
</td></tr>
<tr><td>
<a href="/help/internals">
internals
</a>
</td><td>
Technical implementation topics
</td></tr>
<tr><td>
<a href="/help/merge-tools">
merge-tools
</a>
</td><td>
Merge Tools
</td></tr>
<tr><td>
<a href="/help/pager">
pager
</a>
</td><td>
Pager Support
</td></tr>
<tr><td>
<a href="/help/patterns">
patterns
</a>
</td><td>
File Name Patterns
</td></tr>
<tr><td>
<a href="/help/phases">
phases
</a>
</td><td>
Working with Phases
</td></tr>
<tr><td>
<a href="/help/revisions">
revisions
</a>
</td><td>
Specifying Revisions
</td></tr>
<tr><td>
<a href="/help/scripting">
scripting
</a>
</td><td>
Using Mercurial from scripts and automation
</td></tr>
<tr><td>
<a href="/help/subrepos">
subrepos
</a>
</td><td>
Subrepositories
</td></tr>
<tr><td>
<a href="/help/templating">
templating
</a>
</td><td>
Template Usage
</td></tr>
<tr><td>
<a href="/help/urls">
urls
</a>
</td><td>
URL Paths
</td></tr>
<tr><td>
<a href="/help/topic-containing-verbose">
topic-containing-verbose
</a>
</td><td>
This is the topic to test omit indicating.
</td></tr>
<tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
<tr><td>
<a href="/help/abort">
abort
</a>
</td><td>
abort an unfinished operation (EXPERIMENTAL)
</td></tr>
<tr><td>
<a href="/help/add">
add
</a>
</td><td>
add the specified files on the next commit
</td></tr>
<tr><td>
<a href="/help/annotate">
annotate
</a>
</td><td>
show changeset information by line for each file
</td></tr>
<tr><td>
<a href="/help/clone">
clone
</a>
</td><td>
make a copy of an existing repository
</td></tr>
<tr><td>
<a href="/help/commit">
commit
</a>
</td><td>
commit the specified files or all outstanding changes
</td></tr>
<tr><td>
<a href="/help/continue">
continue
</a>
</td><td>
resumes an interrupted operation (EXPERIMENTAL)
</td></tr>
<tr><td>
<a href="/help/diff">
diff
</a>
</td><td>
diff repository (or selected files)
</td></tr>
<tr><td>
<a href="/help/export">
export
</a>
</td><td>
dump the header and diffs for one or more changesets
</td></tr>
<tr><td>
<a href="/help/forget">
forget
</a>
</td><td>
forget the specified files on the next commit
</td></tr>
<tr><td>
<a href="/help/init">
init
</a>
</td><td>
create a new repository in the given directory
</td></tr>
<tr><td>
<a href="/help/log">
log
</a>
</td><td>
show revision history of entire repository or files
</td></tr>
<tr><td>
<a href="/help/merge">
merge
</a>
</td><td>
merge another revision into working directory
</td></tr>
<tr><td>
<a href="/help/pull">
pull
</a>
</td><td>
pull changes from the specified source
</td></tr>
<tr><td>
<a href="/help/push">
push
</a>
</td><td>
push changes to the specified destination
</td></tr>
<tr><td>
<a href="/help/remove">
remove
</a>
</td><td>
remove the specified files on the next commit
</td></tr>
<tr><td>
<a href="/help/serve">
serve
</a>
</td><td>
start stand-alone webserver
</td></tr>
<tr><td>
<a href="/help/status">
status
</a>
</td><td>
show changed files in the working directory
</td></tr>
<tr><td>
<a href="/help/summary">
summary
</a>
</td><td>
summarize working directory state
</td></tr>
<tr><td>
<a href="/help/update">
update
</a>
</td><td>
update working directory (or switch revisions)
</td></tr>
<tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
<tr><td>
<a href="/help/addremove">
addremove
</a>
</td><td>
add all new files, delete all missing files
</td></tr>
<tr><td>
<a href="/help/archive">
archive
</a>
</td><td>
create an unversioned archive of a repository revision
</td></tr>
<tr><td>
<a href="/help/backout">
backout
</a>
</td><td>
reverse effect of earlier changeset
</td></tr>
<tr><td>
<a href="/help/bisect">
bisect
</a>
</td><td>
subdivision search of changesets
</td></tr>
<tr><td>
<a href="/help/bookmarks">
bookmarks
</a>
</td><td>
create a new bookmark or list existing bookmarks
</td></tr>
<tr><td>
<a href="/help/branch">
branch
</a>
</td><td>
set or show the current branch name
</td></tr>
<tr><td>
<a href="/help/branches">
branches
</a>
</td><td>
list repository named branches
</td></tr>
<tr><td>
<a href="/help/bundle">
bundle
</a>
</td><td>
create a bundle file
</td></tr>
<tr><td>
<a href="/help/cat">
cat
</a>
</td><td>
output the current or given revision of files
</td></tr>
<tr><td>
<a href="/help/config">
config
</a>
</td><td>
show combined config settings from all hgrc files
</td></tr>
<tr><td>
<a href="/help/copy">
copy
</a>
</td><td>
mark files as copied for the next commit
</td></tr>
<tr><td>
<a href="/help/files">
files
</a>
</td><td>
list tracked files
</td></tr>
<tr><td>
<a href="/help/graft">
graft
</a>
</td><td>
copy changes from other branches onto the current branch
</td></tr>
<tr><td>
<a href="/help/grep">
grep
</a>
</td><td>
search for a pattern in specified files
</td></tr>
<tr><td>
<a href="/help/hashelp">
hashelp
</a>
</td><td>
Extension command's help
</td></tr>
<tr><td>
<a href="/help/heads">
heads
</a>
</td><td>
show branch heads
</td></tr>
<tr><td>
<a href="/help/help">
help
</a>
</td><td>
show help for a given topic or a help overview
</td></tr>
<tr><td>
<a href="/help/hgalias">
hgalias
</a>
</td><td>
My doc
</td></tr>
<tr><td>
<a href="/help/hgaliasnodoc">
hgaliasnodoc
</a>
</td><td>
summarize working directory state
</td></tr>
<tr><td>
<a href="/help/identify">
identify
</a>
</td><td>
identify the working directory or specified revision
</td></tr>
<tr><td>
<a href="/help/import">
import
</a>
</td><td>
import an ordered set of patches
</td></tr>
<tr><td>
<a href="/help/incoming">
incoming
</a>
</td><td>
show new changesets found in source
</td></tr>
<tr><td>
<a href="/help/manifest">
manifest
</a>
</td><td>
output the current or given revision of the project manifest
</td></tr>
<tr><td>
<a href="/help/nohelp">
nohelp
</a>
</td><td>
(no help text available)
</td></tr>
<tr><td>
<a href="/help/outgoing">
outgoing
</a>
</td><td>
show changesets not found in the destination
</td></tr>
<tr><td>
<a href="/help/paths">
paths
</a>
</td><td>
show aliases for remote repositories
</td></tr>
<tr><td>
<a href="/help/phase">
phase
</a>
</td><td>
set or show the current phase name
</td></tr>
<tr><td>
<a href="/help/recover">
recover
</a>
</td><td>
roll back an interrupted transaction
</td></tr>
<tr><td>
<a href="/help/rename">
rename
</a>
</td><td>
rename files; equivalent of copy + remove
</td></tr>
<tr><td>
<a href="/help/resolve">
resolve
</a>
</td><td>
redo merges or set/view the merge status of files
</td></tr>
<tr><td>
<a href="/help/revert">
revert
</a>
</td><td>
restore files to their checkout state
</td></tr>
<tr><td>
<a href="/help/root">
root
</a>
</td><td>
print the root (top) of the current working directory
</td></tr>
<tr><td>
<a href="/help/shellalias">
shellalias
</a>
</td><td>
(no help text available)
</td></tr>
<tr><td>
<a href="/help/shelve">
shelve
</a>
</td><td>
save and set aside changes from the working directory
</td></tr>
<tr><td>
<a href="/help/tag">
tag
</a>
</td><td>
add one or more tags for the current or given revision
</td></tr>
<tr><td>
<a href="/help/tags">
tags
</a>
</td><td>
list repository tags
</td></tr>
<tr><td>
<a href="/help/unbundle">
unbundle
</a>
</td><td>
apply one or more bundle files
</td></tr>
<tr><td>
<a href="/help/unshelve">
unshelve
</a>
</td><td>
restore a shelved change to the working directory
</td></tr>
<tr><td>
<a href="/help/verify">
verify
</a>
</td><td>
verify the integrity of the repository
</td></tr>
<tr><td>
<a href="/help/version">
version
</a>
</td><td>
output version and copyright information
</td></tr>
</table>
</div>
</div>
</body>
</html>
$ get-with-headers.py $LOCALIP:$HGPORT "help/add"
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
<title>Help: add</title>
</head>
<body>
<div class="container">
<div class="menu">
<div class="logo">
<a href="https://mercurial-scm.org/">
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
<li><a href="/shortlog">log</a></li>
<li><a href="/graph">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
<li class="active"><a href="/help">help</a></li>
</ul>
</div>
<div class="main">
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
<h3>Help: add</h3>
<form class="search" action="/log">
<p><input name="rev" id="search1" type="text" size="30" value="" /></p>
<div id="hint">Find changesets by keywords (author, files, the commit message), revision
number or hash, or <a href="/help/revsets">revset expression</a>.</div>
</form>
<div id="doc">
<p>
hg add [OPTION]... [FILE]...
</p>
<p>
add the specified files on the next commit
</p>
<p>
Schedule files to be version controlled and added to the
repository.
</p>
<p>
The files will be added to the repository at the next commit. To
undo an add before that, see 'hg forget'.
</p>
<p>
If no names are given, add all files to the repository (except
files matching ".hgignore").
</p>
<p>
Examples:
</p>
<ul>
<li> New (unknown) files are added automatically by 'hg add':
<pre>
\$ ls (re)
foo.c
\$ hg status (re)
? foo.c
\$ hg add (re)
adding foo.c
\$ hg status (re)
A foo.c
</pre>
<li> Specific files to be added can be specified:
<pre>
\$ ls (re)
bar.c foo.c
\$ hg status (re)
? bar.c
? foo.c
\$ hg add bar.c (re)
\$ hg status (re)
A bar.c
? foo.c
</pre>
</ul>
<p>
Returns 0 if all files are successfully added.
</p>
<p>
options ([+] can be repeated):
</p>
<table>
<tr><td>-I</td>
<td>--include PATTERN [+]</td>
<td>include names matching the given patterns</td></tr>
<tr><td>-X</td>
<td>--exclude PATTERN [+]</td>
<td>exclude names matching the given patterns</td></tr>
<tr><td>-S</td>
<td>--subrepos</td>
<td>recurse into subrepositories</td></tr>
<tr><td>-n</td>
<td>--dry-run</td>
<td>do not perform actions, just print output</td></tr>
</table>
<p>
global options ([+] can be repeated):
</p>
<table>
<tr><td>-R</td>
<td>--repository REPO</td>
<td>repository root directory or name of overlay bundle file</td></tr>
<tr><td></td>
<td>--cwd DIR</td>
<td>change working directory</td></tr>
<tr><td>-y</td>
<td>--noninteractive</td>
<td>do not prompt, automatically pick the first choice for all prompts</td></tr>
<tr><td>-q</td>
<td>--quiet</td>
<td>suppress output</td></tr>
<tr><td>-v</td>
<td>--verbose</td>
<td>enable additional output</td></tr>
<tr><td></td>
<td>--color TYPE</td>
<td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
<tr><td></td>
<td>--config CONFIG [+]</td>
<td>set/override config option (use 'section.name=value')</td></tr>
<tr><td></td>
<td>--debug</td>
<td>enable debugging output</td></tr>
<tr><td></td>
<td>--debugger</td>
<td>start debugger</td></tr>
<tr><td></td>
<td>--encoding ENCODE</td>
<td>set the charset encoding (default: ascii)</td></tr>
<tr><td></td>
<td>--encodingmode MODE</td>
<td>set the charset encoding mode (default: strict)</td></tr>
<tr><td></td>
<td>--traceback</td>
<td>always print a traceback on exception</td></tr>
<tr><td></td>
<td>--time</td>
<td>time how long the command takes</td></tr>
<tr><td></td>
<td>--profile</td>
<td>print command execution profile</td></tr>
<tr><td></td>
<td>--version</td>
<td>output version information and exit</td></tr>
<tr><td>-h</td>
<td>--help</td>
<td>display help and exit</td></tr>
<tr><td></td>
<td>--hidden</td>
<td>consider hidden changesets</td></tr>
<tr><td></td>
<td>--pager TYPE</td>
<td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
</table>
</div>
</div>
</div>
</body>
</html>
$ get-with-headers.py $LOCALIP:$HGPORT "help/remove"
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
<title>Help: remove</title>
</head>
<body>
<div class="container">
<div class="menu">
<div class="logo">
<a href="https://mercurial-scm.org/">
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
<li><a href="/shortlog">log</a></li>
<li><a href="/graph">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
<li class="active"><a href="/help">help</a></li>
</ul>
</div>
<div class="main">
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
<h3>Help: remove</h3>
<form class="search" action="/log">
<p><input name="rev" id="search1" type="text" size="30" value="" /></p>
<div id="hint">Find changesets by keywords (author, files, the commit message), revision
number or hash, or <a href="/help/revsets">revset expression</a>.</div>
</form>
<div id="doc">
<p>
hg remove [OPTION]... FILE...
</p>
<p>
aliases: rm
</p>
<p>
remove the specified files on the next commit
</p>
<p>
Schedule the indicated files for removal from the current branch.
</p>
<p>
This command schedules the files to be removed at the next commit.
To undo a remove before that, see 'hg revert'. To undo added
files, see 'hg forget'.
</p>
<p>
-A/--after can be used to remove only files that have already
been deleted, -f/--force can be used to force deletion, and -Af
can be used to remove files from the next revision without
deleting them from the working directory.
</p>
<p>
The following table details the behavior of remove for different
file states (columns) and option combinations (rows). The file
states are Added [A], Clean [C], Modified [M] and Missing [!]
(as reported by 'hg status'). The actions are Warn, Remove
(from branch) and Delete (from disk):
</p>
<table>
<tr><td>opt/state</td>
<td>A</td>
<td>C</td>
<td>M</td>
<td>!</td></tr>
<tr><td>none</td>
<td>W</td>
<td>RD</td>
<td>W</td>
<td>R</td></tr>
<tr><td>-f</td>
<td>R</td>
<td>RD</td>
<td>RD</td>
<td>R</td></tr>
<tr><td>-A</td>
<td>W</td>
<td>W</td>
<td>W</td>
<td>R</td></tr>
<tr><td>-Af</td>
<td>R</td>
<td>R</td>
<td>R</td>
<td>R</td></tr>
</table>
<p>
<b>Note:</b>
</p>
<p>
'hg remove' never deletes files in Added [A] state from the
working directory, not even if "--force" is specified.
</p>
<p>
Returns 0 on success, 1 if any warnings encountered.
</p>
<p>
options ([+] can be repeated):
</p>
<table>
<tr><td>-A</td>
<td>--after</td>
<td>record delete for missing files</td></tr>
<tr><td>-f</td>
<td>--force</td>
<td>forget added files, delete modified files</td></tr>
<tr><td>-S</td>
<td>--subrepos</td>
<td>recurse into subrepositories</td></tr>
<tr><td>-I</td>
<td>--include PATTERN [+]</td>
<td>include names matching the given patterns</td></tr>
<tr><td>-X</td>
<td>--exclude PATTERN [+]</td>
<td>exclude names matching the given patterns</td></tr>
<tr><td>-n</td>
<td>--dry-run</td>
<td>do not perform actions, just print output</td></tr>
</table>
<p>
global options ([+] can be repeated):
</p>
<table>
<tr><td>-R</td>
<td>--repository REPO</td>
<td>repository root directory or name of overlay bundle file</td></tr>
<tr><td></td>
<td>--cwd DIR</td>
<td>change working directory</td></tr>
<tr><td>-y</td>
<td>--noninteractive</td>
<td>do not prompt, automatically pick the first choice for all prompts</td></tr>
<tr><td>-q</td>
<td>--quiet</td>
<td>suppress output</td></tr>
<tr><td>-v</td>
<td>--verbose</td>
<td>enable additional output</td></tr>
<tr><td></td>
<td>--color TYPE</td>
<td>when to colorize (boolean, always, auto, never, or debug)</td></tr>
<tr><td></td>
<td>--config CONFIG [+]</td>
<td>set/override config option (use 'section.name=value')</td></tr>
<tr><td></td>
<td>--debug</td>
<td>enable debugging output</td></tr>
<tr><td></td>
<td>--debugger</td>
<td>start debugger</td></tr>
<tr><td></td>
<td>--encoding ENCODE</td>
<td>set the charset encoding (default: ascii)</td></tr>
<tr><td></td>
<td>--encodingmode MODE</td>
<td>set the charset encoding mode (default: strict)</td></tr>
<tr><td></td>
<td>--traceback</td>
<td>always print a traceback on exception</td></tr>
<tr><td></td>
<td>--time</td>
<td>time how long the command takes</td></tr>
<tr><td></td>
<td>--profile</td>
<td>print command execution profile</td></tr>
<tr><td></td>
<td>--version</td>
<td>output version information and exit</td></tr>
<tr><td>-h</td>
<td>--help</td>
<td>display help and exit</td></tr>
<tr><td></td>
<td>--hidden</td>
<td>consider hidden changesets</td></tr>
<tr><td></td>
<td>--pager TYPE</td>
<td>when to paginate (boolean, always, auto, or never) (default: auto)</td></tr>
</table>
</div>
</div>
</div>
</body>
</html>
$ get-with-headers.py $LOCALIP:$HGPORT "help/dates"
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
<title>Help: dates</title>
</head>
<body>
<div class="container">
<div class="menu">
<div class="logo">
<a href="https://mercurial-scm.org/">
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
<li><a href="/shortlog">log</a></li>
<li><a href="/graph">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
<li class="active"><a href="/help">help</a></li>
</ul>
</div>
<div class="main">
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
<h3>Help: dates</h3>
<form class="search" action="/log">
<p><input name="rev" id="search1" type="text" size="30" value="" /></p>
<div id="hint">Find changesets by keywords (author, files, the commit message), revision
number or hash, or <a href="/help/revsets">revset expression</a>.</div>
</form>
<div id="doc">
<h1>Date Formats</h1>
<p>
Some commands allow the user to specify a date, e.g.:
</p>
<ul>
<li> backout, commit, import, tag: Specify the commit date.
<li> log, revert, update: Select revision(s) by date.
</ul>
<p>
Many date formats are valid. Here are some examples:
</p>
<ul>
<li> "Wed Dec 6 13:18:29 2006" (local timezone assumed)
<li> "Dec 6 13:18 -0600" (year assumed, time offset provided)
<li> "Dec 6 13:18 UTC" (UTC and GMT are aliases for +0000)
<li> "Dec 6" (midnight)
<li> "13:18" (today assumed)
<li> "3:39" (3:39AM assumed)
<li> "3:39pm" (15:39)
<li> "2006-12-06 13:18:29" (ISO 8601 format)
<li> "2006-12-6 13:18"
<li> "2006-12-6"
<li> "12-6"
<li> "12/6"
<li> "12/6/6" (Dec 6 2006)
<li> "today" (midnight)
<li> "yesterday" (midnight)
<li> "now" - right now
</ul>
<p>
Lastly, there is Mercurial's internal format:
</p>
<ul>
<li> "1165411109 0" (Wed Dec 6 13:18:29 2006 UTC)
</ul>
<p>
This is the internal representation format for dates. The first number
is the number of seconds since the epoch (1970-01-01 00:00 UTC). The
second is the offset of the local timezone, in seconds west of UTC
(negative if the timezone is east of UTC).
</p>
<p>
The log command also accepts date ranges:
</p>
<ul>
<li> "<DATE" - at or before a given date/time
<li> ">DATE" - on or after a given date/time
<li> "DATE to DATE" - a date range, inclusive
<li> "-DAYS" - within a given number of days of today
</ul>
</div>
</div>
</div>
</body>
</html>
$ get-with-headers.py $LOCALIP:$HGPORT "help/pager"
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
<title>Help: pager</title>
</head>
<body>
<div class="container">
<div class="menu">
<div class="logo">
<a href="https://mercurial-scm.org/">
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
<li><a href="/shortlog">log</a></li>
<li><a href="/graph">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
<li class="active"><a href="/help">help</a></li>
</ul>
</div>
<div class="main">
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
<h3>Help: pager</h3>
<form class="search" action="/log">
<p><input name="rev" id="search1" type="text" size="30" value="" /></p>
<div id="hint">Find changesets by keywords (author, files, the commit message), revision
number or hash, or <a href="/help/revsets">revset expression</a>.</div>
</form>
<div id="doc">
<h1>Pager Support</h1>
<p>
Some Mercurial commands can produce a lot of output, and Mercurial will
attempt to use a pager to make those commands more pleasant.
</p>
<p>
To set the pager that should be used, set the application variable:
</p>
<pre>
[pager]
pager = less -FRX
</pre>
<p>
If no pager is set in the user or repository configuration, Mercurial uses the
environment variable $PAGER. If $PAGER is not set, pager.pager from the default
or system configuration is used. If none of these are set, a default pager will
be used, typically 'less' on Unix and 'more' on Windows.
</p>
<p>
You can disable the pager for certain commands by adding them to the
pager.ignore list:
</p>
<pre>
[pager]
ignore = version, help, update
</pre>
<p>
To ignore global commands like 'hg version' or 'hg help', you have
to specify them in your user configuration file.
</p>
<p>
To control whether the pager is used at all for an individual command,
you can use --pager=<value>:
</p>
<ul>
<li> use as needed: 'auto'.
<li> require the pager: 'yes' or 'on'.
<li> suppress the pager: 'no' or 'off' (any unrecognized value will also work).
</ul>
<p>
To globally turn off all attempts to use a pager, set:
</p>
<pre>
[ui]
paginate = never
</pre>
<p>
which will prevent the pager from running.
</p>
</div>
</div>
</div>
</body>
</html>
Sub-topic indexes rendered properly
$ get-with-headers.py $LOCALIP:$HGPORT "help/internals"
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
<title>Help: internals</title>
</head>
<body>
<div class="container">
<div class="menu">
<div class="logo">
<a href="https://mercurial-scm.org/">
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
<li><a href="/shortlog">log</a></li>
<li><a href="/graph">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
<li><a href="/help">help</a></li>
</ul>
</div>
<div class="main">
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
<form class="search" action="/log">
<p><input name="rev" id="search1" type="text" size="30" value="" /></p>
<div id="hint">Find changesets by keywords (author, files, the commit message), revision
number or hash, or <a href="/help/revsets">revset expression</a>.</div>
</form>
<table class="bigtable">
<tr><td colspan="2"><h2><a name="topics" href="#topics">Topics</a></h2></td></tr>
<tr><td>
<a href="/help/internals.bid-merge">
bid-merge
</a>
</td><td>
Bid Merge Algorithm
</td></tr>
<tr><td>
<a href="/help/internals.bundle2">
bundle2
</a>
</td><td>
Bundle2
</td></tr>
<tr><td>
<a href="/help/internals.bundles">
bundles
</a>
</td><td>
Bundles
</td></tr>
<tr><td>
<a href="/help/internals.cbor">
cbor
</a>
</td><td>
CBOR
</td></tr>
<tr><td>
<a href="/help/internals.censor">
censor
</a>
</td><td>
Censor
</td></tr>
<tr><td>
<a href="/help/internals.changegroups">
changegroups
</a>
</td><td>
Changegroups
</td></tr>
<tr><td>
<a href="/help/internals.config">
config
</a>
</td><td>
Config Registrar
</td></tr>
<tr><td>
<a href="/help/internals.extensions">
extensions
</a>
</td><td>
Extension API
</td></tr>
<tr><td>
<a href="/help/internals.mergestate">
mergestate
</a>
</td><td>
Mergestate
</td></tr>
<tr><td>
<a href="/help/internals.requirements">
requirements
</a>
</td><td>
Repository Requirements
</td></tr>
<tr><td>
<a href="/help/internals.revlogs">
revlogs
</a>
</td><td>
Revision Logs
</td></tr>
<tr><td>
<a href="/help/internals.wireprotocol">
wireprotocol
</a>
</td><td>
Wire Protocol
</td></tr>
<tr><td>
<a href="/help/internals.wireprotocolrpc">
wireprotocolrpc
</a>
</td><td>
Wire Protocol RPC
</td></tr>
<tr><td>
<a href="/help/internals.wireprotocolv2">
wireprotocolv2
</a>
</td><td>
Wire Protocol Version 2
</td></tr>
</table>
</div>
</div>
</body>
</html>
Sub-topic topics rendered properly
$ get-with-headers.py $LOCALIP:$HGPORT "help/internals.changegroups"
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
<title>Help: internals.changegroups</title>
</head>
<body>
<div class="container">
<div class="menu">
<div class="logo">
<a href="https://mercurial-scm.org/">
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
<li><a href="/shortlog">log</a></li>
<li><a href="/graph">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
<li class="active"><a href="/help">help</a></li>
</ul>
</div>
<div class="main">
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
<h3>Help: internals.changegroups</h3>
<form class="search" action="/log">
<p><input name="rev" id="search1" type="text" size="30" value="" /></p>
<div id="hint">Find changesets by keywords (author, files, the commit message), revision
number or hash, or <a href="/help/revsets">revset expression</a>.</div>
</form>
<div id="doc">
<h1>Changegroups</h1>
<p>
Changegroups are representations of repository revlog data, specifically
the changelog data, root/flat manifest data, treemanifest data, and
filelogs.
</p>
<p>
There are 3 versions of changegroups: "1", "2", and "3". From a
high-level, versions "1" and "2" are almost exactly the same, with the
only difference being an additional item in the *delta header*. Version
"3" adds support for storage flags in the *delta header* and optionally
exchanging treemanifests (enabled by setting an option on the
"changegroup" part in the bundle2).
</p>
<p>
Changegroups when not exchanging treemanifests consist of 3 logical
segments:
</p>
<pre>
+---------------------------------+
| | | |
| changeset | manifest | filelogs |
| | | |
| | | |
+---------------------------------+
</pre>
<p>
When exchanging treemanifests, there are 4 logical segments:
</p>
<pre>
+-------------------------------------------------+
| | | | |
| changeset | root | treemanifests | filelogs |
| | manifest | | |
| | | | |
+-------------------------------------------------+
</pre>
<p>
The principle building block of each segment is a *chunk*. A *chunk*
is a framed piece of data:
</p>
<pre>
+---------------------------------------+
| | |
| length | data |
| (4 bytes) | (<length - 4> bytes) |
| | |
+---------------------------------------+
</pre>
<p>
All integers are big-endian signed integers. Each chunk starts with a 32-bit
integer indicating the length of the entire chunk (including the length field
itself).
</p>
<p>
There is a special case chunk that has a value of 0 for the length
("0x00000000"). We call this an *empty chunk*.
</p>
<h2>Delta Groups</h2>
<p>
A *delta group* expresses the content of a revlog as a series of deltas,
or patches against previous revisions.
</p>
<p>
Delta groups consist of 0 or more *chunks* followed by the *empty chunk*
to signal the end of the delta group:
</p>
<pre>
+------------------------------------------------------------------------+
| | | | | |
| chunk0 length | chunk0 data | chunk1 length | chunk1 data | 0x0 |
| (4 bytes) | (various) | (4 bytes) | (various) | (4 bytes) |
| | | | | |
+------------------------------------------------------------------------+
</pre>
<p>
Each *chunk*'s data consists of the following:
</p>
<pre>
+---------------------------------------+
| | |
| delta header | delta data |
| (various by version) | (various) |
| | |
+---------------------------------------+
</pre>
<p>
The *delta data* is a series of *delta*s that describe a diff from an existing
entry (either that the recipient already has, or previously specified in the
bundle/changegroup).
</p>
<p>
The *delta header* is different between versions "1", "2", and
"3" of the changegroup format.
</p>
<p>
Version 1 (headerlen=80):
</p>
<pre>
+------------------------------------------------------+
| | | | |
| node | p1 node | p2 node | link node |
| (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
| | | | |
+------------------------------------------------------+
</pre>
<p>
Version 2 (headerlen=100):
</p>
<pre>
+------------------------------------------------------------------+
| | | | | |
| node | p1 node | p2 node | base node | link node |
| (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) |
| | | | | |
+------------------------------------------------------------------+
</pre>
<p>
Version 3 (headerlen=102):
</p>
<pre>
+------------------------------------------------------------------------------+
| | | | | | |
| node | p1 node | p2 node | base node | link node | flags |
| (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (20 bytes) | (2 bytes) |
| | | | | | |
+------------------------------------------------------------------------------+
</pre>
<p>
The *delta data* consists of "chunklen - 4 - headerlen" bytes, which contain a
series of *delta*s, densely packed (no separators). These deltas describe a diff
from an existing entry (either that the recipient already has, or previously
specified in the bundle/changegroup). The format is described more fully in
"hg help internals.bdiff", but briefly:
</p>
<pre>
+---------------------------------------------------------------+
| | | | |
| start offset | end offset | new length | content |
| (4 bytes) | (4 bytes) | (4 bytes) | (<new length> bytes) |
| | | | |
+---------------------------------------------------------------+
</pre>
<p>
Please note that the length field in the delta data does *not* include itself.
</p>
<p>
In version 1, the delta is always applied against the previous node from
the changegroup or the first parent if this is the first entry in the
changegroup.
</p>
<p>
In version 2 and up, the delta base node is encoded in the entry in the
changegroup. This allows the delta to be expressed against any parent,
which can result in smaller deltas and more efficient encoding of data.
</p>
<p>
The *flags* field holds bitwise flags affecting the processing of revision
data. The following flags are defined:
</p>
<dl>
<dt>32768
<dd>Censored revision. The revision's fulltext has been replaced by censor metadata. May only occur on file revisions.
<dt>16384
<dd>Ellipsis revision. Revision hash does not match data (likely due to rewritten parents).
<dt>8192
<dd>Externally stored. The revision fulltext contains "key:value" "\n" delimited metadata defining an object stored elsewhere. Used by the LFS extension.
</dl>
<p>
For historical reasons, the integer values are identical to revlog version 1
per-revision storage flags and correspond to bits being set in this 2-byte
field. Bits were allocated starting from the most-significant bit, hence the
reverse ordering and allocation of these flags.
</p>
<h2>Changeset Segment</h2>
<p>
The *changeset segment* consists of a single *delta group* holding
changelog data. The *empty chunk* at the end of the *delta group* denotes
the boundary to the *manifest segment*.
</p>
<h2>Manifest Segment</h2>
<p>
The *manifest segment* consists of a single *delta group* holding manifest
data. If treemanifests are in use, it contains only the manifest for the
root directory of the repository. Otherwise, it contains the entire
manifest data. The *empty chunk* at the end of the *delta group* denotes
the boundary to the next segment (either the *treemanifests segment* or the
*filelogs segment*, depending on version and the request options).
</p>
<h3>Treemanifests Segment</h3>
<p>
The *treemanifests segment* only exists in changegroup version "3", and
only if the 'treemanifest' param is part of the bundle2 changegroup part
(it is not possible to use changegroup version 3 outside of bundle2).
Aside from the filenames in the *treemanifests segment* containing a
trailing "/" character, it behaves identically to the *filelogs segment*
(see below). The final sub-segment is followed by an *empty chunk* (logically,
a sub-segment with filename size 0). This denotes the boundary to the
*filelogs segment*.
</p>
<h2>Filelogs Segment</h2>
<p>
The *filelogs segment* consists of multiple sub-segments, each
corresponding to an individual file whose data is being described:
</p>
<pre>
+--------------------------------------------------+
| | | | | |
| filelog0 | filelog1 | filelog2 | ... | 0x0 |
| | | | | (4 bytes) |
| | | | | |
+--------------------------------------------------+
</pre>
<p>
The final filelog sub-segment is followed by an *empty chunk* (logically,
a sub-segment with filename size 0). This denotes the end of the segment
and of the overall changegroup.
</p>
<p>
Each filelog sub-segment consists of the following:
</p>
<pre>
+------------------------------------------------------+
| | | |
| filename length | filename | delta group |
| (4 bytes) | (<length - 4> bytes) | (various) |
| | | |
+------------------------------------------------------+
</pre>
<p>
That is, a *chunk* consisting of the filename (not terminated or padded)
followed by N chunks constituting the *delta group* for this file. The
*empty chunk* at the end of each *delta group* denotes the boundary to the
next filelog sub-segment.
</p>
</div>
</div>
</div>
</body>
</html>
$ get-with-headers.py 127.0.0.1:$HGPORT "help/unknowntopic"
404 Not Found
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
<title>test: error</title>
</head>
<body>
<div class="container">
<div class="menu">
<div class="logo">
<a href="https://mercurial-scm.org/">
<img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
</div>
<ul>
<li><a href="/shortlog">log</a></li>
<li><a href="/graph">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
<li><a href="/help">help</a></li>
</ul>
</div>
<div class="main">
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
<h3>error</h3>
<form class="search" action="/log">
<p><input name="rev" id="search1" type="text" size="30" value="" /></p>
<div id="hint">Find changesets by keywords (author, files, the commit message), revision
number or hash, or <a href="/help/revsets">revset expression</a>.</div>
</form>
<div class="description">
<p>
An error occurred while processing your request:
</p>
<p>
Not Found
</p>
</div>
</div>
</div>
</body>
</html>
[1]
$ killdaemons.py
#endif
|