/usr/share/doc/monotone/html/Automation.html is in monotone-doc 1.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 | <html lang="en">
<head>
<title>Automation - monotone documentation</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="monotone documentation">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Command-Reference.html#Command-Reference" title="Command Reference">
<link rel="prev" href="Database.html#Database" title="Database">
<link rel="next" href="VCS.html#VCS" title="VCS">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
<link rel="stylesheet" type="text/css" href="texinfo.css">
</head>
<body>
<div class="node">
<a name="Automation"></a>
<p>
Next: <a rel="next" accesskey="n" href="VCS.html#VCS">VCS</a>,
Previous: <a rel="previous" accesskey="p" href="Database.html#Database">Database</a>,
Up: <a rel="up" accesskey="u" href="Command-Reference.html#Command-Reference">Command Reference</a>
<hr>
</div>
<h3 class="section">4.11 Automation</h3>
<p>This section contains subcommands of the <samp><span class="command">mtn automate</span></samp> command,
used for scripting monotone. All give output on <code>stdout</code>; they may
also give useful chatter on <code>stderr</code>, including warnings and error
messages.
<p>When run under <a href="mtn-automate-stdio.html#mtn-automate-stdio">mtn automate stdio</a>, there are five output streams
available; main, error, warning, progress, and ticker. When run under
<samp><span class="command">mtn automate</span></samp>, the main stream goes to stdout, and the error,
warning, progress, and ticker streams all go to stderr.
<p>Many commands produce output in a format called basic_io; for more
information, see <a href="Formats.html#Formats">Formats</a>.
<p>Revision arguments to automate commands must be hex ids, not
selectors.
<dl>
<a name="mtn-automate-ancestors"></a><dt><samp><span class="command">mtn automate ancestors </span><var>rev...</var></samp><a name="index-mtn-automate-ancestors-_0040var_007brev_002e_002e_002e_007d-192"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One or more revision IDs.
<br><dt><strong>Added in:</strong><dd>
0.2
<br><dt><strong>Purpose:</strong><dd>
Prints the ancestors of one or more revisions.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each giving the ID of one ancestor of the given
revisions. Each line consists of a revision ID, in hexadecimal,
followed by a newline. The lines are printed in alphabetically sorted
order.
<p>The output does not include the specified revisions, except if
one of them is an ancestor of another.
<br><dt><strong>Error conditions:</strong><dd>
If any of the revisions do not exist, prints nothing to stdout, prints
an error message to stderr, and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate ancestry_difference </span><var>new</var><span class="command"> [</span><var>old...</var><span class="command">]</span></samp><a name="index-mtn-automate-ancestry_005fdifference-_0040var_007bnew_007d-_005b_0040var_007bold_002e_002e_002e_007d_005d-193"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
A “new” revision ID <var>new</var>, followed by zero or more “old”
revision IDs <var>old...</var>.
<br><dt><strong>Added in:</strong><dd>
0.1
<br><dt><strong>Purpose:</strong><dd>
Prints all ancestors of the new revision, that are not also ancestors
of one of the old revisions. For purposes of this command,
“ancestor” is an inclusive term; each revision is an ancestor of
itself. For example, if <var>new</var> is an ancestor of any of
<var>old...</var>, <var>new</var> will not be printed; but if <var>new</var> is not
an ancestor of any of the “old” revisions, then it will be.
Similarly, none of <var>old...</var> will be printed.
<p>The reason for the names <var>new</var> and <var>old</var> is that if <var>new</var>
is a newer revision than <var>old...</var>, then this command tells you
which all revisions that are newer than <var>old...</var>, and are also
ancestors of <var>new</var>.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
A list of revision IDs, in hexadecimal, each followed by a newline.
Revisions are printed in topologically sorted order.
<br><dt><strong>Error conditions:</strong><dd>
If any of the revisions do not exist, prints nothing to stdout, prints
an error message to stderr, and exits with status 1.
</dl>
<p><a name="mtn-automate-branches"></a><br><dt><samp><span class="command">mtn automate branches</span></samp><a name="index-mtn-automate-branches-194"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
None.
<br><dt><strong>Added in:</strong><dd>
2.2
<br><dt><strong>Purpose:</strong><dd>
Prints all branch certs present in the revision graph, that are not
excluded by the Lua hook <code><a href="ignore_005fbranch.html#ignore_005fbranch">ignore_branch</a></code>.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> net.venge.monotone
net.venge.monotone.win32
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each the name of a branch. The lines are printed
in alphabetically sorted order.
<br><dt><strong>Error conditions:</strong><dd>
None.
</dl>
<br><dt><samp><span class="command">mtn automate cert </span><var>revision</var> <var>name</var> <var>value</var></samp><a name="index-mtn-automate-cert-_0040var_007brevision_007d-_0040var_007bname_007d-_0040var_007bvalue_007d-195"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
<var>revision</var> is an existing revision, <var>name</var> is the certificate name
and <var>value</var> its value.
<br><dt><strong>Added in:</strong><dd>
4.1
<br><dt><strong>Purpose:</strong><dd>
<samp><span class="command">automate</span></samp> variant of <samp><span class="command"><a href="mtn-cert.html#mtn-cert">mtn cert</a></span></samp>.
<br><dt><strong>Sample usage:</strong><dd>
<pre class="verbatim"> mtn automate cert 4c2c1d846fa561601254200918fba1fd71e6795d author tester@test.net
</pre>
<br><dt><strong>Output format:</strong><dd>
No output.
<br><dt><strong>Error conditions:</strong><dd>
If the revision is invalid prints an error message to stderr and
exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate certs </span><var>id</var></samp><a name="index-mtn-automate-certs-_0040var_007bid_007d-196"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
A revision ID <var>id</var>, for which any certificates will be printed.
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>11.0 – Keys are now listed by hash instead of name.
<li>1.0 – Added.
</ul>
<br><dt><strong>Purpose:</strong><dd>
Prints all certificates associated with the given revision ID.
Each certificate is contained in a basic IO stanza. For each certificate,
the following values are provided:
<pre class="verbatim"> 'key'
the hex-encoded hash of the key used to sign this certificate.
'signature'
a string indicating the status of the signature. Possible
values of this string are:
'ok' : the signature is correct
'bad' : the signature is invalid
'unknown' : signature was made with an unknown key
'name'
the name of this certificate
'value'
the value of this certificate
'trust'
is this certificate trusted by the defined trust metric?
Possible values of this string are:
'trusted' : this certificate is trusted
'untrusted' : this certificate is not trusted
</pre>
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> key [5cd3b3a7ad2e8645e8887af193ee522dc59112e4]
signature "ok"
name "author"
value "emile@alumni.reed.edu"
trust "trusted"
key [5cd3b3a7ad2e8645e8887af193ee522dc59112e4]
signature "ok"
name "branch"
value "net.venge.monotone"
trust "trusted"
key [5cd3b3a7ad2e8645e8887af193ee522dc59112e4]
signature "ok"
name "changelog"
value "propagate from branch 'net.venge.monotone.annotate' (head 76a886ef7c8ae12a4bba5fc2bd252557bf863aff)
to branch 'net.venge.monotone' (head 2490479a4e4e99243fead6d627d78291fde592f0)
"
trust "trusted"
key [5cd3b3a7ad2e8645e8887af193ee522dc59112e4]
signature "ok"
name "date"
value "2005-05-20T20:19:25"
trust "trusted"
</pre>
<br><dt><strong>Output format:</strong><dd>
All stanzas are formatted by basic_io. Stanzas are separated
by a blank line. Values will be escaped, '\' to '\\' and
'"' to '\"'.
<br><dt><strong>Error conditions:</strong><dd>
If a certificate is signed with an unknown public key, a warning
message is printed to stderr. If the revision specified is unknown or
invalid prints an error message to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate checkout [--[no-]move-conflicting-paths] [--revision=</span><var>id</var><span class="command">] [--branch=</span><var>branchname</var><span class="command">] </span><var>directory</var></samp><a name="index-mtn-automate-checkout-_005b_002d_002d_005bno_002d_005dmove_002dconflicting_002dpaths_005d-_005b_002d_002drevision_003d_0040var_007bid_007d_005d-_005b_002d_002dbranch_003d_0040var_007bbranchname_007d_005d-_0040var_007bdirectory_007d-197"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
Options and arguments are the same as <samp><span class="command"><a href="mtn-checkout.html#mtn-checkout">mtn checkout</a></span></samp>.
<br><dt><strong>Changes:</strong><dd>
13.0 – initial
<br><dt><strong>Purpose:</strong><dd>
Create a new workspace containing the given revision; see
<samp><span class="command"><a href="mtn-checkout.html#mtn-checkout">mtn checkout</a></span></samp>.
<br><dt><strong>Sample output:</strong><dd>
None.
<br><dt><strong>Output format:</strong><dd>
None.
<br><dt><strong>Error conditions:</strong><dd>
see <samp><span class="command"><a href="mtn-checkout.html#mtn-checkout">mtn checkout</a></span></samp>.
</dl>
<br><dt><samp><span class="command">mtn automate children </span><var>rev</var></samp><a name="index-mtn-automate-children-_0040var_007brev_007d-198"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One revision ID, <var>rev</var>.
<br><dt><strong>Added in:</strong><dd>
0.2
<br><dt><strong>Purpose:</strong><dd>
Prints the immediate children of a revision. This is like a
non-recursive version of <samp><span class="command"><a href="mtn-automate-descendents.html#mtn-automate-descendents">mtn automate descendents</a></span></samp>.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each giving the ID of one child of the given
revision. Each line consists of a revision ID, in hexadecimal,
followed by a newline. The lines are printed in alphabetically sorted
order.
<br><dt><strong>Error conditions:</strong><dd>
If the given revision <var>rev</var> does not exist, prints nothing to
stdout, prints an error message to stderr, and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate common_ancestors </span><var>rev...</var></samp><a name="index-mtn-automate-common_005fancestors-_0040var_007brev_002e_002e_002e_007d-199"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One or more revision IDs.
<br><dt><strong>Added in:</strong><dd>
2.1
<br><dt><strong>Purpose:</strong><dd>
Prints all revisions which are ancestors of all of the revisions given as
arguments.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each giving the ID of one common ancestor of all the given
revisions. Each line consists of a revision ID, in hexadecimal,
followed by a newline. The lines are printed in alphabetically sorted
order.
<p>The output will include one of the argument revisions only if that revision is
an ancestor of all other revisions given as arguments.
<br><dt><strong>Error conditions:</strong><dd>
If any of the revisions do not exist, prints nothing to stdout, prints
an error message to stderr, and exits with status 1.
</dl>
<p><a name="mtn-automate-content_005fdiff"></a><br><dt><samp><span class="command">mtn automate content_diff [--revision=</span><var>id1</var><span class="command"> [--revision=</span><var>id2</var><span class="command">]] [--reverse] [</span><var>file...</var><span class="command">]</span></samp><a name="index-mtn-automate-content_005fdiff-_005b_002d_002drevision_003d_0040var_007bid1_007d-_005b_002d_002drevision_003d_0040var_007bid2_007d_005d_005d-_005b_002d_002dreverse_005d-_005b_0040var_007bfile_002e_002e_002e_007d_005d-200"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>See the online help for more options.
<p>One or more <var>file</var> arguments restrict the diff output to these files,
otherwise all changed files in the given revision(s) and/or current workspace
are considered.
<p>If zero or more revisions are given, the command behaves as follows:
<ul>
<li>no revision: the diff is done from the parent (base) revision of this
workspace to the workspace revision.
<li>one revision: the diff is done from the given revision <samp><span class="option">id1</span></samp> to
the workspace revision. If <samp><span class="option">--reverse</span></samp> is given, the order is
reversed.
<li>two revisions: the diff is done from <samp><span class="option">id1</span></samp> to <samp><span class="option">id2</span></samp>; no
workspace is needed in this case.
</ul>
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>9.0 – added <samp><span class="option">--with-header</span></samp> option
<li>4.0 – initial
</ul>
<br><dt><strong>Purpose:</strong><dd>
Prints the content changes between two revisions or a revision and the
current workspace. This command differs from <samp><span class="command">mtn diff</span></samp> in
that it only outputs content changes and keeps quiet on renames or
drops by default, as the header of <samp><span class="command">mtn diff</span></samp> is omitted
unless <samp><span class="option">--with-header</span></samp> is given and is omitted regardless if
there are no changes.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> ============================================================
--- guitone/res/i18n/guitone_de.ts 9857927823e1d6a0339b531c120dcaadd22d25e9
+++ guitone/res/i18n/guitone_de.ts 0b4715dc296b1955b0707923d45d79ca7769dd3f
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="1.1">
<context>
+ <name>AncestryGraph</name>
+ <message>
[...]
</pre>
<br><dt><strong>Output format:</strong><dd>
The GNU unified diff format. If there have been no content changes, the output
is empty.
<br><dt><strong>Error conditions:</strong><dd>
If more than two revisions are given or a workspace is required, but
not found, prints to stderr and exits with status 1. If one or more file
restrictions can't be applied, the command prints to stderr and exits as well.
</dl>
<p><a name="mtn-automate-descendents"></a><br><dt><samp><span class="command">mtn automate descendents </span><var>rev...</var></samp><a name="index-mtn-automate-descendents-_0040var_007brev_002e_002e_002e_007d-201"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One or more revision IDs.
<br><dt><strong>Added in:</strong><dd>
0.1
<br><dt><strong>Purpose:</strong><dd>
Prints the descendants of one or more revisions.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each giving the ID of one descendant of the given
revisions. Each line consists of a revision ID, in hexadecimal,
followed by a newline. The lines are printed in alphabetically sorted
order.
<p>The output does not include <var>rev...</var>, unless one of them is a
descendent of another.
<br><dt><strong>Error conditions:</strong><dd>
If any of the revisions do not exist, prints nothing to stdout, prints
an error message to stderr, and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate drop_attribute </span><var>path</var><span class="command"> [</span><var>key</var><span class="command">]</span></samp><a name="index-mtn-automate-drop_005fattribute-_0040var_007bpath_007d-_005b_0040var_007bkey_007d_005d-202"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
A path and an attribute key (optional).
<br><dt><strong>Added in:</strong><dd>
5.0
<br><dt><strong>Purpose:</strong><dd>
Automate variant of <samp><span class="command"><a href="mtn-attr-drop.html#mtn-attr-drop">mtn attr drop</a></span></samp>.
<p>Removes an attribute from the current workspace revision for the specified path.
If no attribute key is given, all attributes of this path are removed. Note that
this change is not committed.
<br><dt><strong>Output format:</strong><dd>
This command does not print out anything if successful.
<br><dt><strong>Error conditions:</strong><dd>
If the path specified is unknown in the new workspace revision or the attribute
key is not found for this path, prints an error message to stderr and exits with
status 1.
</dl>
<br><dt><samp><span class="command">mtn automate drop_db_variables </span><var>domain</var><span class="command"> [</span><var>name</var><span class="command">]</span></samp><a name="index-mtn-automate-drop_005fdb_005fvariables-_0040var_007bdomain_007d-_005b_0040var_007bname_007d_005d-203"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>domain</var> and <var>name</var> specify the database variable
which should be dropped. If <var>name</var> is ommitted, all database
variables in the <var>domain</var> are dropped.
<br><dt><strong>Added in:</strong><dd>
7.0
<br><dt><strong>Purpose:</strong><dd>
Drops one or more database variables; see <a href="Vars.html#Vars">Vars</a>.
<br><dt><strong>Sample usage:</strong><dd>
<pre class="verbatim"> mtn automate drop_db_variables known-servers
</pre>
<br><dt><strong>Output format:</strong><dd>
No output.
<br><dt><strong>Error conditions:</strong><dd>
If the specific variable or any variables in the given domain are not found,
prints to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate drop_public_key </span><var>keyid</var></samp><a name="index-mtn-automate-drop_005fpublic_005fkey-_0040var_007bkeyid_007d-204"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
<var>keyid</var> identifies the key to drop, by name or hash.
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>13.0 – initial
</ul>
<br><dt><strong>Purpose:</strong><dd>
Drop a public key from the database (<em>not</em> the private key from
the keystore). Signatures made with the key can no longer be verified.
<p>This command should be used with caution as changes are irreversible
without a backup of the key(s) that were dropped. You may wish to use
the <samp><span class="command">k:</span></samp> selector to check if the key is used in a signature.
<p>Note that public keys that are used to sign a revision may be
restored to the database by a future sync.
<p>Keys in the keystore are not dropped because that is very dangerous on
a server. The only way to drop private keys on a server is via the
command <samp><span class="command"><a href="mtn-dropkey.html#mtn-dropkey">mtn dropkey</a></span></samp>.
<br><dt><strong>Sample output:</strong><dd>
None.
<br><dt><strong>Output format:</strong><dd>
None on the main stream; progress message on the progress stream.
<br><dt><strong>Error conditions:</strong><dd>
If the key does not exist, an error message is printed on the error stream.
</dl>
<br><dt><samp><span class="command">mtn automate erase_ancestors [</span><var>rev...</var><span class="command">]</span></samp><a name="index-mtn-automate-erase_005fancestors-_005b_0040var_007brev_002e_002e_002e_007d_005d-205"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One or more revision IDs.
<br><dt><strong>Added in:</strong><dd>
0.1
<br><dt><strong>Purpose:</strong><dd>
Prints all arguments, except those that are an ancestor of some other
argument.
<p>One way to think about this is that it prints the minimal elements of
the given set, under the ordering imposed by the “child of”
relation. Another way to think of it is if the arguments formed a
branch, then we would print the heads of that branch. If there are no
arguments, prints nothing.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each giving the ID of one of the given revisions.
Each line consists of a revision ID, in hexadecimal, followed by a
newline. The lines are printed in alphabetically sorted order.
<br><dt><strong>Error conditions:</strong><dd>
If any of the revisions do not exist, prints nothing to stdout, prints
an error message to stderr, and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate file_merge </span><var>left-rid</var> <var>left-path</var> <var>right-rid</var> <var>right-path</var></samp><a name="index-mtn-automate-file_005fmerge-_0040var_007bleft_002drid_007d-_0040var_007bleft_002dpath_007d-_0040var_007bright_002drid_007d-_0040var_007bright_002dpath_007d-206"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
<var>left-rid</var>, <var>left-fid</var>, <var>right-rid</var>, <var>right-fid</var>
specify two files to merge, by revision and file path.
<br><dt><strong>Added in:</strong><dd>
9.0
<br><dt><strong>Purpose:</strong><dd>
Prints the result of the internal line merge on the contents of the
specified files.
<p>This command does not just take two file ids, because the revision ids
and paths are needed to check for manual merge and file encoding
attributes.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> If you've downloaded a release, see INSTALL for installation
instructions. If you've checked this out, the generated files are not
included, and you must use "autoreconf --install" to create them.
"make html" for docs, or read the .info file and / or man page.
</pre>
<br><dt><strong>Output format:</strong><dd>
The file merge results are output without modification.
<br><dt><strong>Error conditions:</strong><dd>
If either revision id is unknown or invalid, or if either path does
not exist, or if the internal line merger fails, prints an error
message to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate generate_key </span><var>name</var> <var>passphrase</var></samp><a name="index-mtn-automate-generate_005fkey-_0040var_007bname_007d-_0040var_007bpassphrase_007d-207"></a><dd>
<dl>
<dt><strong>Aguments</strong><dd>
<var>name</var> is the name to associate with the new key, and <var>passphrase</var> is
the passphrase that will be used to encrypt the private half.
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>13.0 – renamed from <samp><span class="command">genkey</span></samp> to <samp><span class="command">generate_key</span></samp>
<li>10.0 – The separate hashes for the private half of a key really didn't
make much sense; have one <code>hash [...]</code> line instead of separate
<code>public_hash [...]</code> and <code>private_hash [...]</code> lines.
<li>3.1 – initial
</ul>
<br><dt><strong>Purpose:</strong><dd>
Generate a key with the given name and passphrase.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> name "tbrownaw@gmail.com"
hash [475055ec71ad48f5dfaf875b0fea597b5cbbee64]
public_location "database" "keystore"
private_location "keystore"
</pre>
<br><dt><strong>Output format:</strong><dd>
A basic_io stanza. The public_location and private_location items may have
multiple values as shown above for public_location, one value for each place
that the key is stored.
<br><dt><strong>Error conditions:</strong><dd>
Error conditions: If the passphrase is empty or the key already exists,
prints an error message to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_attributes </span><var>path</var></samp><a name="index-mtn-automate-get_005fattributes-_0040var_007bpath_007d-208"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The argument <var>path</var> determines which path's attributes should be printed.
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>11.0 – removed the <samp><span class="command">format_version</span></samp> stanza
<li>5.0 – renamed from <samp><span class="command">attributes</span></samp> to <samp><span class="command">get_attributes</span></samp>
<li>3.0 – initial
</ul>
<br><dt><strong>Purpose:</strong><dd>
Prints all attributes of the given file in the current workspace, and
the attribute states.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> attr "foo" "bar"
state "added"
attr "baz" "bat"
state "dropped"
attr "foobar" "foobat"
state "unchanged"
</pre>
<br><dt><strong>Output format:</strong><dd>
There is one basic_io stanza for each attribute of the given file.
<p>All stanzas are formatted by basic_io. Stanzas are separated
by a blank line and ordered by attribute name. Values will be
escaped, '\' to '\\' and '"' to '\"'.
<p>Each attribute stanza also contains another entry which tells the status
of attribute. This entry can have one of the following four values:
<ul>
<li>'added': the attribute has just been added to the file
<li>'dropped': the attribute has just been dropped from the file
<li>'unchanged': the attribute has not been changed since the last revision
<li>'changed': the attribute has been changed since the last revision
</ul>
<p>The status 'changed' can come up if an attribute foo has been dropped and
added afterwards with another value, like
<pre class="verbatim"> $ mtn attr drop file.txt foo ; mtn attr set file.txt foo baz
</pre>
<p>If an attribute has been dropped, the output will still return the previously
set value of the dropped attribute for convenience (obviously this is no longer
recorded in the current workspace).
<p>The complete format:
<pre class="verbatim"> 'attr':
represents an attribute.
format: ('attr', key, value), ('state', [unchanged|changed|added|dropped])
occurs: zero or more times
</pre>
<br><dt><strong>Error conditions:</strong><dd>
If the path specified is unknown in the workspace, prints an error
message to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_base_revision_id</span></samp><a name="index-mtn-automate-get_005fbase_005frevision_005fid-209"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
None.
<br><dt><strong>Added in:</strong><dd>
2.0
<br><dt><strong>Purpose:</strong><dd>
Prints the base revision id of the current workspace. This is the
“old_revision” value stored in <samp><span class="file">_MTN/revision</span></samp>.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
</pre>
<br><dt><strong>Output format:</strong><dd>
One line containing the base revision ID of the current workspace.
<br><dt><strong>Error conditions:</strong><dd>
If no workspace is found, prints an error message to stderr, and exits
with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_content_changed </span><var>rev</var> <var>file</var></samp><a name="index-mtn-automate-get_005fcontent_005fchanged-_0040var_007brev_007d-_0040var_007bfile_007d-210"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>rev</var> specifies a revision ID, from which content change calculations will be based.
and <var>file</var> specifies the file for which to calculate revisions in which it was last changed.
<br><dt><strong>Added in:</strong><dd>
4.0
<br><dt><strong>Purpose:</strong><dd>
Returns a list of revision IDs in which the content was most recently changed,
relative to the revision ID specified as <var>rev</var>. This equates to a content mark
following the *-merge algorithm.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> content_mark [276264b0b3f1e70fc1835a700e6e61bdbe4c3f2f]
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more basic_io stanzas, each specifying a revision ID in which a content
mark is set:
<ul>
<li>No content mark is returned if <var>file</var> is a directory.
<li>One content mark is returned if <var>file</var> is a file and has recently been
changed exclusively in one revision (be it by a commit or merge).
<li>Multiple content marks are returned if <var>file</var> is a file and has recently
been part of a clean merge case.
A clean merge happens when the same change to <var>file</var> is made on both sides
of the particular merge, together with other unrelated changes, which make the
resulting revisions not collapse into one revision.
</ul>
<br><dt><strong>Error conditions:</strong><dd>
If <var>rev</var> or <var>file</var> is unknown or invalid prints an error
message to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_corresponding_path </span><var>source_id</var> <var>file</var> <var>target_id</var></samp><a name="index-mtn-automate-get_005fcorresponding_005fpath-_0040var_007bsource_005fid_007d-_0040var_007bfile_007d-_0040var_007btarget_005fid_007d-211"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>source_id</var> specifies a revision ID in which <var>file</var> is extant.
and <var>file</var> specifies the file whose name in <var>target_id</var> is to be determined;
<var>target_id</var> specifies a revision ID.
<br><dt><strong>Added in:</strong><dd>
4.0
<br><dt><strong>Purpose:</strong><dd>
Given a the file name <var>file</var> in the source revision <var>source_id</var>, a filename
will if possible be returned naming the file in the target revision <var>target_id</var>.
This allows the same file to be matched between revisions, accounting
for renames and other changes.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> file "foo"
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or one basic_io lines. Zero lines will be output if the file
does not exist within the target revision; this is not considered an
error. If the file does exist in the target revision, a single line
is output.
<br><dt><strong>Error conditions:</strong><dd>
If the revision IDs <var>source_id</var> or <var>target_id</var> are unknown or invalid prints an error
message to stderr and exits with status 1. If the file path <var>file</var> does not exist in the
revision <var>source_id</var> or is invalid, prints an error message to stderr and exits with status
1. Note that <var>file</var> not existing in the revision <var>target_id</var> is not an error.
</dl>
<br><dt><samp><span class="command">mtn automate get_current_revision [--exclude </span><var>excl</var><span class="command">] [--depth=</span><var>depth</var><span class="command">] [</span><var>path...</var><span class="command">]</span></samp><a name="index-mtn-automate-get_005fcurrent_005frevision-_005b_002d_002dexclude-_0040var_007bexcl_007d_005d-_005b_002d_002ddepth_003d_0040var_007bdepth_007d_005d-_005b_0040var_007bpath_002e_002e_002e_007d_005d-212"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One or more <var>path</var> arguments restrict the revision to these paths,
otherwise all changes in workspace are taken into account.
<p>See online help for more options.
<br><dt><strong>Added in:</strong><dd>
7.0
<br><dt><strong>Purpose:</strong><dd>
Prints change information for the current workspace, optionally restricted by
one or more paths.
<br><dt><strong>Sample output:</strong><dd>
See <samp><span class="command"><a href="mtn-automate-get_005frevision.html#mtn-automate-get_005frevision">mtn automate get_revision</a></span></samp>
<br><dt><strong>Output format:</strong><dd>
See <samp><span class="command"><a href="mtn-automate-get_005frevision.html#mtn-automate-get_005frevision">mtn automate get_revision</a></span></samp>
<br><dt><strong>Error conditions:</strong><dd>
If the command is executed outside of a workspace, or the restriction is
invalid, prints an error message to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_current_revision_id</span></samp><a name="index-mtn-automate-get_005fcurrent_005frevision_005fid-213"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
None.
<br><dt><strong>Added in:</strong><dd>
2.0
<br><dt><strong>Purpose:</strong><dd>
Prints the revision id of the current workspace. This is the id
of the revision that would be committed by an unrestricted commit
in the workspace.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
</pre>
<br><dt><strong>Output format:</strong><dd>
One line containing the current revision id ID of the current workspace.
<br><dt><strong>Error conditions:</strong><dd>
If no workspace is found, prints an error message to stderr, and exits
with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_db_variables [</span><var>domain</var><span class="command">]</span></samp><a name="index-mtn-automate-get_005fdb_005fvariables-_005b_0040var_007bdomain_007d_005d-214"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The optional <var>domain</var> restricts the output to variables only within
this domain.
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>7.0 – converted output to basic_io, renamed to 'get_db_variables'
<li>4.1 – added as 'db_get'
</ul>
<br><dt><strong>Purpose:</strong><dd>
Outputs database variable domains, names and values. For more
information about variables, see <a href="Vars.html#Vars">Vars</a>.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> domain "database"
entry "default-exclude-pattern" ""
entry "default-include-pattern" "net.venge.monotone*"
entry "default-server" "mtn://code.monotone.ca/monotone"
domain "known-servers"
entry "mtn://code.monotone.ca/monotone" "2c88403f0ed546df96ccec57ab3072aa73a05e71"
</pre>
<br><dt><strong>Output format:</strong><dd>
basic_io-formatted stanzas. Each stanza starts with a 'domain', followed by one
or more 'entry' lines. Each 'entry' contains the <var>name</var> and the <var>value</var>
of the respective database variable.
<br><dt><strong>Error conditions:</strong><dd>
If the domain is unknown or no variables where found, prints an error message
to stderr and exits with status 1.
</dl>
<p><a name="mtn-automate-get_005fextended_005fmanifest_005fof"></a><br><dt><samp><span class="command">mtn automate get_extended_manifest_of </span><var>revid</var></samp><a name="index-mtn-automate-get_005fextended_005fmanifest_005fof-_0040var_007brevid_007d-215"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>revid</var> specifies the revision for which the extended manifest
should be printed.
<br><dt><strong>Changes:</strong><dd>
13.0 – initial
<br><dt><strong>Purpose:</strong><dd>
Prints the contents of the extended manifest associated with the given revision.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> dir ""
birth [0cd607d6dda3a2df18f777112947f3c70811581e]
path_mark [0cd607d6dda3a2df18f777112947f3c70811581e]
dir "dir"
dormant_attr "dirprop"
birth [0cd607d6dda3a2df18f777112947f3c70811581e]
path_mark [0cd607d6dda3a2df18f777112947f3c70811581e]
attr_mark "dirprop" [a7a71d7cc0d526165e7362b8a87393d8609f40c2]
file "file"
content [d3395867d05cc4c27f013d6e6f48d644e96d8241]
size "8"
attr "fileprop" "value"
birth [0cd607d6dda3a2df18f777112947f3c70811581e]
path_mark [0cd607d6dda3a2df18f777112947f3c70811581e]
content_mark [a7a71d7cc0d526165e7362b8a87393d8609f40c2]
attr_mark "fileprop" [a7a71d7cc0d526165e7362b8a87393d8609f40c2]
</pre>
<br><dt><strong>Output format:</strong><dd>
There is one basic_io stanza for each file or directory in the
extended manifest.
<p>The 'dir' and 'file' lines are the first in every stanza and
specify its type as follows:
<pre class="verbatim"> 'dir':
Represents a directory. The path "" (the empty string) is used
to represent the root of the tree.
format: ('dir', pathname)
occurs: one or more times
'file':
Represents a file.
format: ('file', pathname)
occurs: zero or more times
</pre>
<p>In addition, both 'dir' and 'file' stanzas include more information
on the particular node:
<pre class="verbatim"> 'birth':
The revision id in which the node was added ("born").
format: ('birth', revision id)
occurs: once per node
'path_mark':
The revision id in which the node was last renamed.
format: ('path_mark', revision id)
occurs: once per node
'content':
The id of the file node, i.e. the hash of its contents.
format: ('content', file id)
occurs: once per file node
'content_mark':
The revision id in which the node's content was changed at last.
format: ('content_mark', revision id)
occurs: once per file node
'size':
The recorded file size, in bytes.
format: ('size', size in bytes)
occurs: once per file node
</pre>
<p>Finally, attributes are also part of the format:
<pre class="verbatim"> 'attr':
The name and the value of a specific attribute.
format: ('attr', attribute name, attribute value)
occurs: zero or more times per node
'dormant_attr':
The name of a previously deleted attribute.
format: ('dormant_attr', attribute name)
occurs: zero or more times per node
'attr_mark':
The revision id in which a particular attribute's value was
changed at last.
format: ('attr_mark', attribute name, revision id)
occurs: zero or more times per node
</pre>
<p>All stanzas are sorted by the path string.
<br><dt><strong>Error conditions:</strong><dd>
If the revision ID specified is unknown or invalid prints an error
message to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_file </span><var>id</var></samp><a name="index-mtn-automate-get_005ffile-_0040var_007bid_007d-216"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>id</var> argument specifies the file hash of the file to be output.
<br><dt><strong>Added in:</strong><dd>
1.0
<br><dt><strong>Purpose:</strong><dd>
Prints the contents of the specified file.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> If you've downloaded a release, see INSTALL for installation
instructions. If you've checked this out, the generated files are not
included, and you must use "autoreconf --install" to create them.
"make html" for docs, or read the .info file and / or man page.
</pre>
<br><dt><strong>Output format:</strong><dd>
The file contents are output without modification.
<br><dt><strong>Error conditions:</strong><dd>
If the file id specified is unknown or invalid prints an error message
to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_file_of </span><var>filename</var><span class="command"> [--revision=</span><var>id</var><span class="command">]</span></samp><a name="index-mtn-automate-get_005ffile_005fof-_0040var_007bfilename_007d-_005b_002d_002drevision_003d_0040var_007bid_007d_005d-217"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>filename</var> argument specifies the filename of the file to be output.
<p>If a revision <var>id</var> is given, the file's contents in that specific revision
are printed. If no revision is given, the workspace base revision is used.
<br><dt><strong>Added in:</strong><dd>
4.0
<br><dt><strong>Purpose:</strong><dd>
Prints the contents of the specified file.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> If you've downloaded a release, see INSTALL for installation
instructions. If you've checked this out, the generated files are not
included, and you must use "autoreconf --install" to create them.
"make html" for docs, or read the .info file and / or man page.
</pre>
<br><dt><strong>Output format:</strong><dd>
The file contents are output without modification.
<br><dt><strong>Error conditions:</strong><dd>
If the filename specified is unknown in the given revision or invalid, or
if the given revision is unknown, prints an error message to stderr and exits
with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_file_size </span><var>id</var></samp><a name="index-mtn-automate-get_005ffile_005fsize-_0040var_007bid_007d-218"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>id</var> argument specifies the file hash of the file for which
the size should be printed.
<br><dt><strong>Changes:</strong><dd>
13.0 – initial
<br><dt><strong>Purpose:</strong><dd>
Prints the recorded file size of the specified file.
<p>If you need to know the file sizes of multiple files of the same revision,
its usually faster to use the <samp><span class="command"><a href="mtn-automate-get_005fextended_005fmanifest_005fof.html#mtn-automate-get_005fextended_005fmanifest_005fof">mtn automate get_extended_manifest_of</a></span></samp>
command.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 1241
</pre>
<br><dt><strong>Output format:</strong><dd>
The size of the file in bytes followed by a linefeed character ('\n').
<br><dt><strong>Error conditions:</strong><dd>
If the file id specified is unknown or invalid prints an error message
to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_manifest_of [</span><var>revid</var><span class="command">]</span></samp><a name="index-mtn-automate-get_005fmanifest_005fof-_005b_0040var_007brevid_007d_005d-219"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
Specifying the optional <var>revid</var> argument outputs the manifest for the
revision with the specified ID. Otherwise, outputs the manifest for the
current workspace.
<br><dt><strong>Added in:</strong><dd>
2.0
<br><dt><strong>Purpose:</strong><dd>
Prints the contents of the manifest associated with the given revision.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> format_version "1"
dir ""
file ".htaccess"
content [e3915658cb464d05f21332e03d30dca5d94fe776]
file "AUTHORS"
content [80d8f3f75c9b517ec462233e155f7dfb93379f67]
file "ChangeLog"
content [fc74a48c7f73eedcbe1ea709755fbe819b29736c]
</pre>
<br><dt><strong>Output format:</strong><dd>
There is one basic_io stanza for each file or directory in the
manifest.
<pre class="verbatim"> 'format_version'
used in case this format ever needs to change.
format: ('format_version', the string "1")
occurs: exactly once
'dir':
represents a directory. The path "" (the empty string) is used
to represent the root of the tree.
format: ('dir', pathname)
occurs: one or more times
'file':
represents a file.
format: ('file', pathname), ('content', file id)
occurs: zero or more times
</pre>
<p>In addition, 'dir' and 'file' stanzas may have attr information
included. These are appended to the stanza below the basic dir/file
information, with one line describing each attr. These lines take the
form ('attr', attr name, attr value).
<p>Stanzas are sorted by the path string.
<br><dt><strong>Error conditions:</strong><dd>
If the revision ID specified is unknown or invalid prints an error
message to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_option </span><var>option</var></samp><a name="index-mtn-automate-get_005foption-_0040var_007boption_007d-220"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>option</var> argument specifies the option name of the option to be output.
<br><dt><strong>Added in:</strong><dd>
3.1
<br><dt><strong>Purpose:</strong><dd>
Prints an option from <samp><span class="file">_MTN/option</span></samp> of the current workspace.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> net.venge.monotone
</pre>
<br><dt><strong>Output format:</strong><dd>
The option value is written out without modification.
<br><dt><strong>Error conditions:</strong><dd>
If the option is unknown, prints an error message to stderr and exits
with status 1.
</dl>
<p><a name="mtn-automate-get_005fpublic_005fkey"></a><br><dt><samp><span class="command">mtn automate get_public_key </span><var>keyid</var></samp><a name="index-mtn-automate-get_005fpublic_005fkey-_0040var_007bkeyid_007d-221"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
<var>keyid</var> identifies the key to display, by name or hash.
<br><dt><strong>Added in:</strong><dd>13.0
<br><dt><strong>Purpose:</strong><dd>
Same as <samp><span class="command"><a href="mtn-pubkey.html#mtn-pubkey">mtn pubkey</a></span></samp>; print the key in packet format,
suitable for reading by <samp><span class="command"><a href="mtn-automate-put_005fpublic_005fkey.html#mtn-automate-put_005fpublic_005fkey">mtn automate put_public_key</a></span></samp>.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> [pubkey foo@bar.com]
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDQs4OEcqULwepphO5Rsb/aSLpiEryGtEkQRNQPNFxvcu1rwVnNKRxep1KCDrwV3se9f4hUQ8zz73NQggS82guSI/YuyXZDZHrw+v3YgAMV/mKGnAjgYnyRNUL1xCywV7fnqTduBBqkDEVSCqphWlii/gFB/PVo4sbJ4Hk7O6ujWwIDAQAB
[end]
</pre>
<br><dt><strong>Output format:</strong><dd>
See example.
<br><dt><strong>Error conditions:</strong><dd>
If the key does not exist, an error message is printed on the error stream.
</dl>
<p><a name="mtn-automate-get_005frevision"></a><br><dt><samp><span class="command">mtn automate get_revision </span><var>id</var></samp><a name="index-mtn-automate-get_005frevision-_0040var_007bid_007d-222"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The argument <var>id</var> specifies the revision id for which the changeset
information should be printed.
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>7.0 – <var>id</var> is now mandatory
<li>1.0 – initial
</ul>
<br><dt><strong>Purpose:</strong><dd>
Prints change information for the specified revision id.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> format_version "1"
new_manifest [bfe2df785c07bebeb369e537116ab9bb7a4b5e19]
old_revision [429fea55e9e819a046843f618d90674486695745]
patch "ChangeLog"
from [7dc21d3a46c6ecd94685ab21e67b131b32002f12]
to [234513e3838d423b24d5d6c98f70ce995c8bab6e]
patch "std_hooks.lua"
from [0408707bb6b97eae7f8da61af7b35364dbd5a189]
to [d7bd0756c48ace573926197709e53eb24dae5f5f]
</pre>
<br><dt><strong>Output format:</strong><dd>
There are several changes that are described; each of these is described by
a different basic_io stanza. The first string pair of each stanza indicates the
type of change represented.
<pre class="verbatim"> 'format_version'
used in case this format ever needs to change.
format: ('format_version', the string "1")
occurs: exactly once
'new_manifest'
represents the new manifest associated with the revision.
format: ('new_manifest', manifest id)
occurs: exactly one
'old_revision'
represents a parent revision.
format: ('old_revision', revision id)
occurs: either one or two times
'delete
represents a file or directory that was deleted.
format: ('delete', path)
occurs: zero or more times
'rename'
represents a file or directory that was renamed.
format: ('rename, old filename), ('to', new filename)
occurs: zero or more times
'add_dir'
represents a directory that was added.
format: ('add_dir, path)
occurs: zero or more times
'add_file'
represents a file that was added.
format: ('add_file', path), ('content', file id)
occurs: zero or more times
'patch'
represents a file that was modified.
format: ('patch', filename), ('from', file id), ('to', file id)
occurs: zero or more times
'clear'
represents an attr that was removed.
format: ('clear', filename), ('attr', attr name)
occurs: zero or more times
'set'
represents an attr whose value was changed.
format: ('set', filename), ('attr', attr name), ('value', attr value)
occurs: zero or more times
</pre>
<p>These stanzas will always occur in the order listed here; stanzas of
the same type will be sorted by the filename they refer to. The 'delete'
and following stanzas will be grouped under the corresponding 'old_revision'
one.
<br><dt><strong>Error conditions:</strong><dd>
If the revision specified is unknown or invalid prints an error message
to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate get_workspace_root</span></samp><a name="index-mtn-automate-get_005fworkspace_005froot-223"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
None.
<br><dt><strong>Added in:</strong><dd>
8.0
<br><dt><strong>Purpose:</strong><dd>
Print the path of the workspace root for the current directory.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> /home/jim/juice
</pre>
<br><dt><strong>Output format:</strong><dd>
A path.
<br><dt><strong>Error conditions:</strong><dd>
If the current directory isn't part of a workspace, prints an error to
stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate graph</span></samp><a name="index-mtn-automate-graph-224"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
None.
<br><dt><strong>Added in:</strong><dd>
0.2
<br><dt><strong>Purpose:</strong><dd>
Prints out the complete ancestry graph of this database.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 0c05e8ec9c6af4224672c7cc4c9ef05ae8bdb794
27ebcae50e1814e35274cb89b5031a423c29f95a 5830984dec5c41d994bcadfeab4bf1bf67747b89
4e284617c80bec7da03925062a84f715c1b042bd 27ebcae50e1814e35274cb89b5031a423c29f95a 657c756d24fb65213d59f4ae07e117d830dcc95b
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each giving ancestry information for one revision.
Each line begins with a revision ID. Following this are zero or more
space-prefixed revision IDs. Each revision ID after the first is a
parent (in the sense of <samp><span class="command"><a href="mtn-automate-parents.html#mtn-automate-parents">mtn automate parents</a></span></samp>) of the first. For
instance, in the above sample output,
0c05e8ec9c6af4224672c7cc4c9ef05ae8bdb794 is a root node,
27ebcae50e1814e35274cb89b5031a423c29f95a has one parent, and
4e284617c80bec7da03925062a84f715c1b042bd has two parents, i.e., is a
merge node.
<p>The output as a whole is alphabetically sorted by line; additionally,
the parents within each line are alphabetically sorted.
<br><dt><strong>Error conditions:</strong><dd>
None.
</dl>
<p><a name="mtn-automate-heads"></a><br><dt><samp><span class="command">mtn automate heads [</span><var>branch</var><span class="command">]</span></samp><a name="index-mtn-automate-heads-_005b_0040var_007bbranch_007d_005d-225"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One branch name. If none is given, the workspace branch is used.
<br><dt><strong>Added in:</strong><dd>
0.0
<br><dt><strong>Purpose:</strong><dd>
Prints the heads of branch <var>branch</var>.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each giving the ID of one head of the given branch.
Each line consists of a revision ID, in hexadecimal, followed by a
newline. The lines are printed in alphabetically sorted order.
<br><dt><strong>Error conditions:</strong><dd>
If the given branch does not exist, an error message is printed.
</dl>
<br><dt><samp><span class="command">mtn automate identify </span><var>path</var></samp><a name="index-mtn-automate-identify-_0040var_007bpath_007d-226"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
A file path.
<br><dt><strong>Added in:</strong><dd>
4.3
<br><dt><strong>Purpose:</strong><dd>
Prints the file ID (aka hash) of the given file.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 6265ab1312fbe38bdc3aafa92441139cb2b779b0
</pre>
<br><dt><strong>Output format:</strong><dd>
A single line with the file's ID, in hexadecimal, followed by a newline.
<br><dt><strong>Error conditions:</strong><dd>
If the file does not exist, is a special file or not readable, prints an
error message to stderr and exits with status 1. A single file path only
consisting of "-" is disallowed since it collides with the UNIX stdin
marker.
</dl>
<br><dt><samp><span class="command">mtn automate interface_version</span></samp><a name="index-mtn-automate-interface_005fversion-227"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
None.
<br><dt><strong>Added in:</strong><dd>
0.0
<br><dt><strong>Purpose:</strong><dd>
Prints version of the automation interface. Major number increments
whenever a backwards incompatible change is made to any automate
command; minor number increments whenever any change is made (but is
reset when major number increments).
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 1.2
</pre>
<br><dt><strong>Output format:</strong><dd>
A decimal number, followed by “.” (full stop/period), followed by a
decimal number, followed by a newline. The first decimal number is
the major version, the second is the minor version.
<br><dt><strong>Error conditions:</strong><dd>
None.
</dl>
<br><dt><samp><span class="command">mtn automate inventory [</span><samp><span class="option">options...</span></samp><span class="command">] [</span><var>files...</var><span class="command">]</span></samp><a name="index-mtn-automate-inventory-_005b_0040option_007boptions_002e_002e_002e_007d_005d-_005b_0040var_007bfiles_002e_002e_002e_007d_005d-228"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One or more file paths (optional). If present, only show an inventory for the
given files or directories (and their sub-directories); otherwise,
show an inventory for the current workspace.
<dl>
<dt><samp><span class="option">--depth=</span><var>n</var></samp><dd>Maximum number of directories to descend.
<br><dt><samp><span class="option">--exclude=</span><var>exclude-glob</var></samp><dd>File or directory to exclude.
<br><dt><samp><span class="option">--[no-]corresponding-renames</span></samp><dd>If restricted to a renamed path, do not output the corresponding old / new
paths for this restriction.
<br><dt><samp><span class="option">--[no-]ignored</span></samp><dd>Don't output ignored files or directories.
<br><dt><samp><span class="option">--[no-]unchanged</span></samp><dd>Don't output files that are known but not changed in any way.
<br><dt><samp><span class="option">--[no-]unknown</span></samp><dd>Don't output unknown directories.
</dl>
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>8.0 – added the output of the <code>birth</code> key
<li>7.0 – added options <samp><span class="option">--no-ignored</span></samp>, <samp><span class="option">--no-unknown</span></samp>,
<samp><span class="option">--no-unchanged</span></samp> and <samp><span class="option">--no-corresponding-renames</span></samp>
<li>6.0 – converted to basic_io format (restriction support, various fixes)
<li>1.0 – initial, line-based format
</ul>
<br><dt><strong>Purpose:</strong><dd>
Prints information on every file found in the workspace or its
associated base and revision manifests.
<br><dt><strong>Sample output:</strong><dd>
All basic status cases:
<pre class="verbatim"> path "added"
new_type "file"
fs_type "file"
status "added" "known"
changes "content"
path "attributes_altered"
old_type "file"
new_type "file"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "known"
changes "attrs"
path "dropped"
old_type "file"
fs_type "none"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "dropped"
path "ignored~"
fs_type "file"
status "ignored"
path "missing"
old_type "file"
new_type "file"
fs_type "none"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "missing"
path "original"
old_type "file"
new_path "renamed"
fs_type "none"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source"
path "patched"
old_type "file"
new_type "file"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "known"
changes "content"
path "patched_and_attributes_altered"
old_type "file"
new_type "file"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "known"
changes "content" "attrs"
path "renamed"
new_type "file"
old_path "original"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_target" "known"
path "unchanged"
old_type "file"
new_type "file"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "known"
path "unknown"
fs_type "file"
status "unknown"
</pre>
<p>Two files swapped in both the revision manifest and the workspace:
<pre class="verbatim"> path "original"
old_type "file"
new_path "unchanged"
new_type "file"
old_path "unchanged"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "rename_target" "known"
path "unchanged"
old_type "file"
new_path "original"
new_type "file"
old_path "original"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "rename_target" "known"
</pre>
<p>Recorded in the revision manifest that two files were swapped, but
they were not actually swapped in the workspace. Thus they both appear
as patched:
<pre class="verbatim"> path "original"
old_type "file"
new_path "unchanged"
new_type "file"
old_path "unchanged"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "rename_target" "known"
changes "content"
path "unchanged"
old_type "file"
new_path "original"
new_type "file"
old_path "original"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "rename_target" "known"
changes "content"
</pre>
<p>Rename (in the manifest and the workspace) <samp><span class="file">foo</span></samp> to <samp><span class="file">bar</span></samp>;
add (in the manifest and the workspace) new file <samp><span class="file">foo</span></samp>:
<pre class="verbatim"> path "foo"
old_type "file"
new_path "bar"
new_type "file"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "added" "known"
path "bar"
new_type "file"
old_path "foo"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_target" "known"
</pre>
<p>Rotated files <samp><span class="file">foo</span></samp> -> <samp><span class="file">bar</span></samp> -> <samp><span class="file">baz</span></samp> -> <samp><span class="file">foo</span></samp> (in
the manifest and the workspace):
<pre class="verbatim"> path "foo"
old_type "file"
new_path "bar"
new_type "file"
old_path "baz"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "rename_target" "known"
path "bar"
old_type "file"
new_path "baz"
new_type "file"
old_path "foo"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "rename_target" "known"
path "baz"
old_type "file"
new_path "foo"
new_type "file"
old_path "bar"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "rename_target" "known"
</pre>
<p>Recorded in the revison manifest the rotation of files <samp><span class="file">foo</span></samp> ->
<samp><span class="file">bar</span></samp> -> <samp><span class="file">baz</span></samp> -> <samp><span class="file">foo</span></samp>, but the actual files in the
workspace were not moved, so monotone interprets all files as having
been patched:
<pre class="verbatim"> path "foo"
old_type "file"
new_path "bar"
new_type "file"
old_path "baz"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "rename_target" "known"
changes "content"
path "bar"
old_type "file"
new_path "baz"
new_type "file"
old_path "foo"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "rename_target" "known"
changes "content"
path "baz"
old_type "file"
new_path "foo"
new_type "file"
old_path "bar"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "rename_target" "known"
changes "content"
</pre>
<p>Dropped from the manifest but not removed in the workspace and thus
unknown:
<pre class="verbatim"> path "dropped"
old_type "file"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "dropped" "unknown"
</pre>
<p>Added in the manifest but not in the workspace, and thus missing:
<pre class="verbatim"> path "added"
new_type "file"
fs_type "none"
status "added" "missing"
</pre>
<p>Recorded a rename in the manifest, but not moved in the workspace,
and thus unknown source and missing target:
<pre class="verbatim"> path "original"
old_type "file"
new_path "renamed"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source" "unknown"
path "renamed"
new_type "file"
old_path "original"
fs_type "none"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_target" "missing"
</pre>
<p>Moved in the workspace but no rename recorded in the manifest, and
thus missing source and unknown target:
<pre class="verbatim"> path "original"
old_type "file"
new_type "file"
fs_type "none"
status "missing"
path "renamed"
fs_type "file"
status "unknown"
</pre>
<p>Renamed in the manifest and the workspace and patched:
<pre class="verbatim"> path "original"
old_type "file"
new_path "renamed"
fs_type "none"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source"
path "renamed"
new_type "file"
old_path "original"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_target" "known"
changes "content"
</pre>
<p>Renamed and restricted to <samp><span class="file">original</span></samp> or <samp><span class="file">renamed</span></samp>:
<pre class="verbatim"> path "original"
old_type "file"
new_path "renamed"
fs_type "none"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source"
path "renamed"
new_type "file"
old_path "original"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_target" "known"
changes "content"
</pre>
<p>Renamed and restricted to <samp><span class="file">original</span></samp> with the <samp><span class="option">--no-corresponding-renames</span></samp> option:
<pre class="verbatim"> path "original"
old_type "file"
new_path "renamed"
fs_type "none"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source"
</pre>
<p>Renamed and restricted to <samp><span class="file">renamed</span></samp> with the <samp><span class="option">--no-corresponding-renames</span></samp> option:
<pre class="verbatim"> path "renamed"
new_type "file"
old_path "original"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_target" "known"
changes "content"
</pre>
<p>File is missing, an unversioned directory is in the way:
<pre class="verbatim"> path "missing_file"
old_type "file"
new_type "file"
fs_type "directory"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "invalid"
changes "content"
</pre>
<p>Directory is missing, an unversioned file is in the way:
<pre class="verbatim"> path "missing_directory"
old_type "directory"
new_type "directory"
fs_type "file"
status "invalid"
</pre>
<p>Directory <samp><span class="file">source</span></samp> renamed to <samp><span class="file">target</span></samp>, <samp><span class="file">target</span></samp> is missing, an
unversioned file is in the way:
<pre class="verbatim"> path "source"
old_type "directory"
new_path "target"
fs_type "none"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source"
path "source/a"
old_type "file"
new_path "target/a"
fs_type "none"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_source"
path "target"
new_type "directory"
old_path "source"
fs_type "file"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_target" "invalid"
path "target/a"
new_type "file"
old_path "source/a"
fs_type "none"
birth [cb271687054afd3c2b873c8994f206f08fb240d3]
status "rename_target" "missing"
</pre>
<br><dt><strong>Output format:</strong><dd>
Each path is printed in one basic_io stanza. Stanzas are separated by
a blank line. Each stanza starts with a <code>path</code> line, and contains
up to seven lines.
<dl>
<dt><samp><span class="option">path</span></samp><dd>The file or directory path, relative to the workspace root. The file
either exists in the workspace, or is listed in the base or revision
manifest.
<samp><span class="option">path</span></samp> is always output.
<br><dt><samp><span class="option">old_type</span></samp><dd>The type of the node in the base manifest.
“type” is either <samp><span class="option">file</span></samp> or <samp><span class="option">directory</span></samp>.
<samp><span class="option">old_type</span></samp> is output for all old nodes (i.e. unchanged or dropped paths
and rename sources).
<br><dt><samp><span class="option">new_type</span></samp><dd>The type of the node in the revision manifest.
“type” is either <samp><span class="option">file</span></samp> or <samp><span class="option">directory</span></samp>.
<samp><span class="option">new_type</span></samp> is output for all new nodes (i.e. unchanged or added paths
and rename targets).
<br><dt><samp><span class="option">fs_type</span></samp><dd>The type of the node in the workspace (also called the filesystem).
“type” is either <samp><span class="option">file</span></samp>, <samp><span class="option">directory</span></samp> or <samp><span class="option">none</span></samp>
(if the path does not exist in the file system).
<samp><span class="option">fs_type</span></samp> is always output.
<br><dt><samp><span class="option">old_path</span></samp><dd>The old path for the node, if it has been renamed in the revision
manifest.
<samp><span class="option">old_path</span></samp> is only output for rename targets.
<br><dt><samp><span class="option">new_path</span></samp><dd>The new path for the node, if it has been renamed in the revision
manifest.
<samp><span class="option">new_path</span></samp> is only output for rename sources.
<br><dt><samp><span class="option">birth</span></samp><dd>The identify of the revision that the node was first added in.
<samp><span class="option">birth</span></samp> is only output if it exists in a committed revision.
<br><dt><samp><span class="option">status</span></samp><dd><samp><span class="option">status</span></samp> is always output. Its value is one or more of:
<dl>
<dt><samp><span class="option">rename_source</span></samp><dd><var>path</var> is part of a rename and denotes the old name of a renamed node.
<br><dt><samp><span class="option">rename_target</span></samp><dd><var>path</var> is part of a rename and denotes the new name of a renamed node.
<br><dt><samp><span class="option">added</span></samp><dd><var>path</var> has been added in the revision manifest, but not existent in the
base manifest.
<br><dt><samp><span class="option">dropped</span></samp><dd><var>path</var> has been deleted in the revision manifest and the workspace.
<br><dt><samp><span class="option">missing</span></samp><dd><var>path</var> has been deleted in the workspace, but still exists in the revision
manifest.
<p>A file will also be labeled <samp><span class="option">missing</span></samp> if it is in a directory
that is ignored due to a regular expression in <samp><span class="file">.mtn-ignore</span></samp>, but
is also in the revision manifest. A warning is issued in this case.
<br><dt><samp><span class="option">ignored</span></samp><dd><var>path</var> is ignored by monotone.
<br><dt><samp><span class="option">known</span></samp><dd><var>path</var> exists in the workspace, and in the revision manifest.
<br><dt><samp><span class="option">unknown</span></samp><dd><var>path</var> exists in the workspace, but not in the revision manifest, i.e.
is unversioned.
<br><dt><samp><span class="option">invalid</span></samp><dd><var>path</var> is versioned and exists in the workspace and revision manifest, but
with incompatible types (a versioned missing file is replaced by an
unversioned directory and vice versa).
</dl>
<br><dt><samp><span class="option">changes</span></samp><dd>
<dl>
<dt><samp><span class="option">content</span></samp><dd> The contents of a file have been changed.
<br><dt><samp><span class="option">attrs</span></samp><dd> The attributes of a path (file or directory) have been changed.
</dl>
</dl>
<br><dt><strong>Error conditions:</strong><dd>
When executed from outside of a workspace directory, prints an error
message to stderr, and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate keys</span></samp><a name="index-mtn-automate-keys-229"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
None.
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>11.0 – Instead of having a "name" item, there are
"given_name" and "local_name" items.
<li>10.0 – The separate hashes for the private half of a key really didn't
make much sense; have one <code>hash [...]</code> line instead of separate
<code>public_hash [...]</code> and <code>private_hash [...]</code> lines.
<li>1.1 – initial
</ul>
<br><dt><strong>Purpose:</strong><dd>
Print all keys in basic_io format.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> hash [475055ec71ad48f5dfaf875b0fea597b5cbbee64]
given_name "tbrownaw@gmail.com"
local_name "tbrownaw@gmail.com"
public_location "database" "keystore"
private_location "keystore"
hash [3ac4afcd86af28413b0a23b7d22b9401e15027fc]
given_name "tomfa@debian.org"
local_name "tomfa@debian.org"
public_location "database"
hash [115fdc73d87a5e9901d018462b21a1f53eca33a1]
given_name "underwater@fishtank.net"
local_name "underwater@fishtank.net"
public_location "keystore"
private_location "keystore"
</pre>
<br><dt><strong>Output format:</strong><dd>
For each key, a basic_io stanza is printed. The public_location and
private_location items may have multiple values as shown above for
public_location, one value for each place that the key is stored. If
the private key does not exist, then the private_hash and
private_location items will be absent. given_name is the name provided
when the key was created, and local_name is the name returned by the
<code><a href="get_005flocal_005fkey_005fname.html#get_005flocal_005fkey_005fname">get_local_key_name</a></code> hook.
<p>The keys are ordered by hash value.
<br><dt><strong>Error conditions:</strong><dd>
None.
</dl>
<br><dt><samp><span class="command">mtn automate leaves</span></samp><a name="index-mtn-automate-leaves-230"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
None.
<br><dt><strong>Added in:</strong><dd>
0.1
<br><dt><strong>Purpose:</strong><dd>
Prints the leaves of the revision graph, i.e. all revision that have
no children.
<p>This is similar, but not identical to the functionality of
<samp><span class="command"><a href="mtn-automate-heads.html#mtn-automate-heads">mtn automate heads</a></span></samp>, which prints every revision in a
branch, that has no descendants in that branch. If every revision in
the database was in the same branch, then they would be identical.
Generally, every leaf is the head of some branch, but not every branch
head is a leaf.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each a leaf of the revision graph. Each line
consists of a revision ID, in hexadecimal, followed by a newline. The
lines are printed in alphabetically sorted order.
<br><dt><strong>Error conditions:</strong><dd>
None.
</dl>
<p><a name="mtn-automate-log"></a><br><dt><samp><span class="command">mtn automate log [</span><var>options</var><span class="command">] [</span><var>pathname...</var><span class="command">]</span></samp><a name="index-mtn-automate-log-_005b_0040var_007boptions_007d_005d-_005b_0040var_007bpathname_002e_002e_002e_007d_005d-231"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
[–depth=<var>n</var>] [–exclude=<var>path...</var>]
[–last=<var>n</var>] [–next=<var>n</var>] [–from=<var>id...</var>]
[–clear-from] [–to=<var>id...</var>] [–clear-to]
[–[no-]merges] [<var>pathname...</var>]
<p>Same as <samp><span class="command">mtn log</span></samp>, but without the output control options; see
<samp><span class="command"><a href="mtn-log.html#mtn-log">mtn log</a></span></samp>.
<br><dt><strong>Added in:</strong><dd>
12.2
<br><dt><strong>Purpose:</strong><dd>
Print the selected revisions on stdout, in topological order. The user
can then use other automate commands to retrieve additional
information about each revision.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 233afb8c4832bf33d5f5734225164de5f5a6278c
4a368a6b217c40b2ff3b12bb7cfa00987e0f191c
233afb8c4832bf33d5f5734225164de5f5a6278c
</pre>
<br><dt><strong>Output format:</strong><dd>
One revision per line.
<br><dt><strong>Error conditions:</strong><dd>
See <samp><span class="command"><a href="mtn-log.html#mtn-log">mtn log</a></span></samp>.
</dl>
<p><a name="mtn-automate-lua"></a><br><dt><samp><span class="command">mtn automate lua </span><var>function_name</var><span class="command"> [</span><var>function_args...</var><span class="command">]</span></samp><a name="index-mtn-automate-lua-_0040var_007bfunction_005fname_007d-_005b_0040var_007bfunction_005fargs_002e_002e_002e_007d_005d-232"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
A valid Lua function name and zero or more function arguments. Note that string
arguments need to be wrapped in another pair of quotes, i.e. <code>"foo"</code> or
<code>'foo'</code> will not work, but <code>"'foo'"</code> or <code>'"foo"'</code> will.
<p>A function arguments can be any valid Lua expression, including nested
tables and functions, like f.e. <code>{1,true,{['func'] =
function(...) return ... end }}</code>
<br><dt><strong>Added in:</strong><dd>
9.0
<br><dt><strong>Purpose:</strong><dd>
Call Lua functions, like monotone hooks, in the monotone context, f.e. to
retrieve user defaults like keys, passwords, ignorable files and more.
<br><dt><strong>Output format:</strong><dd>
A string dump of the return value of the function, in Lua code. The Lua types
<code>function</code>, <code>thread</code>, <code>userdata</code> and <code>lightuserdata</code> are not
serialized, but set to <code>nil</code> in the dump.
<p>Please note that <code>nil</code> values in tables are not printed since Lua does not
distinguish between unset and not existing entries in a table like other
programming languages do.
<br><dt><strong>Sample output:</strong><dd>
A single string return value:
<pre class="verbatim"> [1] = "Output";
</pre>
<p>Two numeric return values:
<pre class="verbatim"> [1] = 3;
[2] = 4.4;
</pre>
<p>A nested table:
<pre class="verbatim"> [1] = {
["bar"] = {
[1] = 1;
[2] = 2;
[3] = 3;
};
};
</pre>
<p>A callback function:
<pre class="verbatim"> [1] = nil --[[function]];
</pre>
<br><dt><strong>Error conditions:</strong><dd>
This command prints an error message and exists with status 1 if the function
does not exist, one or more function arguments could not be evaluated or the
function could not be called for another reason.
</dl>
<p><a name="mtn-automate-packet_005ffor_005ffdata"></a><br><dt><samp><span class="command">mtn automate packet_for_fdata </span><var>id</var></samp><a name="index-mtn-automate-packet_005ffor_005ffdata-_0040var_007bid_007d-233"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>id</var> specifies the file for which to output an fdata packet.
<br><dt><strong>Added in:</strong><dd>
2.0
<br><dt><strong>Purpose:</strong><dd>
Prints the file data in packet format
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> [fdata 229c7f621b65f7e4970ae5aaec993812b9daa1d4]
H4sIAAAAAAAA/z2OO27DMBBEe51ioMaNrJzBpQAjTXKBBTW0CJPcgFw6yO1DCkG62Q/em83j
R9vlRez6naPKzh2CwkipXFBJbO8fn7f7HV4LQq4mMYoFzdMYSnMj1xXY/lnuoHt2kB2hQpst
PREPZhaxvvchskIKkdU6xsXWvQsk76MOUquGVolZmmmh0+xxvf7JZ5jCFXbU4KZ1muYkT+Kw
FOez5q6uLuh9+9eoQawhez3Fp+VtHJNkfMmDHfALzWYfcAgBAAA=
[end]
</pre>
<br><dt><strong>Output format:</strong><dd>
File data in <samp><span class="command"><a href="mtn-read.html#mtn-read">mtn read</a></span></samp> compatible packet format.
<br><dt><strong>Error conditions:</strong><dd>
If <var>id</var> is unknown or invalid prints an error message to stderr
and exits with status 1.
</dl>
<p><a name="mtn-automate-packet_005ffor_005ffdelta"></a><br><dt><samp><span class="command">mtn automate packet_for_fdelta </span><var>from-id</var> <var>to-id</var></samp><a name="index-mtn-automate-packet_005ffor_005ffdelta-_0040var_007bfrom_002did_007d-_0040var_007bto_002did_007d-234"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
<var>from-id</var> specifies the file to use as the base of the delta,
and <var>to-id</var> specifies the file to use as the target of the delta.
<br><dt><strong>Added in:</strong><dd>
2.0
<br><dt><strong>Purpose:</strong><dd>
Prints the file delta in packet format.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> [fdelta 597049a62d0a2e6af7df0b19f4945ec7d6458727
229c7f621b65f7e4970ae5aaec993812b9daa1d4]
H4sIAAAAAAAA/0WOy0oEMRBF9/mKS2/c9LQg4t5lw+BGf6BIKtNhkpSkKop/b9II7m49OOfu
eHp5dnvEj/SHL0aQ75qFAgcQGmcm5RXKjP3t/eP1ekWUhlTVKGeyJNXNoXU/s27AP8sf7O8D
ZEdSSLd1JMaNKzeysY8ps4Iao4oNjM99eFdQDbMOSldDV8ZC3aSxlxpxufzJF5jANx6oyS2b
c0uhO+OwkpezZhCvK0bf8TVrMLZUo5zi0/I4j4UqPunGA+B+AfHvKEIPAQAA
[end]
</pre>
<br><dt><strong>Output format:</strong><dd>
File delta data in <samp><span class="command"><a href="mtn-read.html#mtn-read">mtn read</a></span></samp> compatible packet format.
<br><dt><strong>Error conditions:</strong><dd>
If <var>from-id</var> or <var>to-id</var> is unknown or invalid prints an error
message to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate packet_for_rdata </span><var>id</var></samp><a name="index-mtn-automate-packet_005ffor_005frdata-_0040var_007bid_007d-235"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>id</var> specifies the revision to output an rdata packet for.
<br><dt><strong>Added in:</strong><dd>
2.0
<br><dt><strong>Purpose:</strong><dd>
Prints the revision data in packet format
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> [rdata bdf3b10b5df0f17cc6c1b4b3351d84701bda59ed]
H4sIAAAAAAAA/0XQS27DMAwE0L1PIfgArb4kte62NzACg5SoJEBsF7aRurev0UVzgJl5mLas
E+/jU9ftvsymd33Xzfo9Tjzfm267GSgGwVarz6Valx0KtFYwii9VqUFCqJQ5X7puedRx1ef9
r2rwHlSbi+BUSrF4xn1p0RInkmxTbmwREp/BL97LzfQfN56v+rlc+860dZnMED01jhILkURJ
Ul0KPpGN1ueUwDHyiXF66Ywx+2IGD+0Uqg8aCzikAEzZNRXPmJKlkhMxSHuNzrofx/uq2/J4
6njV/bZsu/zMPOlbOY4XJSD5KOrwXGdwpDGdfotZayQHKTAi5fRPqUWKcAMMIQfAjOK0nkfm
6tFacjYgBPV46X4BtlpiNYUBAAA=
[end]
</pre>
<br><dt><strong>Output format:</strong><dd>
Revision data in <samp><span class="command"><a href="mtn-read.html#mtn-read">mtn read</a></span></samp> compatible packet format.
<br><dt><strong>Error conditions:</strong><dd>
If <var>id</var> is unknown or invalid prints an error message to stderr
and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate packets_for_certs </span><var>id</var></samp><a name="index-mtn-automate-packets_005ffor_005fcerts-_0040var_007bid_007d-236"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>id</var> specifies the revision for which to output cert packets.
<br><dt><strong>Added in:</strong><dd>
2.0
<br><dt><strong>Purpose:</strong><dd>
Prints the certs associated with a revision in packet format
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> [rcert bdf3b10b5df0f17cc6c1b4b3351d84701bda59ed
branch
njs@pobox.com
bmV0LnZlbmdlLm1vbm90b25l]
K90i1XHHmaMEMuwbPifFweLThJl0m7jigh2Qq6Z7TBwNJ6IMOjXWCizv73cacZ1CtzxFDVwQ
SlqhNWiPQWxdcMp+Uuo+V8IFMKmvxVSTuVDukLMuNAQqpGL5S+a+tEj68NMq+KLKuL8kAAPc
RoFD7GQlTS35S3RHWA4cnvqn+8U=
[end]
[rcert bdf3b10b5df0f17cc6c1b4b3351d84701bda59ed
date
njs@pobox.com
MjAwNi0wNC0wOFQxMTo1MDowMA==]
araz9A8x6AlK6m6UhwnhUhk7cdyxeE2nvzj2gwaDvkaBxOq4SN23/wnaPqUXx1Ddn8smzyRY
HN08xloYc0yNChp3wjbqx20REcsTg3XE4rN/sgCbqqw5hVT22a5ZhqkfkDeoeJvan0R0UBax
ngKYo9eLuABNlmFX2onca75JW1E=
[end]
[rcert bdf3b10b5df0f17cc6c1b4b3351d84701bda59ed
author
njs@pobox.com
bmpzQHBvYm94LmNvbQ==]
BLPOYhgLsAN+w7CwOsv9GfXnG3u7RNF1DTrWdn0AnYE1e+ptgTeMVWUI18H4OGL0B7wm08rv
Pxk/hvsb8fBn1Kf5HDDO2pbjJ0xVzI9+p+TR0y5jJNZlVSTj+nvtPgvK9NzsdooYWnwlWmJv
bOkAzQcZb8NMh8pbQkdHbR5uzMo=
[end]
[rcert bdf3b10b5df0f17cc6c1b4b3351d84701bda59ed
changelog
njs@pobox.com
MjAwNi0wNC0wOCAgTmF0aGFuaWVsIFNtaXRoICA8bmpzQHBvYm94LmNvbT4KCgkqIG5ldHh4
L3Jlc29sdmVfZ2V0aG9zdGJ5bmFtZS5jeHggKHJlc29sdmVfaG9zdG5hbWUpOiAjaWZkZWYg
b3V0CglXaW4zMi1pbmNvbXBhdGlibGUgZXJyb3IgcmVwb3J0aW5nIGNhbGwuCg==]
Ncl4L/oEPctzVQixTKA6FrLceeHnLiXfeyeFDNmtUFYg9BMUcjWkeyKmaWknLvOcHortxjto
K6pQ9E8S7zI+TpzFAhssg5a///rFL0+2GJU3t6pcHs6LC0Q4tbqzwKd/5+8GwT1gphbM1wm7
KuzKthwqD3pp49GbgTrp8iWMTr0=
[end]
</pre>
<br><dt><strong>Output format:</strong><dd>
Cert data in <samp><span class="command"><a href="mtn-read.html#mtn-read">mtn read</a></span></samp> compatible packet format.
<br><dt><strong>Error conditions:</strong><dd>
If <var>id</var> is unknown or invalid prints an error message to stderr
and exits with status 1.
</dl>
<p><a name="mtn-automate-parents"></a><br><dt><samp><span class="command">mtn automate parents </span><var>rev</var></samp><a name="index-mtn-automate-parents-_0040var_007brev_007d-237"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One revision ID.
<br><dt><strong>Added in:</strong><dd>
0.2
<br><dt><strong>Purpose:</strong><dd>
Prints the immediate parents of a revision. This is like a
non-recursive version of <samp><span class="command"><a href="mtn-automate-ancestors.html#mtn-automate-ancestors">mtn automate ancestors</a></span></samp>.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each giving the ID of one parent of the given
revision. Each line consists of a revision ID, in hexadecimal,
followed by a newline. The lines are printed in alphabetically sorted
order.
<br><dt><strong>Error conditions:</strong><dd>
If the given revision <var>rev</var> does not exist, prints nothing to
stdout, prints an error message to stderr, and exits with status 1.
</dl>
<p><a name="mtn-automate-pull"></a><br><dt><samp><span class="command">mtn automate pull [--[no-]set-default] [--dry-run] [</span><var>uri</var><span class="command">]</span></samp><a name="index-mtn-automate-pull-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_002d_002ddry_002drun_005d-_005b_0040var_007buri_007d_005d-238"></a><dt><samp><span class="command">mtn automate push [--[no-]set-default] [--dry-run] [--keys-to-push=</span><var>key</var><span class="command">] [</span><var>uri</var><span class="command">]</span></samp><a name="index-mtn-automate-push-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_002d_002ddry_002drun_005d-_005b_002d_002dkeys_002dto_002dpush_003d_0040var_007bkey_007d_005d-_005b_0040var_007buri_007d_005d-239"></a><dt><samp><span class="command">mtn automate sync [--[no-]set-default] [--dry-run] [--keys-to-push=</span><var>key</var><span class="command">] [</span><var>uri</var><span class="command">]</span></samp><a name="index-mtn-automate-sync-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_002d_002ddry_002drun_005d-_005b_002d_002dkeys_002dto_002dpush_003d_0040var_007bkey_007d_005d-_005b_0040var_007buri_007d_005d-240"></a><dt><samp><span class="command">mtn automate pull [--[no-]set-default] [</span><var>address</var><span class="command">] [</span><var>glob</var><span class="command"> [...] [--exclude=</span><var>exclude-glob</var><span class="command">]]] </span><strong>deprecated</strong></samp><a name="index-mtn-automate-pull-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_0040var_007baddress_007d_005d-_005b_0040var_007bglob_007d-_005b_002e_002e_002e_005d-_005b_002d_002dexclude_003d_0040var_007bexclude_002dglob_007d_005d_005d_005d-_0040strong_007bdeprecated_007d-241"></a><dt><samp><span class="command">mtn automate push [--[no-]set-default] [--keys-to-push=</span><var>key</var><span class="command">] [</span><var>address</var><span class="command">] [</span><var>glob</var><span class="command"> [...] [--exclude=</span><var>exclude-glob</var><span class="command">]]] </span><strong>deprecated</strong></samp><a name="index-mtn-automate-push-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_002d_002dkeys_002dto_002dpush_003d_0040var_007bkey_007d_005d-_005b_0040var_007baddress_007d_005d-_005b_0040var_007bglob_007d-_005b_002e_002e_002e_005d-_005b_002d_002dexclude_003d_0040var_007bexclude_002dglob_007d_005d_005d_005d-_0040strong_007bdeprecated_007d-242"></a><dt><samp><span class="command">mtn automate sync [--[no-]set-default] [--keys-to-push=</span><var>key</var><span class="command">] [</span><var>address</var><span class="command">] [</span><var>glob</var><span class="command"> [...] [--exclude=</span><var>exclude-glob</var><span class="command">]]] </span><strong>deprecated</strong></samp><a name="index-mtn-automate-sync-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_005b_002d_002dkeys_002dto_002dpush_003d_0040var_007bkey_007d_005d-_005b_0040var_007baddress_007d_005d-_005b_0040var_007bglob_007d-_005b_002e_002e_002e_005d-_005b_002d_002dexclude_003d_0040var_007bexclude_002dglob_007d_005d_005d_005d-_0040strong_007bdeprecated_007d-243"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The automate versions of pull, push and sync have the same set of
arguments and options as the non-automate versions. See <a href="Network.html#Network">Network</a>
for a full explanation.
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>13.0 – add sent/received revision, cert, and key output; add –dry-run.
<li>12.0 – added
</ul>
<br><dt><strong>Purpose:</strong><dd>
Pushes, pulls or syncs (push & pull) revisions, certificates and keys of
the given database to, from or with the given netsync server.
<br><dt><strong>Sample output:</strong><dd>The following is example main channel data, non-dry-run:
<pre class="verbatim"> receive_cert "test"
value "value"
key [05c26b6cb109ca39bc48bbbdce83564c97796155]
revision [114f6aa58c7707bf83516d4080ca6268c36640ad]
receive_revision [114f6aa58c7707bf83516d4080ca6268c36640ad]
receive_cert "branch"
value "foo"
key [46ec58576f9e4f34a9eede521422aa5fd299dc50]
revision [114f6aa58c7707bf83516d4080ca6268c36640ad]
receive_cert "changelog"
value "R1
"
key [46ec58576f9e4f34a9eede521422aa5fd299dc50]
revision [114f6aa58c7707bf83516d4080ca6268c36640ad]
receive_cert "date"
value "2010-09-01T12:00:00"
key [46ec58576f9e4f34a9eede521422aa5fd299dc50]
revision [114f6aa58c7707bf83516d4080ca6268c36640ad]
receive_cert "author"
value "tester@test.net"
key [46ec58576f9e4f34a9eede521422aa5fd299dc50]
revision [114f6aa58c7707bf83516d4080ca6268c36640ad]
receive_key [111808abc306fd7423b564f2a8ef5c09745b87d2]
send_cert "test"
value "value"
key [05c26b6cb109ca39bc48bbbdce83564c97796155]
revision [114f6aa58c7707bf83516d4080ca6268c36640ad]
send_revision [2a46f4b909071fae756b4911a247ce3ff1c3c4ce]
send_cert "branch"
value "foo2"
key [46ec58576f9e4f34a9eede521422aa5fd299dc50]
revision [2a46f4b909071fae756b4911a247ce3ff1c3c4ce]
send_cert "changelog"
value "R2
"
key [46ec58576f9e4f34a9eede521422aa5fd299dc50]
revision [2a46f4b909071fae756b4911a247ce3ff1c3c4ce]
send_cert "date"
value "2010-09-01T12:00:00"
key [46ec58576f9e4f34a9eede521422aa5fd299dc50]
revision [2a46f4b909071fae756b4911a247ce3ff1c3c4ce]
send_cert "author"
value "tester@test.net"
key [46ec58576f9e4f34a9eede521422aa5fd299dc50]
revision [2a46f4b909071fae756b4911a247ce3ff1c3c4ce]
send_key [05c26b6cb109ca39bc48bbbdce83564c97796155]
</pre>
<p>The following is example dry-run main channel data:
<pre class="verbatim"> estimate
receive_revision "0"
receive_cert "0"
receive_key "0"
send_revision "1"
send_cert "5"
send_key "0"
send_branch "foo2" "1"
</pre>
<p>The following shows the progress and ticker data for a pull
which transferred two revisions and eight certs.
<p><em>Note:</em> The linebreaks are not part of the actual format, but have been
added for better readability.
<pre class="verbatim"> 0:p:62:doing anonymous pull; use -kKEYNAME if you need authentication
0:p:46:connecting to mtn://code.monotone.ca/monotone0:0:p:29:finding items to synchronize:
0:t:34:c:certificates;k:keys;r:revisions;
0:t:12:c=0;k=0;r=0;
0:t:13:c#0;k#0;r#64;
0:t:14:c#0;k#0;r#128;
[...]
0:t:6:c;k;r;
0:t:44:>:bytes in;<:bytes out;c:certs in;r:revs in;
0:t:16:>=0;<=0;c=0;r=0;
0:t:21:>#420;<#1344;c#0;r#0;
0:t:22:>#1165;<#1741;c#0;r#0;
[...]
0:t:24:>#20839;<#14882;c#0;r#1;
0:t:24:>#20839;<#14882;c#3;r#1;
0:t:24:>#20839;<#14882;c#4;r#2;
0:t:24:>#20839;<#14882;c#6;r#2;
0:t:24:>#20863;<#14930;c#8;r#2;
0:t:8:<;>;c;r;
0:p:36:successful exchange with mtn://code.monotone.ca/monotone
0:l:1:0
</pre>
<br><dt><strong>Output format:</strong><dd>
Output consists of sent and received revisions, certs, and keys in the
main stdio channel, progress messages, and ticker data for bytes,
revisions, certs and keys.
<p>For non-dry-run, all stanzas are optional; they are only output if the
data they describe is transferred.
<p>A partial order is imposed, that the parser can use in deciding how to
store the data. First all certs associated with revisions that are not
transferred in this sync are output, then revisions with associated
certs, then keys. All received data is output before all sent data.
<p>For each cert not associated with a transmitted revision,
there is a stanza giving the cert name, value, key, and revision.
<p>For each revision, there is a stanza containing the revision
id, followed by a stanza containing the cert name, value, key, and
revision id for each cert associated with the revision.
<p>For each key, there is one stanza containing one line giving the key
id.
<p>If run outside of <samp><span class="command">automate stdio</span></samp>, the progress and ticker
output of these commands is equal to the normal netsync command
progress and ticker output.
<p>If these commands are run over stdio, the stdio ticker format is used
(for a description of this format, see <samp><span class="command"><a href="mtn-automate-stdio.html#mtn-automate-stdio">mtn automate stdio</a></span></samp>).
<p>The following ticker types are printed out during the refinement phase:
<ul>
<li><code>c</code>: The number of certs found for an upcoming synchronization
<li><code>k</code>: The number of keys found for an upcoming synchronization
<li><code>r</code>: The number of revisions found for an upcoming synchronization
</ul>
<p>After refinement the actual synchronization between the two nodes start. The
ticker stanzas in this phase are the following:
<ul>
<li><code>></code>: The number of incoming bytes
<li><code><</code>: The number of outgoing bytes
<li><code>c</code>: The number of incoming certs (only pull and sync)
<li><code>C</code>: The number of outgoing certs (only push and sync)
<li><code>r</code>: The number of incoming revisions (only pull and sync)
<li><code>R</code>: The number of outgoing revisions (only push and sync)
</ul>
<p>For dry-run, one stanza is output, with optional lines giving the
revision, cert, and key counts for send and receive. Under some
circumstances, the number of keys that would be received is only an
estimate; in that case, the symbol <code>estimate</code> is output. For
send, the branch names of sent revisions are also output. Note that in
the branch list, revisions that have multiple branch certs are listed
twice, so the sum of the revision counts in the branch list may be
greater than the number of revisions transferred.
<br><dt><strong>Error conditions:</strong><dd>
If a netsync error occurs, the command outputs an error and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate put_file [</span><var>base-id</var><span class="command">] </span><var>contents</var></samp><a name="index-mtn-automate-put_005ffile-_005b_0040var_007bbase_002did_007d_005d-_0040var_007bcontents_007d-244"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The optional <var>base-id</var> specifies a file-id on which the contents are
based. This is used for delta encoding. <var>contents</var> are the contents of
the new file.
<p>If <var>base-id</var> is not given, the file is a new file, and no delta is
stored.
<br><dt><strong>Added in:</strong><dd>
4.1
<br><dt><strong>Purpose:</strong><dd>
Preparation of a workspace-less commit. See <samp><span class="command"><a href="mtn-automate-put_005frevision.html#mtn-automate-put_005frevision">mtn automate put_revision</a></span></samp>.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 70a0f283898a18815a83df37c902e5f1492e9aa2
</pre>
<br><dt><strong>Output format:</strong><dd>
The sha1 sum of the contents, hex encoded.
<br><dt><strong>Error conditions:</strong><dd>
If the optional base id is unknown prints an error message to stderr and
exits with status 1.
</dl>
<p><a name="mtn-automate-put_005fpublic_005fkey"></a><br><dt><samp><span class="command">mtn automate put_public_key </span><var>key-packet-data</var></samp><a name="index-mtn-automate-put_005fpublic_005fkey-_0040var_007bkey_002dpacket_002ddata_007d-245"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
A data packet, <var>key-packet-data</var>, as produced by <samp><span class="command"><a href="mtn-automate-get_005fpublic_005fkey.html#mtn-automate-get_005fpublic_005fkey">mtn automate get_public_key</a></span></samp>.
<br><dt><strong>Changes:</strong><dd>
13.0 – initial
<br><dt><strong>Purpose:</strong><dd>
Store public keys into the database.
<p>Note that this duplicates part of <samp><span class="command"><a href="mtn-automate-read_005fpackets.html#mtn-automate-read_005fpackets">mtn automate read_packets</a></span></samp>; the
intent is to deprecate <samp><span class="command">automate read_packets</span></samp>, and only keep
facilities for key packets.
<br><dt><strong>Output format:</strong><dd>
No output.
<br><dt><strong>Error conditions:</strong><dd>
An error will be produced if the argument is not a valid key packet.
</dl>
<p><a name="mtn-automate-put_005frevision"></a><br><dt><samp><span class="command">mtn automate put_revision </span><var>revision-data</var></samp><a name="index-mtn-automate-put_005frevision-_0040var_007brevision_002ddata_007d-246"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
<var>revision-data</var> is the new revision.
<br><dt><strong>Added in:</strong><dd>
4.1
<br><dt><strong>Purpose:</strong><dd>
Workspace-less commit.
<p>Note that the new_manifest entry is ignored – <samp><span class="command">put_revision</span></samp>
will ignore whatever you put here and calculate the correct manifest
id itself. (However, for now, you must put 40 hex digits here – it's
just that which particular digits you put are entirely irrelevant.
All zeros is a good choice.) Monotone will also canonicalize your
whitespace automatically. You do not need to worry about getting just
the right amount of indentation in front of each line. However,
everything else about your revision must be valid.
<br><dt><strong>Sample argument:</strong><dd>
<pre class="smallexample"> format_version "1"
new_manifest [0000000000000000000000000000000000000004]
old_revision []
add_dir ""
add_file "foo"
content [5bf1fd927dfb8679496a2e6cf00cbe50c1c87145]
</pre>
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 4c2c1d846fa561601254200918fba1fd71e6795d
</pre>
<br><dt><strong>Output format:</strong><dd>
The new revision id, hex encoded.
<br><dt><strong>Error conditions:</strong><dd>
If the changeset is invalid prints an error message to stderr and
exits with status 1. May abort on invalid formats. If the revision is
already present in the database, prints a message to stderr noting
this fact, but otherwise works as normal.
</dl>
<p><a name="mtn-automate-read_005fpackets"></a><br><dt><samp><span class="command">mtn automate read_packets </span><var>packet-data</var></samp><a name="index-mtn-automate-read_005fpackets-_0040var_007bpacket_002ddata_007d-247"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
A data packet, <var>packet-data</var>, as produced by <samp><span class="command"><a href="mtn-pubkey.html#mtn-pubkey">mtn pubkey</a></span></samp>.
<br><dt><strong>Added in:</strong><dd>
9.0
<br><dt><strong>Purpose:</strong><dd>
Store public keys (and incidentally anything else that can be represented as
a packet) into the database.
<br><dt><strong>Output format:</strong><dd>
No output.
<br><dt><strong>Error conditions:</strong><dd>
An error will be produced if the argument is not a valid packet.
</dl>
<br><dt><samp><span class="command">mtn automate remote [--remote-stdio-host=</span><var>host</var><span class="command">] [--[no-]set-default] </span><var>command</var> <var>args-and-opts</var></samp><a name="index-mtn-automate-remote-_005b_002d_002dremote_002dstdio_002dhost_003d_0040var_007bhost_007d_005d-_005b_002d_002d_005bno_002d_005dset_002ddefault_005d-_0040var_007bcommand_007d-_0040var_007bargs_002dand_002dopts_007d-248"></a><dd>
<dl>
<dt><strong>Arguments</strong><dd>
A command and its arguments, to execute on the remote server specified
by the <samp><span class="option">--remote-stdio-host</span></samp> option (defaults to server stored
in the database). If options are to be passed to the command, they must be
preceded by <samp><span class="option">--</span></samp> to prevent them from being interpreted as
local options.
<p>Remote options <strong>must</strong> be given as a single token, ie
<samp><span class="option">--branch=foo</span></samp> or <samp><span class="option">-bfoo</span></samp>. This is because the local and remote
monotones may not understand exactly the same options (so the local monotone
cannot know if an option given as <samp><span class="option">--branch</span></samp> or <samp><span class="option">-b</span></samp> should be
followed by an argument), and because the server sees this as an
<code>automate remote_stdio</code> connection (so it expects the options to already
be parsed).
<br><dt><strong>Added in</strong><dd>
12.0
<br><dt><strong>Purpose</strong><dd>
Permit a single <code>automate</code> command to be run against a database that is
being used to serve netsync connections, without having its input and output
encoded as by <code>automate stdio</code>.
<br><dt><strong>Input/Output Format</strong><dd>
This command does not accept input.
<p>The output will be whatever output the remote command generates.
<p>Remote diagnostic messages are written to standard error, prefixed either
with <code>mtn: remote error:</code>, <code>mtn: remote warning:</code> or
<code>mtn: remote message:</code> to make them distinguishable from local
diagnostics. Tickers are not supported over this interface. If you need
remote ticker support, see <samp><span class="command"><a href="mtn-automate-remote_005fstdio.html#mtn-automate-remote_005fstdio">mtn automate remote_stdio</a></span></samp>.
<br><dt><strong>Error Conditions</strong><dd>
If the remote command returns a nonzero error code, will exit with code 1 and
print "received remote error code N" to standard error, with "N" being
the remote error code.
<br><dt><strong>Notes</strong><dd>
If no database is specified, a <samp><span class="command">:memory:</span></samp> database is used.
<p>On the server side the <code>get_remote_automate_permitted</code> hook has to be
configured to include every command which should be executable over this
interface.
<p>Keyboard interaction is disabled on the server, just as if
<samp><span class="option">--non-interactive</span></samp> would have been specified on server startup.
Actions which require operations on password-encrypted private keys will
therefor fail unless a <a href="get_005fpassphrase.html#get_005fpassphrase">get_passphrase</a> hook is set up remotely.
</dl>
<p><a name="mtn-automate-remote_005fstdio"></a><br><dt><samp><span class="command">mtn automate remote_stdio [</span><var>hostname</var><span class="command">]</span></samp><a name="index-mtn-automate-remote_005fstdio-_005b_0040var_007bhostname_007d_005d-249"></a><dd>
<dl>
<dt><strong>Arguments</strong><dd>
<var>hostname</var> is the host (and optionally port) of the monotone server
process to connect to. If not given, the default server is used.
<br><dt><strong>Added in</strong><dd>
12.0
<br><dt><strong>Purpose</strong><dd>
Permit <code>automate</code> commands to be run against a database that is
being used to serve netsync connections.
<br><dt><strong>Input/Output format</strong><dd>
This command takes input and produces output in exactly the
same format as <code>automate stdio</code>. Note that the commands run with
<code>automate remote_stdio</code> may conform to a different <var>interface_version</var>,
because they are handled by a remote instance of monotone.
<p>There will be some extra chatter on stderr unless <samp><span class="option">--quiet</span></samp> is given.
<br><dt><strong>Error Conditions</strong><dd>
If left idle for too long or there are network problems, the connection to the
server may be dropped. This will not be detected while monotone is waiting for
input. Instead, when a complete command has been entered and monotone tries to
send it to the remote server it will print a message to stderr and exit with
code 1.
<br><dt><strong>Notes</strong><dd>
If no database is specified, a <samp><span class="command">:memory:</span></samp> database is used.
<p>On the server side the <code>get_remote_automate_permitted</code> hook has to be
configured to include every command which should be executable over this
interface.
<p>For both, the client and the server, keyboard interaction is disabled,
just as if <samp><span class="option">--non-interactive</span></samp> is specified. Actions which require
operations on password-encrypted private keys will therefor fail unless the
<a href="get_005fpassphrase.html#get_005fpassphrase">get_passphrase</a> hook is set up locally and / or remotely.
</dl>
<br><dt><samp><span class="command">mtn automate roots</span></samp><a name="index-mtn-automate-roots-250"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
None.
<br><dt><strong>Added in:</strong><dd>
4.3
<br><dt><strong>Purpose:</strong><dd>
Prints the roots of the revision graph, i.e. all revisions that have
no parents.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 276264b0b3f1e70fc1835a700e6e61bdbe4c3f2f
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each a root of the revision graph. Each line
consists of a revision ID, in hexadecimal, followed by a newline. The
lines are printed in alphabetically sorted order.
<br><dt><strong>Error conditions:</strong><dd>
None.
</dl>
<br><dt><samp><span class="command">mtn automate select </span><var>selector</var></samp><a name="index-mtn-automate-select-_0040var_007bselector_007d-251"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One selector (or combined selector).
<br><dt><strong>Added in:</strong><dd>
0.2
<br><dt><strong>Purpose:</strong><dd>
Print all revisions that match the given selector.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
Zero or more lines, each giving the ID of one revision that matches the
given selector. Each line consists of a revision ID, in hexadecimal,
followed by a newline. Revision ids are printed in alphabetically
sorted order.
<br><dt><strong>Error conditions:</strong><dd>
None.
</dl>
<br><dt><samp><span class="command">mtn automate set_attribute </span><var>path</var> <var>key</var> <var>value</var></samp><a name="index-mtn-automate-set_005fattribute-_0040var_007bpath_007d-_0040var_007bkey_007d-_0040var_007bvalue_007d-252"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
A path, an attribute key and an attribute value.
<br><dt><strong>Added in:</strong><dd>
5.0
<br><dt><strong>Purpose:</strong><dd>
Edits the current workspace revision and inserts the given attribute key and
value for the specified path. Note that this change is not committed and
therefor behaves exactly like <samp><span class="command">mtn attr set </span><var>key</var> <var>value</var></samp>.
<br><dt><strong>Output format:</strong><dd>
This command does not print out anything if successful.
<br><dt><strong>Error conditions:</strong><dd>
If the path specified is unknown in the new workspace revision, prints an error
message to stderr and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate set_db_variable </span><var>domain</var> <var>name</var> <var>value</var></samp><a name="index-mtn-automate-set_005fdb_005fvariable-_0040var_007bdomain_007d-_0040var_007bname_007d-_0040var_007bvalue_007d-253"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
The <var>domain</var> and <var>name</var> specify the database variable
which is changed to <var>value</var>.
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>7.0 – renamed to 'set_db_variable'
<li>4.1 – added as 'db_set'
</ul>
<br><dt><strong>Purpose:</strong><dd>
Change a database variable; see <a href="Vars.html#Vars">Vars</a>.
<br><dt><strong>Sample usage:</strong><dd>
<pre class="verbatim"> mtn automate set_db_variable database default-server off.net
</pre>
<br><dt><strong>Output format:</strong><dd>
No output.
<br><dt><strong>Error conditions:</strong><dd>
None.
</dl>
<p><a name="mtn-automate-show_005fconflicts"></a><br><dt><samp><span class="command">mtn automate show_conflicts [</span><var>–branch BRANCH</var><span class="command">] [</span><var>left_rev right_rev</var><span class="command">]</span></samp><a name="index-mtn-automate-show_005fconflicts-_005b_0040var_007b_002d_002dbranch-BRANCH_007d_005d-_005b_0040var_007bleft_005frev-right_005frev_007d_005d-254"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
Optional left and right revision ids.
<p>If no revs are given, they default to the first two heads that would
be chosen by the <samp><span class="command">merge</span></samp> command for the current branch. If no
workspace is present, the branch may be given by the <var>–branch</var>
option.
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>11.0 – Add resolution for orphaned node conflicts. Deleted
<code>resolved_user</code> conflict resolution; use <code>resolved_*_left</code>
for single file conflicts. Add <code>resolved_keep_left,
resolved_keep_right</code> resolutions.
<li>9.0 – Added default resolution for file content conflicts, user
resolutions for others. <code>directory_loop_created</code> changed to <code>directory_loop</code>.
<li>8.0 – initial
</ul>
<br><dt><strong>Purpose:</strong><dd>
Show all conflicts between two revisions.
<p>This is intended to be used before a <samp><span class="command">merge</span></samp>; an external tool
can guide the user thru resolving each conflict in turn, then do the
merge.
<p>The same file format is output by the <samp><span class="command">conflicts store</span></samp>
command, which also allows specifying user conflict resolutions. The
file syntax for the resolutions is given here, so an external tool can
set them directly.
<p>For more information on conflicts, see <a href="Merge-Conflicts.html#Merge-Conflicts">Merge Conflicts</a>.
<p>Note that this cannot be used to show conflicts that would occur in an
<samp><span class="command">update</span></samp>, since in that case one revision is the workspace.
<br><dt><strong>Sample output:</strong><dd>
The output starts by listing the revisions and their common ancestor:
<pre class="verbatim"> left [532ab5011ea9e64aa212d4ea52363b1b8133d5ba]
right [b94a03a922c2c281a88d8988db64e76a32edb6a1]
ancestor [ead03530f5fefe50c9010157c42c0ebe18086559]
</pre>
<p>If there are no conflicts, the ancestor revision is not output, and no
conflict stanzas are output.
<p>Attribute changed in both branches, or dropped in one:
<pre class="verbatim"> conflict attribute
node_type "file"
attr_name "attr1"
ancestor_name "foo"
ancestor_file_id [bab2022ff2ed13501a8a83bcc6bd53f5042141be]
left_name "foo"
left_file_id [bab2022ff2ed13501a8a83bcc6bd53f5042141be]
left_attr_value "valueX"
right_name "foo"
right_file_id [bab2022ff2ed13501a8a83bcc6bd53f5042141be]
right_attr_value "valueZ"
conflict attribute
node_type "file"
attr_name "attr2"
ancestor_name "foo"
ancestor_file_id [bab2022ff2ed13501a8a83bcc6bd53f5042141be]
left_name "foo"
left_file_id [bab2022ff2ed13501a8a83bcc6bd53f5042141be]
left_attr_value "valueY"
right_name "foo"
right_file_id [bab2022ff2ed13501a8a83bcc6bd53f5042141be]
right_attr_state "dropped"
</pre>
<p>Missing root directory:
<pre class="verbatim"> conflict missing_root
left_type "pivoted root"
ancestor_name "foo"
right_type "deleted directory"
ancestor_name "foo"
</pre>
<p>Directory deleted and/or renamed:
<pre class="verbatim"> conflict orphaned_directory
right_type "deleted directory"
ancestor_name ""
left_type "renamed directory"
ancestor_name ""
left_name "bar"
conflict orphaned_file
right_type "deleted directory"
ancestor_name "foo"
left_type "added file"
left_name "foo/baz"
left_file_id [f5122a7f896cb2dd7ecaa84be89c94ab09c15101]
conflict orphaned_file
right_type "deleted directory"
ancestor_name "foo"
left_type "renamed file"
ancestor_name "bar"
ancestor_file_id [ac4c6d06436632e017bb7d3ea241734e8899f8ce]
left_name "foo/baz"
left_file_id [ac4c6d06436632e017bb7d3ea241734e8899f8ce]
conflict multiple_names
left_type "renamed directory"
ancestor_name ""
left_name "aaa"
right_type "renamed directory"
ancestor_name ""
right_name "bbb"
conflict duplicate_name
left_type "renamed directory"
ancestor_name "foo"
left_name ""
right_type "renamed directory"
ancestor_name "bar"
right_name ""
conflict multiple_names
left_type "renamed directory"
ancestor_name "foo"
left_name "a/foo"
right_type "renamed directory"
ancestor_name "foo"
right_name "b/foo"
</pre>
<p>Directory loop created:
<pre class="verbatim"> conflict directory_loop
left_type "renamed directory"
ancestor_name "foo"
left_name "bar/foo"
right_type "renamed directory"
ancestor_name "bar"
right_name "foo/bar"
</pre>
<p>File content changed (this may be resolvable by the internal line
merger), file also renamed:
<pre class="verbatim"> conflict content
node_type "file"
ancestor_name "bar"
ancestor_file_id [f0ef49fe92167fe2a086588019ffcff7ea561786]
left_name "bar"
left_file_id [08cd878106a93ce2ef036a32499c1432adb3ee0d]
right_name "bar"
right_file_id [0cf419dd93d38b2daaaf1f5e0f3ec647745b9690]
resolved_internal
conflict content
node_type "file"
ancestor_name "foo"
ancestor_file_id [50bf338804db2685a575124c8c8371d06b65c523]
left_name "bar"
left_file_id [f1bb6fff2ad16d67143d89fc374ede7abec5d437]
right_name "baz"
right_file_id [b966b2d35b99e456cb0c55e4573ef0b1b155b4a9]
</pre>
<code>resolved_internal</code> is a conflict resolution. If the file
contents in the two revs can be successfully merged by the internal
line merger, <code>resolved_internal</code> is output.
<p>File added and/or renamed:
<pre class="verbatim"> conflict duplicate_name
left_type "added file"
left_name "bar"
left_file_id [ba4637112ee3e55a6106d647d6c4e04a6643f8eb]
right_type "added file"
right_name "bar"
right_file_id [fe6d523f607e2f2fc0f0defad3bda0351a95a337]
conflict duplicate_name
left_type "renamed file"
ancestor_name "foo"
ancestor_file_id [c6864a8456855c48afe83488a47501fe8b94bd57]
left_name "bar"
left_file_id [c6864a8456855c48afe83488a47501fe8b94bd57]
right_type "added file"
right_name "bar"
right_file_id [c809d71002ec57a2f1d10221f05993012a491436]
conflict duplicate_name
left_type "renamed file"
ancestor_name "foo"
ancestor_file_id [918f3642b57a5e2dd13ee874e3dc2518a53ab4b4]
left_name "abc"
left_file_id [918f3642b57a5e2dd13ee874e3dc2518a53ab4b4]
right_type "renamed file"
ancestor_name "bar"
ancestor_file_id [bdf46a521d5f1dd54c31dda15e99ff6b0c80394a]
right_name "abc"
right_file_id [bdf46a521d5f1dd54c31dda15e99ff6b0c80394a]
</pre>
<p>File renamed to different names:
<pre class="verbatim"> conflict multiple_names
left_type "renamed file"
ancestor_name "foo"
ancestor_file_id [e80910e54d0bdea1b6d295ada320b87aaf9fdc23]
left_name "bar"
left_file_id [e80910e54d0bdea1b6d295ada320b87aaf9fdc23]
right_type "renamed file"
ancestor_name "foo"
ancestor_file_id [e80910e54d0bdea1b6d295ada320b87aaf9fdc23]
right_name "baz"
right_file_id [e80910e54d0bdea1b6d295ada320b87aaf9fdc23]
</pre>
<p>Invalid file name (<samp><span class="file">_MTN</span></samp> in root directory):
<pre class="verbatim"> conflict invalid_name
left_type "pivoted root"
ancestor_name "foo"
right_type "added directory"
right_name "foo/_MTN"
conflict invalid_name
left_type "pivoted root"
ancestor_name "foo"
right_type "renamed file"
ancestor_name "bad/_MTN"
ancestor_file_id [629d9e5d254241abf4b46f108fb53189e314e41d]
right_name "foo/_MTN"
right_file_id [629d9e5d254241abf4b46f108fb53189e314e41d]
</pre>
<p>Revisions that don't share a common ancestor:
<pre class="verbatim"> left [161e426c3b0c3f98d0be225f69d6f893ce8e0442]
right [0e3260f51acd1e98c40666557eb6c0eefeae5f02]
ancestor []
conflict missing_root
conflict duplicate_name
left_type "added directory"
left_name ""
right_type "added directory"
right_name ""
</pre>
<p>All possible conflict resolutions:
<pre class="verbatim"> resolved_drop_left
resolved_drop_right
resolved_keep_left
resolved_keep_right
resolved_internal
resolved_rename_left file
resolved_rename_right file
resolved_user_left file
resolved_user_right file
</pre>
For single file conflicts, the <code>resolved_*_left</code> resolution name is used.
<p>See <a href="Conflicts.html#Conflicts">Conflicts</a>, for more information on conflict resolutions.
<br><dt><strong>Output format:</strong><dd>
First the revision ids of the left and right revisions, and their
common ancestor, are printed in one basic_io stanza.
<p>Then each conflict is listed in a basic_io stanza. Stanzas are
separated by blank lines.
<p>Each conflict stanza starts with a <code>conflict</code> line, and contains
up to eleven lines. The order of the lines is not important, and may
change in future revisions, except that the first line will always be
<code>conflict</code>.
<p>When the conflicts involve files, the file ids are output, so the file
contents can be retrieved efficiently via <code>automate get_file</code>,
to aid in conflict resolution.
<p>Only the <samp><span class="command">resolved_internal</span></samp> conflict resolution is output by
this command; the other conflict resolutions are inserted in a
conflicts file by <samp><span class="command">conflicts resolve_first</span></samp> or an external
tool, and read by <samp><span class="command">merge</span></samp>.
<br><dt><strong>Error conditions:</strong><dd>
If the revision IDs are given, but either is unknown or
invalid, prints an error message to stderr and exits with status 1.
</dl>
<p><a name="mtn-automate-stdio"></a><br><dt><samp><span class="command">mtn automate stdio</span></samp><a name="index-mtn-automate-stdio-255"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
none
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>12.0 – Introduced out of band streams ('e', 'p', 't', 'w'); the main output
of a command now only happens in the 'm' stream; the 'l' stream now marks
the end of all streams of a command; introduced the concept of "headers"
which are output before the first command is issued; specific error codes
to distinguish command from interface errors have also been introduced.
<li>3.1 – Added the 'o' item to the recognized input. This change should not
break anything.
<li>1.0 – Initial version.
</ul>
<br><dt><strong>Purpose:</strong><dd>
Allow multiple automate commands to be run from one instance of monotone.
<br><dt><strong>Sample input:</strong><dd>
<pre class="verbatim"> l6:leavese
l7:parents40:0e3171212f34839c2e3263e7282cdeea22fc5378e
o3:key11:foo@bar.come l4:cert40:0e3171212f34839c2e3263e7282cdeea22fc53783:foo3:bare
</pre>
<br><dt><strong>Input format:</strong><dd>
<pre class="verbatim"> [ 'o' <string> <string> [ <string> <string> [ ... ] ] 'e' ]
'l' <string> [ <string> [ ... ] ] 'e'
</pre>
<p>The input is a series of commands and options. The command name plus
arguments are provided as 'l' <string> [<string> ...] 'e', where
<string> = <size> colon <data> . This may optionally be preceded by a
set of key=value pairs (command options) as 'o' <string> <string>
[<string> <string> ...] 'e', where strings come in pairs, key followed
by value. For flag options that don't take values, specify the second
string as zero length; <code>0:</code>. The option names do <em>not</em>
include the leading <samp><span class="command">--</span></samp>.
<p>The space between the ending 'e' of one group of strings and the beginning
'l' or 'o' of the next is reserved. Any characters other than whitespace
will cause an error.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> format-version: 2
0:m:41:7706a422ccad41621c958affa999b1a1dd644e79
0:l:1:0
...
1:e:38:misuse: key 'test@test' already exists
1:l:1:2
...
2:w:39:skipping file '\' with unsupported name
2:m:144: path ""
old_type "directory"
new_type "directory"
fs_type "directory"
birth [276264b0b3f1e70fc1835a700e6e61bdbe4c3f2f]
status "known"
...
3:t:34:c:certificates;k:keys;r:revisions;
3:t:12:c=0;k=0;r=0;
3:t:13:c#0;k#0;r#64;
3:t:14:c#0;k#0;r#128;
3:t:6:c;k;r;
...
</pre>
<br><dt><strong>Output format:</strong><dd>
Right after a stdio session has been set up, header information is
issued; to date the only header defined is <code>format-version</code>,
which denotes the version of the stdio format used throughout the
session. The original format had no such version output, so our
numbering starts with "2" here.
<p>Headers are separated from each other by single newline character <code>'\n'</code>
and the last is separated from the following output by a pair of newline
characters.
<p>After a command has been issued, one or more packets are returned for it.
A packet looks like:
<pre class="verbatim"> <command number>:<stream>:<size>:<output>
</pre>
<p><code><command number></code> is a decimal number specifying which command this output
is from. It is 0 for the first command, and increases by one each time.
<p><code><stream></code> is an identifier for which output stream this packet represents,
allowing multiple streams to be multiplexed over the channel. The following
streams are presently defined; more streams may be added later.
<ul>
<li> <code>m</code>: this stream represents the normal ("main") stdout automate output of
the command, formatted as described in the description for that command.
<li> <code>e</code>: this stream represents any (unstructured) error message data.
<p>Internally, this maps to calls to the <code>E()</code> print macros that would
normally be written by the command to the program's stderr stream, if the
automate sub-command had been called directly rather than via ”'stdio”'.
<li> <code>w</code>: this stream represents any (unstructured) warning message data.
<p>Internally, this maps to calls to the <code>W()</code> print macro that would
normally be written by the command to the program's stderr stream, if the
automate sub-command had been called directly rather than via ”'stdio”'.
<li> <code>p</code>: this stream represents any (unstructured) progress message data.
<p>Internally, this maps to calls to the <code>P()</code> print macro that would
normally be written by the command to the program's stderr stream, if the
automate sub-command had been called directly rather than via ”'stdio”'.
<li> <code>t</code>: this stream represents ticker updates, which may be used
by a user interface to display the progress of a command.
<p>The output for this channel can be described as follows:
<ul>
<li> <code><output> ::= <definition><payload><end></code>
<li> <code><definition> ::= <shortname> ':' <longname> <eol></code>
<li> <code><payload> ::= <total_count><advance>+</code>
<li> <code><end> ::= <shortname> <eol></code>
<li> <code><total_count> ::= <shortname> '=' <count> <eol></code>
<li> <code><advance> ::= <shortname> '#' <count> <eol></code>
<li> <code><shortname> ::= "\w+"</code>
<li> <code><longname> ::= "[^;]+"</code>
<li> <code><count> ::= ['0'-'9']+</code>
<li> <code><eol> ::= ';'</code>
</ul>
<p>The definition tells the implementor the short name and long name of
any upcoming ticker event. The names and meanings are command-specific
and are therefore explained in the sections for the particular
commands which support ticker output.
<p>The <code>total_count</code> might be 0 right at the start and can later be
changed to a different number if the command later on knows a more
exact value. If this is the case, this stanza is output again with
this new value. A constant <code>total_count</code> of 0 means that the
command may continue to run for a undefined amount of time until the
end stanza appears.
<p>The advance tells the implementor how much work has been done so far.
<p>Finally, the end stanza is printed just before the ticker ends
(i.e. the work has been done).
<p>All counts output absolute, raw values; no modulation takes place. It
is usually the case that definition, <code>total_count</code>, advance and
end are output in separate stanzas. It is also possible that two or
more parallel tickers output their stanzas at the same time, in this
case it's ensured that the output does not get intermixed; first all
definitions are output, afterwards all total_counts, and so on.
<p><em>Note:</em> The ticker format used for stdio is fixed and cannot be
selected explicitely via the global <samp><span class="option">--ticker</span></samp> option. However,
if you run an automate command outside of stdio you can set a
different ticker type, f.e. <var>count</var>, <var>dot</var> or <var>none</var>.
<li> <code>l</code>: this stream marks the termination of a command and all of
its streams and carries the return code of the command in the payload.
<p>A return code "0" stands for success, "1" for an error which occurred within
the stdio interface (f.e. syntax errors or missing privileges) before the
command is run and finally "2" for any other command-specific error.
</ul>
<p><code><size></code> is the number of bytes in the output.
<p><code><output></code> is a piece of the output of the command.
<br><dt><strong>Error conditions:</strong><dd>
Errors in the commands run through this interface do not affect the exit
status of this command. Instead, if a badly formatted or invalid command
is received, or a command is given with invalid arguments or options,
an error message to the error stream is printed and and the particular
sub-command exits with return code "1". Other command-specific errors are
returned as code "2".
<p>Trying to run the <code>automate stdio</code> or <code>automate remote_stdio</code>
sub-commands will exit the particular command with return code "1".
<br><dt><strong>Notes:</strong><dd>
Keyboard interaction is disabled, just as if
<samp><span class="option">--non-interactive</span></samp> is specified. Actions which require
operations on password-encrypted private keys will therefore fail
unless the <samp><span class="command"><a href="get_005fpassphrase.html#get_005fpassphrase">get_passphrase</a></span></samp> hook is set up locally.
<p>Workspace options are read before executing each command.
<br><dt><strong>Multiple streams</strong><dd>
The multiple stream encoding allows the output of errors and warnings to be
associated with the command that generated them, allows the communication
path to always stay in sync, and offers the opportunity to add other stream
types for other useful purposes in the future as needs arise.
</dl>
<br><dt><samp><span class="command">mtn automate sync</span></samp><a name="index-mtn-automate-sync-256"></a><dd>See <samp><span class="command"><a href="mtn-automate-pull.html#mtn-automate-pull">mtn automate pull</a></span></samp>
<p><a name="mtn-automate-tags"></a><br><dt><samp><span class="command">mtn automate tags [</span><var>branch_pattern</var><span class="command">]</span></samp><a name="index-mtn-automate-tags-_005b_0040var_007bbranch_005fpattern_007d_005d-257"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
A branch pattern (defaults to all).
<br><dt><strong>Changes:</strong><dd>
<ul>
<li>11.0 – <var>signer</var> now prints the hash of the signing key, no longer the name.
Also, the <var>format_version</var> stanza has been removed in favour of the
global <var>interface_version</var>.
<li>2.2 – added
</ul>
<br><dt><strong>Purpose:</strong><dd>
If a branch pattern is given, prints all tags that are attached to
revisions on branches matched by the pattern; otherwise prints all
tags of the revision graph.
<p>If a branch name is ignored by means of the Lua hook
<code><a href="ignore_005fbranch.html#ignore_005fbranch">ignore_branch</a></code>, it is neither printed, nor can it be matched by a
pattern.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> tag "monotree-0.1"
revision [8a121346ce2920b6f85df68b3b620de96bd14a8d]
signer [de84b575d5e47254393eba49dce9dc4db98ed42d]
branches "net.venge.monotone.contrib" "net.venge.monotone.contrib.monotree"
tag "monotree-0.2"
revision [5d288b39b49613b0d9dca8ece6b9a42c3773f35b]
signer [de84b575d5e47254393eba49dce9dc4db98ed42d]
branches "net.venge.monotone.contrib.monotree"
tag "monotree-0.3"
revision [35cff8e8ba14155f5f7ddf7965073f514fd60f61]
signer [de84b575d5e47254393eba49dce9dc4db98ed42d]
branches "net.venge.monotone.contrib.monotree"
tag "monotree-0.4"
revision [f1afc520474f83c58262896ede027ef77226046e]
signer [de84b575d5e47254393eba49dce9dc4db98ed42d]
branches "net.venge.monotone.contrib.monotree"
</pre>
<br><dt><strong>Output format:</strong><dd>
There is one basic_io stanza for each tag.
<p>Each stanza has exactly the following four entries:
<dl>
<dt><samp><span class="option">'tag'</span></samp><dd>the value of the tag cert, i.e. the name of the tag
<br><dt><samp><span class="option">'revision'</span></samp><dd>the hexadecimal id of the revision the tag is attached to
<br><dt><samp><span class="option">'signer'</span></samp><dd>the hexadecimal value of the key used to sign the tag cert
<br><dt><samp><span class="option">'branches'</span></samp><dd>a (possibly empty) list of all branches the tagged revision is on
</dl>
<p>Stanzas are printed in arbitrary order.
<br><dt><strong>Error conditions:</strong><dd>
A run-time exception occurs if an illegal branch pattern is
specified.
</dl>
<br><dt><samp><span class="command">mtn automate toposort [</span><var>rev...</var><span class="command">]</span></samp><a name="index-mtn-automate-toposort-_005b_0040var_007brev_002e_002e_002e_007d_005d-258"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
One or more revision IDs.
<br><dt><strong>Added in:</strong><dd>
0.1
<br><dt><strong>Purpose:</strong><dd>
Prints all arguments, topologically sorted. I.e., if <var>rev1</var> is an
ancestor of <var>rev2</var>, then <var>rev1</var> will appear before <var>rev2</var> in
the output; if <var>rev2</var> is an ancestor of <var>rev1</var>, then <var>rev2</var>
will appear before <var>rev1</var> in the output; and if neither is an
ancestor of the other, then they may appear in either order.
<p>If there are no arguments, prints nothing.
<br><dt><strong>Sample output:</strong><dd>
<pre class="verbatim"> 28ce076c69eadb9b1ca7bdf9d40ce95fe2f29b61
75156724e0e2e3245838f356ec373c50fa469f1f
</pre>
<br><dt><strong>Output format:</strong><dd>
A list of revision IDs, in hexadecimal, each followed by a newline.
<br><dt><strong>Error conditions:</strong><dd>
If any of the revisions do not exist, prints nothing to stdout, prints
an error message to stderr, and exits with status 1.
</dl>
<br><dt><samp><span class="command">mtn automate update</span></samp><a name="index-mtn-automate-update-259"></a><dd>
<dl>
<dt><strong>Arguments:</strong><dd>
Same as <samp><span class="command"><a href="mtn-update.html#mtn-update">mtn update</a></span></samp>.
<br><dt><strong>Added in:</strong><dd>
12.1
<br><dt><strong>Purpose:</strong><dd>
Update the current workspace to the latest or given revision; see
<samp><span class="command"><a href="mtn-update.html#mtn-update">mtn update</a></span></samp>.
<br><dt><strong>Sample output:</strong><dd>
Nothing on the main stream. The progress stream gives messages of the form:
<pre class="verbatim"> mtn: updating along branch 'mms.work_stephe'
mtn: selected update target 233afb8c4832bf33d5f5734225164de5f5a6278c
mtn: [left] 4a368a6b217c40b2ff3b12bb7cfa00987e0f191c
mtn: [right] 233afb8c4832bf33d5f5734225164de5f5a6278c
mtn: renaming build/windows_common.make to build/utf_common.make
mtn: adding build/x86_gnu_linux_release
</pre>
<br><dt><strong>Output format:</strong><dd>
Free form, prefixed by “mtn:”.
<br><dt><strong>Error conditions:</strong><dd>
see <samp><span class="command"><a href="mtn-update.html#mtn-update">mtn update</a></span></samp>.
</dl>
</dl>
</body></html>
|