File: hg.1

package info (click to toggle)
mercurial 6.3.2-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 42,052 kB
  • sloc: python: 199,820; ansic: 46,300; tcl: 3,715; sh: 1,676; lisp: 1,483; cpp: 864; javascript: 649; makefile: 626; xml: 36; sql: 30
file content (19248 lines) | stat: -rw-r--r-- 487,207 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
.\" Man page generated from reStructuredText.
.
.TH HG 1 "" "" "Mercurial Manual"
.SH NAME
hg \- Mercurial source code management system
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.sp
\fBhg\fP \fIcommand\fP [\fIoption\fP]... [\fIargument\fP]...
.SH DESCRIPTION
.sp
The \fBhg\fP command provides a command line interface to the Mercurial
system.
.SH COMMAND ELEMENTS
.INDENT 0.0
.TP
.B files...
.
indicates one or more filename or relative path filenames; see
\%File Name Patterns\: for information on pattern matching
.TP
.B path
.
indicates a path on the local machine
.TP
.B revision
.
indicates a changeset which can be specified as a changeset
revision number, a tag, or a unique substring of the changeset
hash value
.TP
.B repository path
.
either the pathname of a local repository or the URI of a remote
repository.
.UNINDENT
.SH OPTIONS
.INDENT 0.0
.TP
.BI \-R,  \-\-repository \ <REPO>
.
repository root directory or name of overlay bundle file
.TP
.BI \-\-cwd \ <DIR>
.
change working directory
.TP
.B \-y,  \-\-noninteractive
.
do not prompt, automatically pick the first choice for all prompts
.TP
.B \-q,  \-\-quiet
.
suppress output
.TP
.B \-v,  \-\-verbose
.
enable additional output
.TP
.BI \-\-color \ <TYPE>
.
when to colorize (boolean, always, auto, never, or debug)
.TP
.BI \-\-config \ <CONFIG[+]>
.
set/override config option (use \(aqsection.name=value\(aq)
.TP
.B \-\-debug
.
enable debugging output
.TP
.B \-\-debugger
.
start debugger
.TP
.BI \-\-encoding \ <ENCODE>
.
set the charset encoding (default: UTF\-8)
.TP
.BI \-\-encodingmode \ <MODE>
.
set the charset encoding mode (default: strict)
.TP
.B \-\-traceback
.
always print a traceback on exception
.TP
.B \-\-time
.
time how long the command takes
.TP
.B \-\-profile
.
print command execution profile
.TP
.B \-\-version
.
output version information and exit
.TP
.B \-h,  \-\-help
.
display help and exit
.TP
.B \-\-hidden
.
consider hidden changesets
.TP
.BI \-\-pager \ <TYPE>
.
when to paginate (boolean, always, auto, or never) (default: auto)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SH COMMANDS
.SS Repository creation
.SS clone
.sp
make a copy of an existing repository:
.sp
.nf
.ft C
hg clone [OPTION]... SOURCE [DEST]
.ft P
.fi
.sp
Create a copy of an existing repository in a new directory.
.sp
If no destination directory name is specified, it defaults to the
basename of the source.
.sp
The location of the source is added to the new repository\(aqs
\fB.hg/hgrc\fP file, as the default to be used for future pulls.
.sp
Only local paths and \fBssh://\fP URLs are supported as
destinations. For \fBssh://\fP destinations, no working directory or
\fB.hg/hgrc\fP will be created on the remote side.
.sp
If the source repository has a bookmark called \(aq@\(aq set, that
revision will be checked out in the new repository by default.
.sp
To check out a particular version, use \-u/\-\-update, or
\-U/\-\-noupdate to create a clone with no working directory.
.sp
To pull only a subset of changesets, specify one or more revisions
identifiers with \-r/\-\-rev or branches with \-b/\-\-branch. The
resulting clone will contain only the specified changesets and
their ancestors. These options (or \(aqclone src#rev dest\(aq) imply
\-\-pull, even for local source repositories.
.sp
In normal clone mode, the remote normalizes repository data into a common
exchange format and the receiving end translates this data into its local
storage format. \-\-stream activates a different clone mode that essentially
copies repository files from the remote with minimal data processing. This
significantly reduces the CPU cost of a clone both remotely and locally.
However, it often increases the transferred data size by 30\-40%. This can
result in substantially faster clones where I/O throughput is plentiful,
especially for larger repositories. A side\-effect of \-\-stream clones is
that storage settings and requirements on the remote are applied locally:
a modern client may inherit legacy or inefficient storage used by the
remote or a legacy Mercurial client may not be able to clone from a
modern Mercurial remote.
.IP Note
.
Specifying a tag will include the tagged changeset but not the
changeset containing the tag.
.RE
.sp
For efficiency, hardlinks are used for cloning whenever the
source and destination are on the same filesystem (note this
applies only to the repository data, not to the working
directory). Some filesystems, such as AFS, implement hardlinking
incorrectly, but do not report errors. In these cases, use the
\-\-pull option to avoid hardlinking.
.sp
Mercurial will update the working directory to the first applicable
revision from this list:
.INDENT 0.0
.IP a. 3
.
null if \-U or the source repository has no changesets
.IP b. 3
.
if \-u . and the source repository is local, the first parent of
the source repository\(aqs working directory
.IP c. 3
.
the changeset specified with \-u (if a branch name, this means the
latest head of that branch)
.IP d. 3
.
the changeset specified with \-r
.IP e. 3
.
the tipmost head specified with \-b
.IP f. 3
.
the tipmost head specified with the url#branch source syntax
.IP g. 3
.
the revision marked with the \(aq@\(aq bookmark, if present
.IP h. 3
.
the tipmost head of the default branch
.IP i. 3
.
tip
.UNINDENT
.sp
When cloning from servers that support it, Mercurial may fetch
pre\-generated data from a server\-advertised URL or inline from the
same stream. When this is done, hooks operating on incoming changesets
and changegroups may fire more than once, once for each pre\-generated
bundle and as well as for any additional remaining data. In addition,
if an error occurs, the repository may be rolled back to a partial
clone. This behavior may change in future releases.
See \%\fBhg help \-e clonebundles\fP\: for more.
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
clone a remote repository to a new directory named hg/:
.sp
.nf
.ft C
hg clone https://www.mercurial\-scm.org/repo/hg/
.ft P
.fi
.IP \(bu 2
.
create a lightweight local clone:
.sp
.nf
.ft C
hg clone project/ project\-feature/
.ft P
.fi
.IP \(bu 2
.
clone from an absolute path on an ssh server (note double\-slash):
.sp
.nf
.ft C
hg clone ssh://user@server//home/projects/alpha/
.ft P
.fi
.IP \(bu 2
.
do a streaming clone while checking out a specified version:
.sp
.nf
.ft C
hg clone \-\-stream http://server/repo \-u 1.5
.ft P
.fi
.IP \(bu 2
.
create a repository without changesets after a particular revision:
.sp
.nf
.ft C
hg clone \-r 04e544 experimental/ good/
.ft P
.fi
.IP \(bu 2
.
clone (and track) a particular named branch:
.sp
.nf
.ft C
hg clone https://www.mercurial\-scm.org/repo/hg/#stable
.ft P
.fi
.UNINDENT
.sp
See \%\fBhg help urls\fP\: for details on specifying URLs.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-U,  \-\-noupdate
.
the clone will include an empty working directory (only a repository)
.TP
.BI \-u,  \-\-updaterev \ <REV>
.
revision, tag, or branch to check out
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
do not clone everything, but include this changeset and its ancestors
.TP
.BI \-b,  \-\-branch \ <BRANCH[+]>
.
do not clone everything, but include this branch\(aqs changesets and their ancestors
.TP
.B \-\-pull
.
use pull protocol to copy metadata
.TP
.B \-\-uncompressed
.
an alias to \-\-stream (DEPRECATED)
.TP
.B \-\-stream
.
clone with minimal data processing
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS init
.sp
create a new repository in the given directory:
.sp
.nf
.ft C
hg init [\-e CMD] [\-\-remotecmd CMD] [DEST]
.ft P
.fi
.sp
Initialize a new repository in the given directory. If the given
directory does not exist, it will be created.
.sp
If no directory is given, the current directory is used.
.sp
It is possible to specify an \fBssh://\fP URL as the destination.
See \%\fBhg help urls\fP\: for more information.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.UNINDENT
.SS Remote repository management
.SS incoming
.sp
show new changesets found in source:
.sp
.nf
.ft C
hg incoming [\-p] [\-n] [\-M] [\-f] [\-r REV]... [\-\-bundle FILENAME] [SOURCE]
.ft P
.fi
.sp
Show new changesets found in the specified path/URL or the default
pull location. These are the changesets that would have been pulled
by \%\fBhg pull\fP\: at the time you issued this command.
.sp
See pull for valid source format details.
.sp
With \-B/\-\-bookmarks, the result of bookmark comparison between
local and remote repositories is displayed. With \-v/\-\-verbose,
status is also displayed for each bookmark like below:
.sp
.nf
.ft C
BM1               01234567890a added
BM2               1234567890ab advanced
BM3               234567890abc diverged
BM4               34567890abcd changed
.ft P
.fi
.sp
The action taken locally when pulling depends on the
status of each bookmark:
.INDENT 0.0
.TP
.B \fBadded\fP
.sp
pull will create it
.TP
.B \fBadvanced\fP
.sp
pull will update it
.TP
.B \fBdiverged\fP
.sp
pull will create a divergent bookmark
.TP
.B \fBchanged\fP
.sp
result depends on remote changesets
.UNINDENT
.sp
From the point of view of pulling behavior, bookmark
existing only in the remote repository are treated as \fBadded\fP,
even if it is in fact locally deleted.
.sp
For remote repository, using \-\-bundle avoids downloading the
changesets twice if the incoming is followed by a pull.
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
show incoming changes with patches and full description:
.sp
.nf
.ft C
hg incoming \-vp
.ft P
.fi
.IP \(bu 2
.
show incoming changes excluding merges, store a bundle:
.sp
.nf
.ft C
hg in \-vpM \-\-bundle incoming.hg
hg pull incoming.hg
.ft P
.fi
.IP \(bu 2
.
briefly list changes inside a bundle:
.sp
.nf
.ft C
hg in changes.hg \-T "{desc|firstline}\en"
.ft P
.fi
.UNINDENT
.sp
Returns 0 if there are incoming changes, 1 otherwise.
.sp
Options:
.INDENT 0.0
.TP
.B \-f,  \-\-force
.
run even if remote repository is unrelated
.TP
.B \-n,  \-\-newest\-first
.
show newest record first
.TP
.BI \-\-bundle \ <FILE>
.
file to store the bundles into
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
a remote changeset intended to be added
.TP
.B \-B,  \-\-bookmarks
.
compare bookmarks
.TP
.BI \-b,  \-\-branch \ <BRANCH[+]>
.
a specific branch you would like to pull
.TP
.B \-p,  \-\-patch
.
show patch
.TP
.B \-g,  \-\-git
.
use git extended diff format
.TP
.BI \-l,  \-\-limit \ <NUM>
.
limit number of changes displayed
.TP
.B \-M,  \-\-no\-merges
.
do not show merges
.TP
.B \-\-stat
.
output diffstat\-style summary of changes
.TP
.B \-G,  \-\-graph
.
show the revision DAG
.TP
.BI \-\-style \ <STYLE>
.
display using template map file (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: in
.UNINDENT
.UNINDENT
.SS outgoing
.sp
show changesets not found in the destination:
.sp
.nf
.ft C
hg outgoing [\-M] [\-p] [\-n] [\-f] [\-r REV]... [DEST]...
.ft P
.fi
.sp
Show changesets not found in the specified destination repository
or the default push location. These are the changesets that would
be pushed if a push was requested.
.sp
See pull for details of valid destination formats.
.sp
With \-B/\-\-bookmarks, the result of bookmark comparison between
local and remote repositories is displayed. With \-v/\-\-verbose,
status is also displayed for each bookmark like below:
.sp
.nf
.ft C
BM1               01234567890a added
BM2                            deleted
BM3               234567890abc advanced
BM4               34567890abcd diverged
BM5               4567890abcde changed
.ft P
.fi
.sp
The action taken when pushing depends on the
status of each bookmark:
.INDENT 0.0
.TP
.B \fBadded\fP
.sp
push with \fB\-B\fP will create it
.TP
.B \fBdeleted\fP
.sp
push with \fB\-B\fP will delete it
.TP
.B \fBadvanced\fP
.sp
push will update it
.TP
.B \fBdiverged\fP
.sp
push with \fB\-B\fP will update it
.TP
.B \fBchanged\fP
.sp
push with \fB\-B\fP will update it
.UNINDENT
.sp
From the point of view of pushing behavior, bookmarks
existing only in the remote repository are treated as
\fBdeleted\fP, even if it is in fact added remotely.
.sp
Returns 0 if there are outgoing changes, 1 otherwise.
.sp
Options:
.INDENT 0.0
.TP
.B \-f,  \-\-force
.
run even when the destination is unrelated
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
a changeset intended to be included in the destination
.TP
.B \-n,  \-\-newest\-first
.
show newest record first
.TP
.B \-B,  \-\-bookmarks
.
compare bookmarks
.TP
.BI \-b,  \-\-branch \ <BRANCH[+]>
.
a specific branch you would like to push
.TP
.B \-p,  \-\-patch
.
show patch
.TP
.B \-g,  \-\-git
.
use git extended diff format
.TP
.BI \-l,  \-\-limit \ <NUM>
.
limit number of changes displayed
.TP
.B \-M,  \-\-no\-merges
.
do not show merges
.TP
.B \-\-stat
.
output diffstat\-style summary of changes
.TP
.B \-G,  \-\-graph
.
show the revision DAG
.TP
.BI \-\-style \ <STYLE>
.
display using template map file (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: out
.UNINDENT
.UNINDENT
.SS paths
.sp
show aliases for remote repositories:
.sp
.nf
.ft C
hg paths [NAME]
.ft P
.fi
.sp
Show definition of symbolic path name NAME. If no name is given,
show definition of all available names.
.sp
Option \-q/\-\-quiet suppresses all output when searching for NAME
and shows only the path names when listing all definitions.
.sp
Path names are defined in the [paths] section of your
configuration file and in \fB/etc/mercurial/hgrc\fP. If run inside a
repository, \fB.hg/hgrc\fP is used, too.
.sp
The path names \fBdefault\fP and \fBdefault\-push\fP have a special
meaning.  When performing a push or pull operation, they are used
as fallbacks if no location is specified on the command\-line.
When \fBdefault\-push\fP is set, it will be used for push and
\fBdefault\fP will be used for pull; otherwise \fBdefault\fP is used
as the fallback for both.  When cloning a repository, the clone
source is written as \fBdefault\fP in \fB.hg/hgrc\fP.
.IP Note
.
\fBdefault\fP and \fBdefault\-push\fP apply to all inbound (e.g.
\%\fBhg incoming\fP\:) and outbound (e.g. \%\fBhg outgoing\fP\:, \%\fBhg email\fP\:
and \%\fBhg bundle\fP\:) operations.
.RE
.sp
See \%\fBhg help urls\fP\: for more information.
.sp
Template:
.sp
The following keywords are supported. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B name
.
String. Symbolic name of the path alias.
.TP
.B pushurl
.
String. URL for push operations.
.TP
.B url
.
String. URL or directory path for the other operations.
.UNINDENT
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS pull
.sp
pull changes from the specified source:
.sp
.nf
.ft C
hg pull [\-u] [\-f] [\-r REV]... [\-e CMD] [\-\-remotecmd CMD] [SOURCE]...
.ft P
.fi
.sp
Pull changes from a remote repository to a local one.
.sp
This finds all changes from the repository at the specified path
or URL and adds them to a local repository (the current one unless
\-R is specified). By default, this does not update the copy of the
project in the working directory.
.sp
When cloning from servers that support it, Mercurial may fetch
pre\-generated data. When this is done, hooks operating on incoming
changesets and changegroups may fire more than once, once for each
pre\-generated bundle and as well as for any additional remaining
data. See \%\fBhg help \-e clonebundles\fP\: for more.
.sp
Use \%\fBhg incoming\fP\: if you want to see what would have been added
by a pull at the time you issued this command. If you then decide
to add those changes to the repository, you should use \%\fBhg pull
\-r X\fP\: where \fBX\fP is the last changeset listed by \%\fBhg incoming\fP\:.
.sp
If SOURCE is omitted, the \(aqdefault\(aq path will be used.
See \%\fBhg help urls\fP\: for more information.
.sp
If multiple sources are specified, they will be pulled sequentially as if
the command was run multiple time. If \-\-update is specify and the command
will stop at the first failed \-\-update.
.sp
Specifying bookmark as \fB.\fP is equivalent to specifying the active
bookmark\(aqs name.
.sp
Returns 0 on success, 1 if an update had unresolved files.
.sp
Options:
.INDENT 0.0
.TP
.B \-u,  \-\-update
.
update to new branch head if new descendants were pulled
.TP
.B \-f,  \-\-force
.
run even when remote repository is unrelated
.TP
.B \-\-confirm
.
confirm pull before applying changes
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
a remote changeset intended to be added
.TP
.BI \-B,  \-\-bookmark \ <BOOKMARK[+]>
.
bookmark to pull
.TP
.BI \-b,  \-\-branch \ <BRANCH[+]>
.
a specific branch you would like to pull
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS push
.sp
push changes to the specified destination:
.sp
.nf
.ft C
hg push [\-f] [\-r REV]... [\-e CMD] [\-\-remotecmd CMD] [DEST]...
.ft P
.fi
.sp
Push changesets from the local repository to the specified
destination.
.sp
This operation is symmetrical to pull: it is identical to a pull
in the destination repository from the current one.
.sp
By default, push will not allow creation of new heads at the
destination, since multiple heads would make it unclear which head
to use. In this situation, it is recommended to pull and merge
before pushing.
.sp
Use \-\-new\-branch if you want to allow push to create a new named
branch that is not present at the destination. This allows you to
only create a new branch without forcing other changes.
.IP Note
.
Extra care should be taken with the \-f/\-\-force option,
which will push all new heads on all branches, an action which will
almost always cause confusion for collaborators.
.RE
.sp
If \-r/\-\-rev is used, the specified revision and all its ancestors
will be pushed to the remote repository.
.sp
If \-B/\-\-bookmark is used, the specified bookmarked revision, its
ancestors, and the bookmark will be pushed to the remote
repository. Specifying \fB.\fP is equivalent to specifying the active
bookmark\(aqs name. Use the \-\-all\-bookmarks option for pushing all
current bookmarks.
.sp
Please see \%\fBhg help urls\fP\: for important details about \fBssh://\fP
URLs. If DESTINATION is omitted, a default path will be used.
.sp
When passed multiple destinations, push will process them one after the
other, but stop should an error occur.
.sp
The \-\-pushvars option sends strings to the server that become
environment variables prepended with \fBHG_USERVAR_\fP. For example,
\fB\-\-pushvars ENABLE_FEATURE=true\fP, provides the server side hooks with
\fBHG_USERVAR_ENABLE_FEATURE=true\fP as part of their environment.
.sp
pushvars can provide for user\-overridable hooks as well as set debug
levels. One example is having a hook that blocks commits containing
conflict markers, but enables the user to override the hook if the file
is using conflict markers for testing purposes or the file format has
strings that look like conflict markers.
.sp
By default, servers will ignore \fI\-\-pushvars\fP. To enable it add the
following to your configuration file:
.sp
.nf
.ft C
[push]
pushvars.server = true
.ft P
.fi
.sp
Returns 0 if push was successful, 1 if nothing to push.
.sp
Options:
.INDENT 0.0
.TP
.B \-f,  \-\-force
.
force push
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
a changeset intended to be included in the destination
.TP
.BI \-B,  \-\-bookmark \ <BOOKMARK[+]>
.
bookmark to push
.TP
.B \-\-all\-bookmarks
.
push all bookmarks (EXPERIMENTAL)
.TP
.BI \-b,  \-\-branch \ <BRANCH[+]>
.
a specific branch you would like to push
.TP
.B \-\-new\-branch
.
allow pushing a new branch
.TP
.BI \-\-pushvars \ <VALUE[+]>
.
variables that can be sent to server (ADVANCED)
.TP
.B \-\-publish
.
push the changeset as public (EXPERIMENTAL)
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS serve
.sp
start stand\-alone webserver:
.sp
.nf
.ft C
hg serve [OPTION]...
.ft P
.fi
.sp
Start a local HTTP repository browser and pull server. You can use
this for ad\-hoc sharing and browsing of repositories. It is
recommended to use a real web server to serve a repository for
longer periods of time.
.sp
Please note that the server does not implement access control.
This means that, by default, anybody can read from the server and
nobody can write to it by default. Set the \fBweb.allow\-push\fP
option to \fB*\fP to allow everybody to push to the server. You
should use a real web server if you need to authenticate users.
.sp
By default, the server logs accesses to stdout and errors to
stderr. Use the \-A/\-\-accesslog and \-E/\-\-errorlog options to log to
files.
.sp
To have the server choose a free port number to listen on, specify
a port number of 0; in this case, the server will print the port
number it uses.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-A,  \-\-accesslog \ <FILE>
.
name of access log file to write to
.TP
.B \-d,  \-\-daemon
.
run server in background
.TP
.BI \-\-daemon\-postexec \ <VALUE[+]>
.
used internally by daemon mode
.TP
.BI \-E,  \-\-errorlog \ <FILE>
.
name of error log file to write to
.TP
.BI \-p,  \-\-port \ <PORT>
.
port to listen on (default: 8000)
.TP
.BI \-a,  \-\-address \ <ADDR>
.
address to listen on (default: all interfaces)
.TP
.BI \-\-prefix \ <PREFIX>
.
prefix path to serve from (default: server root)
.TP
.BI \-n,  \-\-name \ <NAME>
.
name to show in web pages (default: working directory)
.TP
.BI \-\-web\-conf \ <FILE>
.
name of the hgweb config file (see \(aqhg help hgweb\(aq)
.TP
.BI \-\-webdir\-conf \ <FILE>
.
name of the hgweb config file (DEPRECATED)
.TP
.BI \-\-pid\-file \ <FILE>
.
name of file to write process ID to
.TP
.B \-\-stdio
.
for remote clients (ADVANCED)
.TP
.BI \-\-cmdserver \ <MODE>
.
for remote clients (ADVANCED)
.TP
.BI \-t,  \-\-templates \ <TEMPLATE>
.
web templates to use
.TP
.BI \-\-style \ <STYLE>
.
template style to use
.TP
.B \-6,  \-\-ipv6
.
use IPv6 in addition to IPv4
.TP
.BI \-\-certificate \ <FILE>
.
SSL certificate file
.TP
.B \-\-print\-url
.
start and print only the URL
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS Change creation
.SS commit
.sp
commit the specified files or all outstanding changes:
.sp
.nf
.ft C
hg commit [OPTION]... [FILE]...
.ft P
.fi
.sp
Commit changes to the given files into the repository. Unlike a
centralized SCM, this operation is a local operation. See
\%\fBhg push\fP\: for a way to actively distribute your changes.
.sp
If a list of files is omitted, all changes reported by \%\fBhg status\fP\:
will be committed.
.sp
If you are committing the result of a merge, do not provide any
filenames or \-I/\-X filters.
.sp
If no commit message is specified, Mercurial starts your
configured editor where you can enter a message. In case your
commit fails, you will find a backup of your message in
\fB.hg/last\-message.txt\fP.
.sp
The \-\-close\-branch flag can be used to mark the current branch
head closed. When all heads of a branch are closed, the branch
will be considered closed and no longer listed.
.sp
The \-\-amend flag can be used to amend the parent of the
working directory with a new commit that contains the changes
in the parent in addition to those currently reported by \%\fBhg status\fP\:,
if there are any. The old commit is stored in a backup bundle in
\fB.hg/strip\-backup\fP (see \%\fBhg help bundle\fP\: and \%\fBhg help unbundle\fP\:
on how to restore it).
.sp
Message, user and date are taken from the amended commit unless
specified. When a message isn\(aqt specified on the command line,
the editor will open with the message of the amended commit.
.sp
It is not possible to amend public changesets (see \%\fBhg help phases\fP\:)
or changesets that have children.
.sp
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
.sp
Returns 0 on success, 1 if nothing changed.
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
commit all files ending in .py:
.sp
.nf
.ft C
hg commit \-\-include "set:**.py"
.ft P
.fi
.IP \(bu 2
.
commit all non\-binary files:
.sp
.nf
.ft C
hg commit \-\-exclude "set:binary()"
.ft P
.fi
.IP \(bu 2
.
amend the current commit and set the date to now:
.sp
.nf
.ft C
hg commit \-\-amend \-\-date now
.ft P
.fi
.UNINDENT
.sp
Options:
.INDENT 0.0
.TP
.B \-A,  \-\-addremove
.
mark new/missing files as added/removed before committing
.TP
.B \-\-close\-branch
.
mark a branch head as closed
.TP
.B \-\-amend
.
amend the parent of the working directory
.TP
.B \-s,  \-\-secret
.
use the secret phase for committing
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-\-force\-close\-branch
.
forcibly close branch from a non\-head changeset (ADVANCED)
.TP
.B \-i,  \-\-interactive
.
use interactive mode
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: ci
.UNINDENT
.UNINDENT
.SS Change manipulation
.SS abort
.sp
abort an unfinished operation (EXPERIMENTAL):
.sp
.nf
.ft C
hg abort
.ft P
.fi
.sp
Aborts a multistep operation like graft, histedit, rebase, merge,
and unshelve if they are in an unfinished state.
.sp
use \-\-dry\-run/\-n to dry run the command.
.sp
Options:
.INDENT 0.0
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.UNINDENT
.SS backout
.sp
reverse effect of earlier changeset:
.sp
.nf
.ft C
hg backout [OPTION]... [\-r] REV
.ft P
.fi
.sp
Prepare a new changeset with the effect of REV undone in the
current working directory. If no conflicts were encountered,
it will be committed immediately.
.sp
If REV is the parent of the working directory, then this new changeset
is committed automatically (unless \-\-no\-commit is specified).
.IP Note
.
\%\fBhg backout\fP\: cannot be used to fix either an unwanted or
incorrect merge.
.RE
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
Reverse the effect of the parent of the working directory.
This backout will be committed immediately:
.sp
.nf
.ft C
hg backout \-r .
.ft P
.fi
.IP \(bu 2
.
Reverse the effect of previous bad revision 23:
.sp
.nf
.ft C
hg backout \-r 23
.ft P
.fi
.IP \(bu 2
.
Reverse the effect of previous bad revision 23 and
leave changes uncommitted:
.sp
.nf
.ft C
hg backout \-r 23 \-\-no\-commit
hg commit \-m "Backout revision 23"
.ft P
.fi
.UNINDENT
.sp
By default, the pending changeset will have one parent,
maintaining a linear history. With \-\-merge, the pending
changeset will instead have two parents: the old parent of the
working directory and a new child of REV that simply undoes REV.
.sp
Before version 1.7, the behavior without \-\-merge was equivalent
to specifying \-\-merge followed by \%\fBhg update \-\-clean .\fP\: to
cancel the merge and leave the child of REV as a head to be
merged separately.
.sp
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
.sp
See \%\fBhg help revert\fP\: for a way to restore files to the state
of another revision.
.sp
Returns 0 on success, 1 if nothing to backout or there are unresolved
files.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-merge
.
merge with old dirstate parent after backout
.TP
.B \-\-commit
.
commit if no conflicts were encountered (DEPRECATED)
.TP
.B \-\-no\-commit
.
do not commit
.TP
.BI \-\-parent \ <REV>
.
parent to choose when backing out merge (DEPRECATED)
.TP
.BI \-r,  \-\-rev \ <REV>
.
revision to backout
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.BI \-t,  \-\-tool \ <TOOL>
.
specify merge tool
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS continue
.sp
resumes an interrupted operation (EXPERIMENTAL):
.sp
.nf
.ft C
hg continue
.ft P
.fi
.sp
Finishes a multistep operation like graft, histedit, rebase, merge,
and unshelve if they are in an interrupted state.
.sp
use \-\-dry\-run/\-n to dry run the command.
.sp
Options:
.INDENT 0.0
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.UNINDENT
.SS graft
.sp
copy changes from other branches onto the current branch:
.sp
.nf
.ft C
hg graft [OPTION]... [\-r REV]... REV...
.ft P
.fi
.sp
This command uses Mercurial\(aqs merge logic to copy individual
changes from other branches without merging branches in the
history graph. This is sometimes known as \(aqbackporting\(aq or
\(aqcherry\-picking\(aq. By default, graft will copy user, date, and
description from the source changesets.
.sp
Changesets that are ancestors of the current revision, that have
already been grafted, or that are merges will be skipped.
.sp
If \-\-log is specified, log messages will have a comment appended
of the form:
.sp
.nf
.ft C
(grafted from CHANGESETHASH)
.ft P
.fi
.sp
If \-\-force is specified, revisions will be grafted even if they
are already ancestors of, or have been grafted to, the destination.
This is useful when the revisions have since been backed out.
.sp
If a graft merge results in conflicts, the graft process is
interrupted so that the current merge can be manually resolved.
Once all conflicts are addressed, the graft process can be
continued with the \-c/\-\-continue option.
.sp
The \-c/\-\-continue option reapplies all the earlier options.
.sp
The \-\-base option exposes more of how graft internally uses merge with a
custom base revision. \-\-base can be used to specify another ancestor than
the first and only parent.
.sp
The command:
.sp
.nf
.ft C
hg graft \-r 345 \-\-base 234
.ft P
.fi
.sp
is thus pretty much the same as:
.sp
.nf
.ft C
hg diff \-\-from 234 \-\-to 345 | hg import
.ft P
.fi
.sp
but using merge to resolve conflicts and track moved files.
.sp
The result of a merge can thus be backported as a single commit by
specifying one of the merge parents as base, and thus effectively
grafting the changes from the other side.
.sp
It is also possible to collapse multiple changesets and clean up history
by specifying another ancestor as base, much like rebase \-\-collapse
\-\-keep.
.sp
The commit message can be tweaked after the fact using commit \-\-amend .
.sp
For using non\-ancestors as the base to backout changes, see the backout
command and the hidden \-\-parent option.
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
copy a single change to the stable branch and edit its description:
.sp
.nf
.ft C
hg update stable
hg graft \-\-edit 9393
.ft P
.fi
.IP \(bu 2
.
graft a range of changesets with one exception, updating dates:
.sp
.nf
.ft C
hg graft \-D "2085::2093 and not 2091"
.ft P
.fi
.IP \(bu 2
.
continue a graft after resolving conflicts:
.sp
.nf
.ft C
hg graft \-c
.ft P
.fi
.IP \(bu 2
.
show the source of a grafted changeset:
.sp
.nf
.ft C
hg log \-\-debug \-r .
.ft P
.fi
.IP \(bu 2
.
show revisions sorted by date:
.sp
.nf
.ft C
hg log \-r "sort(all(), date)"
.ft P
.fi
.IP \(bu 2
.
backport the result of a merge as a single commit:
.sp
.nf
.ft C
hg graft \-r 123 \-\-base 123^
.ft P
.fi
.IP \(bu 2
.
land a feature branch as one changeset:
.sp
.nf
.ft C
hg up \-cr default
hg graft \-r featureX \-\-base "ancestor(\(aqfeatureX\(aq, \(aqdefault\(aq)"
.ft P
.fi
.UNINDENT
.sp
See \%\fBhg help revisions\fP\: for more about specifying revisions.
.sp
Returns 0 on successful completion, 1 if there are unresolved files.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
revisions to graft
.TP
.BI \-\-base \ <REV>
.
base revision when doing the graft merge (ADVANCED)
.TP
.B \-c,  \-\-continue
.
resume interrupted graft
.TP
.B \-\-stop
.
stop interrupted graft
.TP
.B \-\-abort
.
abort interrupted graft
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-\-log
.
append graft info to log message
.TP
.B \-\-no\-commit
.
don\(aqt commit, just apply the changes in working directory
.TP
.B \-f,  \-\-force
.
force graft
.TP
.B \-D,  \-\-currentdate
.
record the current date as commit date
.TP
.B \-U,  \-\-currentuser
.
record the current user as committer
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.TP
.BI \-t,  \-\-tool \ <TOOL>
.
specify merge tool
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS merge
.sp
merge another revision into working directory:
.sp
.nf
.ft C
hg merge [\-P] [[\-r] REV]
.ft P
.fi
.sp
The current working directory is updated with all changes made in
the requested revision since the last common predecessor revision.
.sp
Files that changed between either parent are marked as changed for
the next commit and a commit must be performed before any further
updates to the repository are allowed. The next commit will have
two parents.
.sp
\fB\-\-tool\fP can be used to specify the merge tool used for file
merges. It overrides the HGMERGE environment variable and your
configuration files. See \%\fBhg help merge\-tools\fP\: for options.
.sp
If no revision is specified, the working directory\(aqs parent is a
head revision, and the current branch contains exactly one other
head, the other head is merged with by default. Otherwise, an
explicit revision with which to merge must be provided.
.sp
See \%\fBhg help resolve\fP\: for information on handling file conflicts.
.sp
To undo an uncommitted merge, use \%\fBhg merge \-\-abort\fP\: which
will check out a clean copy of the original merge parent, losing
all changes.
.sp
Returns 0 on success, 1 if there are unresolved files.
.sp
Options:
.INDENT 0.0
.TP
.B \-f,  \-\-force
.
force a merge including outstanding changes (DEPRECATED)
.TP
.BI \-r,  \-\-rev \ <REV>
.
revision to merge
.TP
.B \-P,  \-\-preview
.
review revisions to merge (no merge is performed)
.TP
.B \-\-abort
.
abort the ongoing merge
.TP
.BI \-t,  \-\-tool \ <TOOL>
.
specify merge tool
.UNINDENT
.SS Change organization
.SS bookmarks
.sp
create a new bookmark or list existing bookmarks:
.sp
.nf
.ft C
hg bookmarks [OPTIONS]... [NAME]...
.ft P
.fi
.sp
Bookmarks are labels on changesets to help track lines of development.
Bookmarks are unversioned and can be moved, renamed and deleted.
Deleting or moving a bookmark has no effect on the associated changesets.
.sp
Creating or updating to a bookmark causes it to be marked as \(aqactive\(aq.
The active bookmark is indicated with a \(aq*\(aq.
When a commit is made, the active bookmark will advance to the new commit.
A plain \%\fBhg update\fP\: will also advance an active bookmark, if possible.
Updating away from a bookmark will cause it to be deactivated.
.sp
Bookmarks can be pushed and pulled between repositories (see
\%\fBhg help push\fP\: and \%\fBhg help pull\fP\:). If a shared bookmark has
diverged, a new \(aqdivergent bookmark\(aq of the form \%\(aqname@path\:\(aq will
be created. Using \%\fBhg merge\fP\: will resolve the divergence.
.sp
Specifying bookmark as \(aq.\(aq to \-m/\-d/\-l options is equivalent to specifying
the active bookmark\(aqs name.
.sp
A bookmark named \(aq@\(aq has the special property that \%\fBhg clone\fP\: will
check it out by default if it exists.
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions such as \fB{bookmark}\fP. See also
\%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B active
.
Boolean. True if the bookmark is active.
.UNINDENT
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
create an active bookmark for a new line of development:
.sp
.nf
.ft C
hg book new\-feature
.ft P
.fi
.IP \(bu 2
.
create an inactive bookmark as a place marker:
.sp
.nf
.ft C
hg book \-i reviewed
.ft P
.fi
.IP \(bu 2
.
create an inactive bookmark on another changeset:
.sp
.nf
.ft C
hg book \-r .^ tested
.ft P
.fi
.IP \(bu 2
.
rename bookmark turkey to dinner:
.sp
.nf
.ft C
hg book \-m turkey dinner
.ft P
.fi
.IP \(bu 2
.
move the \(aq@\(aq bookmark from another branch:
.sp
.nf
.ft C
hg book \-f @
.ft P
.fi
.IP \(bu 2
.
print only the active bookmark name:
.sp
.nf
.ft C
hg book \-ql .
.ft P
.fi
.UNINDENT
.sp
Options:
.INDENT 0.0
.TP
.B \-f,  \-\-force
.
force
.TP
.BI \-r,  \-\-rev \ <REV>
.
revision for bookmark action
.TP
.B \-d,  \-\-delete
.
delete a given bookmark
.TP
.BI \-m,  \-\-rename \ <OLD>
.
rename a given bookmark
.TP
.B \-i,  \-\-inactive
.
mark a bookmark inactive
.TP
.B \-l,  \-\-list
.
list existing bookmarks
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: bookmark
.UNINDENT
.UNINDENT
.SS branch
.sp
set or show the current branch name:
.sp
.nf
.ft C
hg branch [\-fC] [NAME]
.ft P
.fi
.IP Note
.
Branch names are permanent and global. Use \%\fBhg bookmark\fP\: to create a
light\-weight bookmark instead. See \%\fBhg help glossary\fP\: for more
information about named branches and bookmarks.
.RE
.sp
With no argument, show the current branch name. With one argument,
set the working directory branch name (the branch will not exist
in the repository until the next commit). Standard practice
recommends that primary development take place on the \(aqdefault\(aq
branch.
.sp
Unless \-f/\-\-force is specified, branch will not let you set a
branch name that already exists.
.sp
Use \-C/\-\-clean to reset the working directory branch to that of
the parent of the working directory, negating a previous branch
change.
.sp
Use the command \%\fBhg update\fP\: to switch to an existing branch. Use
\%\fBhg commit \-\-close\-branch\fP\: to mark this branch head as closed.
When all heads of a branch are closed, the branch will be
considered closed.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-f,  \-\-force
.
set branch name even if it shadows an existing branch
.TP
.B \-C,  \-\-clean
.
reset branch name to parent branch name
.TP
.BI \-r,  \-\-rev \ <VALUE[+]>
.
change branches of the given revs (EXPERIMENTAL)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS branches
.sp
list repository named branches:
.sp
.nf
.ft C
hg branches [\-c]
.ft P
.fi
.sp
List the repository\(aqs named branches, indicating which ones are
inactive. If \-c/\-\-closed is specified, also list branches which have
been marked closed (see \%\fBhg commit \-\-close\-branch\fP\:).
.sp
Use the command \%\fBhg update\fP\: to switch to an existing branch.
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions such as \fB{branch}\fP. See also
\%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B active
.
Boolean. True if the branch is active.
.TP
.B closed
.
Boolean. True if the branch is closed.
.TP
.B current
.
Boolean. True if it is the current branch.
.UNINDENT
.sp
Returns 0.
.sp
Options:
.INDENT 0.0
.TP
.B \-a,  \-\-active
.
show only branches that have unmerged heads (DEPRECATED)
.TP
.B \-c,  \-\-closed
.
show normal and closed branches
.TP
.BI \-r,  \-\-rev \ <VALUE[+]>
.
show branch name(s) of the given rev
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS phase
.sp
set or show the current phase name:
.sp
.nf
.ft C
hg phase [\-p|\-d|\-s] [\-f] [\-r] [REV...]
.ft P
.fi
.sp
With no argument, show the phase name of the current revision(s).
.sp
With one of \-p/\-\-public, \-d/\-\-draft or \-s/\-\-secret, change the
phase value of the specified revisions.
.sp
Unless \-f/\-\-force is specified, \%\fBhg phase\fP\: won\(aqt move changesets from a
lower phase to a higher phase. Phases are ordered as follows:
.sp
.nf
.ft C
public < draft < secret
.ft P
.fi
.sp
Returns 0 on success, 1 if some phases could not be changed.
.sp
(For more information about the phases concept, see \%\fBhg help phases\fP\:.)
.sp
Options:
.INDENT 0.0
.TP
.B \-p,  \-\-public
.
set changeset phase to public
.TP
.B \-d,  \-\-draft
.
set changeset phase to draft
.TP
.B \-s,  \-\-secret
.
set changeset phase to secret
.TP
.B \-f,  \-\-force
.
allow to move boundary backward
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
target revision
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS tag
.sp
add one or more tags for the current or given revision:
.sp
.nf
.ft C
hg tag [\-f] [\-l] [\-m TEXT] [\-d DATE] [\-u USER] [\-r REV] NAME...
.ft P
.fi
.sp
Name a particular revision using <name>.
.sp
Tags are used to name particular revisions of the repository and are
very useful to compare different revisions, to go back to significant
earlier versions or to mark branch points as releases, etc. Changing
an existing tag is normally disallowed; use \-f/\-\-force to override.
.sp
If no revision is given, the parent of the working directory is
used.
.sp
To facilitate version control, distribution, and merging of tags,
they are stored as a file named ".hgtags" which is managed similarly
to other project files and can be hand\-edited if necessary. This
also means that tagging creates a new commit. The file
".hg/localtags" is used for local tags (not shared among
repositories).
.sp
Tag commits are usually made at the head of a branch. If the parent
of the working directory is not a branch head, \%\fBhg tag\fP\: aborts; use
\-f/\-\-force to force the tag commit to be based on a non\-head
changeset.
.sp
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
.sp
Since tag names have priority over branch names during revision
lookup, using an existing branch name as a tag name is discouraged.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-f,  \-\-force
.
force tag
.TP
.B \-l,  \-\-local
.
make the tag local
.TP
.BI \-r,  \-\-rev \ <REV>
.
revision to tag
.TP
.B \-\-remove
.
remove a tag
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.UNINDENT
.SS tags
.sp
list repository tags:
.sp
.nf
.ft C
hg tags
.ft P
.fi
.sp
This lists both regular and local tags. When the \-v/\-\-verbose
switch is used, a third column "local" is printed for local tags.
When the \-q/\-\-quiet switch is used, only the tag name is printed.
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions such as \fB{tag}\fP. See also
\%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B type
.
String. \fBlocal\fP for local tags.
.UNINDENT
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS File content management
.SS annotate
.sp
show changeset information by line for each file:
.sp
.nf
.ft C
hg annotate [\-r REV] [\-f] [\-a] [\-u] [\-d] [\-n] [\-c] [\-l] FILE...
.ft P
.fi
.sp
List changes in files, showing the revision id responsible for
each line.
.sp
This command is useful for discovering when a change was made and
by whom.
.sp
If you include \-\-file, \-\-user, or \-\-date, the revision number is
suppressed unless you also include \-\-number.
.sp
Without the \-a/\-\-text option, annotate will avoid processing files
it detects as binary. With \-a, annotate will annotate the file
anyway, although the results will probably be neither useful
nor desirable.
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B lines
.
List of lines with annotation data.
.TP
.B path
.
String. Repository\-absolute path of the specified file.
.UNINDENT
.sp
And each entry of \fB{lines}\fP provides the following sub\-keywords in
addition to \fB{date}\fP, \fB{node}\fP, \fB{rev}\fP, \fB{user}\fP, etc.
.INDENT 0.0
.TP
.B line
.
String. Line content.
.TP
.B lineno
.
Integer. Line number at that revision.
.TP
.B path
.
String. Repository\-absolute path of the file at that revision.
.UNINDENT
.sp
See \%\fBhg help templates.operators\fP\: for the list expansion syntax.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV>
.
annotate the specified revision
.TP
.B \-\-follow
.
follow copies/renames and list the filename (DEPRECATED)
.TP
.B \-\-no\-follow
.
don\(aqt follow copies and renames
.TP
.B \-a,  \-\-text
.
treat all files as text
.TP
.B \-u,  \-\-user
.
list the author (long with \-v)
.TP
.B \-f,  \-\-file
.
list the filename
.TP
.B \-d,  \-\-date
.
list the date (short with \-q)
.TP
.B \-n,  \-\-number
.
list the revision number (default)
.TP
.B \-c,  \-\-changeset
.
list the changeset
.TP
.B \-l,  \-\-line\-number
.
show line number at the first appearance
.TP
.BI \-\-skip \ <REV[+]>
.
revset to not display (EXPERIMENTAL)
.TP
.B \-w,  \-\-ignore\-all\-space
.
ignore white space when comparing lines
.TP
.B \-b,  \-\-ignore\-space\-change
.
ignore changes in the amount of white space
.TP
.B \-B,  \-\-ignore\-blank\-lines
.
ignore changes whose lines are all blank
.TP
.B \-Z,  \-\-ignore\-space\-at\-eol
.
ignore changes in whitespace at EOL
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: blame
.UNINDENT
.UNINDENT
.SS cat
.sp
output the current or given revision of files:
.sp
.nf
.ft C
hg cat [OPTION]... FILE...
.ft P
.fi
.sp
Print the specified files as they were at the given revision. If
no revision is given, the parent of the working directory is used.
.sp
Output may be to a file, in which case the name of the file is
given using a template string. See \%\fBhg help templates\fP\:. In addition
to the common template keywords, the following formatting rules are
supported:
.INDENT 0.0
.TP
.B \fB%%\fP
.sp
literal "%" character
.TP
.B \fB%s\fP
.sp
basename of file being printed
.TP
.B \fB%d\fP
.sp
dirname of file being printed, or \(aq.\(aq if in repository root
.TP
.B \fB%p\fP
.sp
root\-relative path name of file being printed
.TP
.B \fB%H\fP
.sp
changeset hash (40 hexadecimal digits)
.TP
.B \fB%R\fP
.sp
changeset revision number
.TP
.B \fB%h\fP
.sp
short\-form changeset hash (12 hexadecimal digits)
.TP
.B \fB%r\fP
.sp
zero\-padded changeset revision number
.TP
.B \fB%b\fP
.sp
basename of the exporting repository
.TP
.B \fB\e\fP
.sp
literal "" character
.UNINDENT
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B data
.
String. File content.
.TP
.B path
.
String. Repository\-absolute path of the file.
.UNINDENT
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-o,  \-\-output \ <FORMAT>
.
print output to file with formatted name
.TP
.BI \-r,  \-\-rev \ <REV>
.
print the given revision
.TP
.B \-\-decode
.
apply any matching decode filter
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS copy
.sp
mark files as copied for the next commit:
.sp
.nf
.ft C
hg copy [OPTION]... (SOURCE... DEST | \-\-forget DEST...)
.ft P
.fi
.sp
Mark dest as having copies of source files. If dest is a
directory, copies are put in that directory. If dest is a file,
the source must be a single file.
.sp
By default, this command copies the contents of files as they
exist in the working directory. If invoked with \-A/\-\-after, the
operation is recorded, but no copying is performed.
.sp
To undo marking a destination file as copied, use \-\-forget. With that
option, all given (positional) arguments are unmarked as copies. The
destination file(s) will be left in place (still tracked). Note that
\%\fBhg copy \-\-forget\fP\: behaves the same way as \%\fBhg rename \-\-forget\fP\:.
.sp
This command takes effect with the next commit by default.
.sp
Returns 0 on success, 1 if errors are encountered.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-forget
.
unmark a destination file as copied
.TP
.B \-A,  \-\-after
.
record a copy that has already occurred
.TP
.BI \-\-at\-rev \ <REV>
.
(un)mark copies in the given revision (EXPERIMENTAL)
.TP
.B \-f,  \-\-force
.
forcibly copy over an existing managed file
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: cp
.UNINDENT
.UNINDENT
.SS diff
.sp
diff repository (or selected files):
.sp
.nf
.ft C
hg diff [OPTION]... ([\-c REV] | [\-\-from REV1] [\-\-to REV2]) [FILE]...
.ft P
.fi
.sp
Show differences between revisions for the specified files.
.sp
Differences between files are shown using the unified diff format.
.IP Note
.
\%\fBhg diff\fP\: may generate unexpected results for merges, as it will
default to comparing against the working directory\(aqs first
parent changeset if no revisions are specified.  To diff against the
conflict regions, you can use \fI\-\-config diff.merge=yes\fP.
.RE
.sp
By default, the working directory files are compared to its first parent. To
see the differences from another revision, use \-\-from. To see the difference
to another revision, use \-\-to. For example, \%\fBhg diff \-\-from .^\fP\: will show
the differences from the working copy\(aqs grandparent to the working copy,
\%\fBhg diff \-\-to .\fP\: will show the diff from the working copy to its parent
(i.e. the reverse of the default), and \%\fBhg diff \-\-from 1.0 \-\-to 1.2\fP\: will
show the diff between those two revisions.
.sp
Alternatively you can specify \-c/\-\-change with a revision to see the changes
in that changeset relative to its first parent (i.e. \%\fBhg diff \-c 42\fP\: is
equivalent to \%\fBhg diff \-\-from 42^ \-\-to 42\fP\:)
.sp
Without the \-a/\-\-text option, diff will avoid generating diffs of
files it detects as binary. With \-a, diff will generate a diff
anyway, probably with undesirable results.
.sp
Use the \-g/\-\-git option to generate diffs in the git extended diff
format. For more information, read \%\fBhg help diffs\fP\:.
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
compare a file in the current working directory to its parent:
.sp
.nf
.ft C
hg diff foo.c
.ft P
.fi
.IP \(bu 2
.
compare two historical versions of a directory, with rename info:
.sp
.nf
.ft C
hg diff \-\-git \-\-from 1.0 \-\-to 1.2 lib/
.ft P
.fi
.IP \(bu 2
.
get change stats relative to the last change on some date:
.sp
.nf
.ft C
hg diff \-\-stat \-\-from "date(\(aqmay 2\(aq)"
.ft P
.fi
.IP \(bu 2
.
diff all newly\-added files that contain a keyword:
.sp
.nf
.ft C
hg diff "set:added() and grep(GNU)"
.ft P
.fi
.IP \(bu 2
.
compare a revision and its parents:
.sp
.nf
.ft C
hg diff \-c 9353                  # compare against first parent
hg diff \-\-from 9353^ \-\-to 9353   # same using revset syntax
hg diff \-\-from 9353^2 \-\-to 9353  # compare against the second parent
.ft P
.fi
.UNINDENT
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
revision (DEPRECATED)
.TP
.BI \-\-from \ <REV1>
.
revision to diff from
.TP
.BI \-\-to \ <REV2>
.
revision to diff to
.TP
.BI \-c,  \-\-change \ <REV>
.
change made by revision
.TP
.B \-a,  \-\-text
.
treat all files as text
.TP
.B \-g,  \-\-git
.
use git extended diff format (DEFAULT: diff.git)
.TP
.B \-\-binary
.
generate binary diffs in git mode (default)
.TP
.B \-\-nodates
.
omit dates from diff headers
.TP
.B \-\-noprefix
.
omit a/ and b/ prefixes from filenames
.TP
.B \-p,  \-\-show\-function
.
show which function each change is in (DEFAULT: diff.showfunc)
.TP
.B \-\-reverse
.
produce a diff that undoes the changes
.TP
.B \-w,  \-\-ignore\-all\-space
.
ignore white space when comparing lines
.TP
.B \-b,  \-\-ignore\-space\-change
.
ignore changes in the amount of white space
.TP
.B \-B,  \-\-ignore\-blank\-lines
.
ignore changes whose lines are all blank
.TP
.B \-Z,  \-\-ignore\-space\-at\-eol
.
ignore changes in whitespace at EOL
.TP
.BI \-U,  \-\-unified \ <NUM>
.
number of lines of context to show
.TP
.B \-\-stat
.
output diffstat\-style summary of changes
.TP
.BI \-\-root \ <DIR>
.
produce diffs relative to subdirectory
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS grep
.sp
search for a pattern in specified files:
.sp
.nf
.ft C
hg grep [\-\-diff] [OPTION]... PATTERN [FILE]...
.ft P
.fi
.sp
Search the working directory or revision history for a regular
expression in the specified files for the entire repository.
.sp
By default, grep searches the repository files in the working
directory and prints the files where it finds a match. To specify
historical revisions instead of the working directory, use the
\-\-rev flag.
.sp
To search instead historical revision differences that contains a
change in match status ("\-" for a match that becomes a non\-match,
or "+" for a non\-match that becomes a match), use the \-\-diff flag.
.sp
PATTERN can be any Python (roughly Perl\-compatible) regular
expression.
.sp
If no FILEs are specified and the \-\-rev flag isn\(aqt supplied, all
files in the working directory are searched. When using the \-\-rev
flag and specifying FILEs, use the \-\-follow argument to also
follow the specified FILEs across renames and copies.
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B change
.
String. Character denoting insertion \fB+\fP or removal \fB\-\fP.
Available if \fB\-\-diff\fP is specified.
.TP
.B lineno
.
Integer. Line number of the match.
.TP
.B path
.
String. Repository\-absolute path of the file.
.TP
.B texts
.
List of text chunks.
.UNINDENT
.sp
And each entry of \fB{texts}\fP provides the following sub\-keywords.
.INDENT 0.0
.TP
.B matched
.
Boolean. True if the chunk matches the specified pattern.
.TP
.B text
.
String. Chunk content.
.UNINDENT
.sp
See \%\fBhg help templates.operators\fP\: for the list expansion syntax.
.sp
Returns 0 if a match is found, 1 otherwise.
.sp
Options:
.INDENT 0.0
.TP
.B \-0,  \-\-print0
.
end fields with NUL
.TP
.B \-\-all
.
an alias to \-\-diff (DEPRECATED)
.TP
.B \-\-diff
.
search revision differences for when the pattern was added or removed
.TP
.B \-a,  \-\-text
.
treat all files as text
.TP
.B \-f,  \-\-follow
.
follow changeset history, or file history across copies and renames
.TP
.B \-i,  \-\-ignore\-case
.
ignore case when matching
.TP
.B \-l,  \-\-files\-with\-matches
.
print only filenames and revisions that match
.TP
.B \-n,  \-\-line\-number
.
print matching line numbers
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
search files changed within revision range
.TP
.B \-\-all\-files
.
include all files in the changeset while grepping (DEPRECATED)
.TP
.B \-u,  \-\-user
.
list the author (long with \-v)
.TP
.B \-d,  \-\-date
.
list the date (short with \-q)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS Change navigation
.SS bisect
.sp
subdivision search of changesets:
.sp
.nf
.ft C
hg bisect [\-gbsr] [\-U] [\-c CMD] [REV]
.ft P
.fi
.sp
This command helps to find changesets which introduce problems. To
use, mark the earliest changeset you know exhibits the problem as
bad, then mark the latest changeset which is free from the problem
as good. Bisect will update your working directory to a revision
for testing (unless the \-U/\-\-noupdate option is specified). Once
you have performed tests, mark the working directory as good or
bad, and bisect will either update to another candidate changeset
or announce that it has found the bad revision.
.sp
As a shortcut, you can also use the revision argument to mark a
revision as good or bad without checking it out first.
.sp
If you supply a command, it will be used for automatic bisection.
The environment variable HG_NODE will contain the ID of the
changeset being tested. The exit status of the command will be
used to mark revisions as good or bad: status 0 means good, 125
means to skip the revision, 127 (command not found) will abort the
bisection, and any other non\-zero exit status means the revision
is bad.
.sp
Some examples:
.INDENT 0.0
.IP \(bu 2
.
start a bisection with known bad revision 34, and good revision 12:
.sp
.nf
.ft C
hg bisect \-\-bad 34
hg bisect \-\-good 12
.ft P
.fi
.IP \(bu 2
.
advance the current bisection by marking current revision as good or
bad:
.sp
.nf
.ft C
hg bisect \-\-good
hg bisect \-\-bad
.ft P
.fi
.IP \(bu 2
.
mark the current revision, or a known revision, to be skipped (e.g. if
that revision is not usable because of another issue):
.sp
.nf
.ft C
hg bisect \-\-skip
hg bisect \-\-skip 23
.ft P
.fi
.IP \(bu 2
.
skip all revisions that do not touch directories \fBfoo\fP or \fBbar\fP:
.sp
.nf
.ft C
hg bisect \-\-skip "!( file(\(aqpath:foo\(aq) & file(\(aqpath:bar\(aq) )"
.ft P
.fi
.IP \(bu 2
.
forget the current bisection:
.sp
.nf
.ft C
hg bisect \-\-reset
.ft P
.fi
.IP \(bu 2
.
use \(aqmake && make tests\(aq to automatically find the first broken
revision:
.sp
.nf
.ft C
hg bisect \-\-reset
hg bisect \-\-bad 34
hg bisect \-\-good 12
hg bisect \-\-command "make && make tests"
.ft P
.fi
.IP \(bu 2
.
see all changesets whose states are already known in the current
bisection:
.sp
.nf
.ft C
hg log \-r "bisect(pruned)"
.ft P
.fi
.IP \(bu 2
.
see the changeset currently being bisected (especially useful
if running with \-U/\-\-noupdate):
.sp
.nf
.ft C
hg log \-r "bisect(current)"
.ft P
.fi
.IP \(bu 2
.
see all changesets that took part in the current bisection:
.sp
.nf
.ft C
hg log \-r "bisect(range)"
.ft P
.fi
.IP \(bu 2
.
you can even get a nice graph:
.sp
.nf
.ft C
hg log \-\-graph \-r "bisect(range)"
.ft P
.fi
.UNINDENT
.sp
See \%\fBhg help revisions.bisect\fP\: for more about the \fIbisect()\fP predicate.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-r,  \-\-reset
.
reset bisect state
.TP
.B \-g,  \-\-good
.
mark changeset good
.TP
.B \-b,  \-\-bad
.
mark changeset bad
.TP
.B \-s,  \-\-skip
.
skip testing changeset
.TP
.B \-e,  \-\-extend
.
extend the bisect range
.TP
.BI \-c,  \-\-command \ <CMD>
.
use command to check changeset state
.TP
.B \-U,  \-\-noupdate
.
do not update to target
.UNINDENT
.SS heads
.sp
show branch heads:
.sp
.nf
.ft C
hg heads [\-ct] [\-r STARTREV] [REV]...
.ft P
.fi
.sp
With no arguments, show all open branch heads in the repository.
Branch heads are changesets that have no descendants on the
same branch. They are where development generally takes place and
are the usual targets for update and merge operations.
.sp
If one or more REVs are given, only open branch heads on the
branches associated with the specified changesets are shown. This
means that you can use \%\fBhg heads .\fP\: to see the heads on the
currently checked\-out branch.
.sp
If \-c/\-\-closed is specified, also show branch heads marked closed
(see \%\fBhg commit \-\-close\-branch\fP\:).
.sp
If STARTREV is specified, only those heads that are descendants of
STARTREV will be displayed.
.sp
If \-t/\-\-topo is specified, named branch mechanics will be ignored and only
topological heads (changesets with no children) will be shown.
.sp
Returns 0 if matching heads are found, 1 if not.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <STARTREV>
.
show only heads which are descendants of STARTREV
.TP
.B \-t,  \-\-topo
.
show topological heads only
.TP
.B \-a,  \-\-active
.
show active branchheads only (DEPRECATED)
.TP
.B \-c,  \-\-closed
.
show normal and closed branch heads
.TP
.BI \-\-style \ <STYLE>
.
display using template map file (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS identify
.sp
identify the working directory or specified revision:
.sp
.nf
.ft C
hg identify [\-nibtB] [\-r REV] [SOURCE]
.ft P
.fi
.sp
Print a summary identifying the repository state at REV using one or
two parent hash identifiers, followed by a "+" if the working
directory has uncommitted changes, the branch name (if not default),
a list of tags, and a list of bookmarks.
.sp
When REV is not given, print a summary of the current state of the
repository including the working directory. Specify \-r. to get information
of the working directory parent without scanning uncommitted changes.
.sp
Specifying a path to a repository root or Mercurial bundle will
cause lookup to operate on that repository/bundle.
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B dirty
.
String. Character \fB+\fP denoting if the working directory has
uncommitted changes.
.TP
.B id
.
String. One or two nodes, optionally followed by \fB+\fP.
.TP
.B parents
.
List of strings. Parent nodes of the changeset.
.UNINDENT
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
generate a build identifier for the working directory:
.sp
.nf
.ft C
hg id \-\-id > build\-id.dat
.ft P
.fi
.IP \(bu 2
.
find the revision corresponding to a tag:
.sp
.nf
.ft C
hg id \-n \-r 1.3
.ft P
.fi
.IP \(bu 2
.
check the most recent revision of a remote repository:
.sp
.nf
.ft C
hg id \-r tip https://www.mercurial\-scm.org/repo/hg/
.ft P
.fi
.UNINDENT
.sp
See \%\fBhg log\fP\: for generating more information about specific revisions,
including full hash identifiers.
.sp
Returns 0 if successful.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV>
.
identify the specified revision
.TP
.B \-n,  \-\-num
.
show local revision number
.TP
.B \-i,  \-\-id
.
show global revision id
.TP
.B \-b,  \-\-branch
.
show branch
.TP
.B \-t,  \-\-tags
.
show tags
.TP
.B \-B,  \-\-bookmarks
.
show bookmarks
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: id
.UNINDENT
.UNINDENT
.SS log
.sp
show revision history of entire repository or files:
.sp
.nf
.ft C
hg log [OPTION]... [FILE]
.ft P
.fi
.sp
Print the revision history of the specified files or the entire
project.
.sp
If no revision range is specified, the default is \fBtip:0\fP unless
\-\-follow is set.
.sp
File history is shown without following rename or copy history of
files. Use \-f/\-\-follow with a filename to follow history across
renames and copies. \-\-follow without a filename will only show
ancestors of the starting revisions. The starting revisions can be
specified by \-r/\-\-rev, which default to the working directory parent.
.sp
By default this command prints revision number and changeset id,
tags, non\-trivial parents, user, date and time, and a summary for
each commit. When the \-v/\-\-verbose switch is used, the list of
changed files and full commit message are shown.
.sp
With \-\-graph the revisions are shown as an ASCII art DAG with the most
recent changeset at the top.
\(aqo\(aq is a changeset, \(aq@\(aq is a working directory parent, \(aq%\(aq is a changeset
involved in an unresolved merge conflict, \(aq_\(aq closes a branch,
\(aqx\(aq is obsolete, \(aq*\(aq is unstable, and \(aq+\(aq represents a fork where the
changeset from the lines below is a parent of the \(aqo\(aq merge on the same
line.
Paths in the DAG are represented with \(aq|\(aq, \(aq/\(aq and so forth. \(aq:\(aq in place
of a \(aq|\(aq indicates one or more revisions in a path are omitted.
.sp
Use \-L/\-\-line\-range FILE,M:N options to follow the history of lines
from M to N in FILE. With \-p/\-\-patch only diff hunks affecting
specified line range will be shown. This option requires \-\-follow;
it can be specified multiple times. Currently, this option is not
compatible with \-\-graph. This option is experimental.
.IP Note
.
\%\fBhg log \-\-patch\fP\: may generate unexpected diff output for merge
changesets, as it will only compare the merge changeset against
its first parent. Also, only files different from BOTH parents
will appear in files:.
.RE
.IP Note
.
For performance reasons, \%\fBhg log FILE\fP\: may omit duplicate changes
made on branches and will not show removals or mode changes. To
see all such changes, use the \-\-removed switch.
.RE
.IP Note
.
The history resulting from \-L/\-\-line\-range options depends on diff
options; for instance if white\-spaces are ignored, respective changes
with only white\-spaces in specified line range will not be listed.
.RE
.sp
Some examples:
.INDENT 0.0
.IP \(bu 2
.
changesets with full descriptions and file lists:
.sp
.nf
.ft C
hg log \-v
.ft P
.fi
.IP \(bu 2
.
changesets ancestral to the working directory:
.sp
.nf
.ft C
hg log \-f
.ft P
.fi
.IP \(bu 2
.
last 10 commits on the current branch:
.sp
.nf
.ft C
hg log \-l 10 \-b .
.ft P
.fi
.IP \(bu 2
.
changesets showing all modifications of a file, including removals:
.sp
.nf
.ft C
hg log \-\-removed file.c
.ft P
.fi
.IP \(bu 2
.
all changesets that touch a directory, with diffs, excluding merges:
.sp
.nf
.ft C
hg log \-Mp lib/
.ft P
.fi
.IP \(bu 2
.
all revision numbers that match a keyword:
.sp
.nf
.ft C
hg log \-k bug \-\-template "{rev}\en"
.ft P
.fi
.IP \(bu 2
.
the full hash identifier of the working directory parent:
.sp
.nf
.ft C
hg log \-r . \-\-template "{node}\en"
.ft P
.fi
.IP \(bu 2
.
list available log templates:
.sp
.nf
.ft C
hg log \-T list
.ft P
.fi
.IP \(bu 2
.
check if a given changeset is included in a tagged release:
.sp
.nf
.ft C
hg log \-r "a21ccf and ancestor(1.9)"
.ft P
.fi
.IP \(bu 2
.
find all changesets by some user in a date range:
.sp
.nf
.ft C
hg log \-k alice \-d "may 2008 to jul 2008"
.ft P
.fi
.IP \(bu 2
.
summary of all changesets after the last tag:
.sp
.nf
.ft C
hg log \-r "last(tagged())::" \-\-template "{desc|firstline}\en"
.ft P
.fi
.IP \(bu 2
.
changesets touching lines 13 to 23 for file.c:
.sp
.nf
.ft C
hg log \-L file.c,13:23
.ft P
.fi
.IP \(bu 2
.
changesets touching lines 13 to 23 for file.c and lines 2 to 6 of
main.c with patch:
.sp
.nf
.ft C
hg log \-L file.c,13:23 \-L main.c,2:6 \-p
.ft P
.fi
.UNINDENT
.sp
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
.sp
See \%\fBhg help revisions\fP\: for more about specifying and ordering
revisions.
.sp
See \%\fBhg help templates\fP\: for more about pre\-packaged styles and
specifying custom templates. The default template used by the log
command can be customized via the \fBcommand\-templates.log\fP configuration
setting.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-f,  \-\-follow
.
follow changeset history, or file history across copies and renames
.TP
.B \-\-follow\-first
.
only follow the first parent of merge changesets (DEPRECATED)
.TP
.BI \-d,  \-\-date \ <DATE>
.
show revisions matching date spec
.TP
.B \-C,  \-\-copies
.
show copied files
.TP
.BI \-k,  \-\-keyword \ <TEXT[+]>
.
do case\-insensitive search for a given text
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
revisions to select or follow from
.TP
.BI \-L,  \-\-line\-range \ <FILE,RANGE[+]>
.
follow line range of specified file (EXPERIMENTAL)
.TP
.B \-\-removed
.
include revisions where files were removed
.TP
.B \-m,  \-\-only\-merges
.
show only merges (DEPRECATED) (use \-r "merge()" instead)
.TP
.BI \-u,  \-\-user \ <USER[+]>
.
revisions committed by user
.TP
.BI \-\-only\-branch \ <BRANCH[+]>
.
show only changesets within the given named branch (DEPRECATED)
.TP
.BI \-b,  \-\-branch \ <BRANCH[+]>
.
show changesets within the given named branch
.TP
.BI \-B,  \-\-bookmark \ <BOOKMARK[+]>
.
show changesets within the given bookmark
.TP
.BI \-P,  \-\-prune \ <REV[+]>
.
do not display revision or any of its ancestors
.TP
.B \-p,  \-\-patch
.
show patch
.TP
.B \-g,  \-\-git
.
use git extended diff format
.TP
.BI \-l,  \-\-limit \ <NUM>
.
limit number of changes displayed
.TP
.B \-M,  \-\-no\-merges
.
do not show merges
.TP
.B \-\-stat
.
output diffstat\-style summary of changes
.TP
.B \-G,  \-\-graph
.
show the revision DAG
.TP
.BI \-\-style \ <STYLE>
.
display using template map file (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: history
.UNINDENT
.UNINDENT
.SS parents
.sp
show the parents of the working directory or revision (DEPRECATED):
.sp
.nf
.ft C
hg parents [\-r REV] [FILE]
.ft P
.fi
.sp
Print the working directory\(aqs parent revisions. If a revision is
given via \-r/\-\-rev, the parent of that revision will be printed.
If a file argument is given, the revision in which the file was
last changed (before the working directory revision or the
argument to \-\-rev if given) is printed.
.sp
This command is equivalent to:
.sp
.nf
.ft C
hg log \-r "p1()+p2()" or
hg log \-r "p1(REV)+p2(REV)" or
hg log \-r "max(::p1() and file(FILE))+max(::p2() and file(FILE))" or
hg log \-r "max(::p1(REV) and file(FILE))+max(::p2(REV) and file(FILE))"
.ft P
.fi
.sp
See \%\fBhg summary\fP\: and \%\fBhg help revsets\fP\: for related information.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV>
.
show parents of the specified revision
.TP
.BI \-\-style \ <STYLE>
.
display using template map file (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS tip
.sp
show the tip revision (DEPRECATED):
.sp
.nf
.ft C
hg tip [\-p] [\-g]
.ft P
.fi
.sp
The tip revision (usually just called the tip) is the changeset
most recently added to the repository (and therefore the most
recently changed head).
.sp
If you have just made a commit, that commit will be the tip. If
you have just pulled changes from another repository, the tip of
that repository becomes the current tip. The "tip" tag is special
and cannot be renamed or assigned to a different changeset.
.sp
This command is deprecated, please use \%\fBhg heads\fP\: instead.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-p,  \-\-patch
.
show patch
.TP
.B \-g,  \-\-git
.
use git extended diff format
.TP
.BI \-\-style \ <STYLE>
.
display using template map file (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS Working directory management
.SS add
.sp
add the specified files on the next commit:
.sp
.nf
.ft C
hg add [OPTION]... [FILE]...
.ft P
.fi
.sp
Schedule files to be version controlled and added to the
repository.
.sp
The files will be added to the repository at the next commit. To
undo an add before that, see \%\fBhg forget\fP\:.
.sp
If no names are given, add all files to the repository (except
files matching \fB.hgignore\fP).
.sp
Examples:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
.
New (unknown) files are added
automatically by \%\fBhg add\fP\::
.sp
.nf
.ft C
$ ls
foo.c
$ hg status
? foo.c
$ hg add
adding foo.c
$ hg status
A foo.c
.ft P
.fi
.IP \(bu 2
.
Specific files to be added can be specified:
.sp
.nf
.ft C
$ ls
bar.c  foo.c
$ hg status
? bar.c
? foo.c
$ hg add bar.c
$ hg status
A bar.c
? foo.c
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.sp
Returns 0 if all files are successfully added.
.sp
Options:
.INDENT 0.0
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS addremove
.sp
add all new files, delete all missing files:
.sp
.nf
.ft C
hg addremove [OPTION]... [FILE]...
.ft P
.fi
.sp
Add all new files and remove all missing files from the
repository.
.sp
Unless names are given, new files are ignored if they match any of
the patterns in \fB.hgignore\fP. As with add, these changes take
effect at the next commit.
.sp
Use the \-s/\-\-similarity option to detect renamed files. This
option takes a percentage between 0 (disabled) and 100 (files must
be identical) as its parameter. With a parameter greater than 0,
this compares every removed file with every added file and records
those similar enough as renames. Detecting renamed files this way
can be expensive. After using this option, \%\fBhg status \-C\fP\: can be
used to check which files were identified as moved or renamed. If
not specified, \-s/\-\-similarity defaults to 100 and only renames of
identical files are detected.
.sp
Examples:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
.
A number of files (bar.c and foo.c) are new,
while foobar.c has been removed (without using \%\fBhg remove\fP\:)
from the repository:
.sp
.nf
.ft C
$ ls
bar.c foo.c
$ hg status
! foobar.c
? bar.c
? foo.c
$ hg addremove
adding bar.c
adding foo.c
removing foobar.c
$ hg status
A bar.c
A foo.c
R foobar.c
.ft P
.fi
.IP \(bu 2
.
A file foobar.c was moved to foo.c without using \%\fBhg rename\fP\:.
Afterwards, it was edited slightly:
.sp
.nf
.ft C
$ ls
foo.c
$ hg status
! foobar.c
? foo.c
$ hg addremove \-\-similarity 90
removing foobar.c
adding foo.c
recording removal of foobar.c as rename to foo.c (94% similar)
$ hg status \-C
A foo.c
  foobar.c
R foobar.c
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.sp
Returns 0 if all files are successfully added.
.sp
Options:
.INDENT 0.0
.TP
.BI \-s,  \-\-similarity \ <SIMILARITY>
.
guess renamed files by similarity (0<=s<=100)
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS files
.sp
list tracked files:
.sp
.nf
.ft C
hg files [OPTION]... [FILE]...
.ft P
.fi
.sp
Print files under Mercurial control in the working directory or
specified revision for given files (excluding removed files).
Files can be specified as filenames or filesets.
.sp
If no files are given to match, this command prints the names
of all files under Mercurial control.
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B flags
.
String. Character denoting file\(aqs symlink and executable bits.
.TP
.B path
.
String. Repository\-absolute path of the file.
.TP
.B size
.
Integer. Size of the file in bytes.
.UNINDENT
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
list all files under the current directory:
.sp
.nf
.ft C
hg files .
.ft P
.fi
.IP \(bu 2
.
shows sizes and flags for current revision:
.sp
.nf
.ft C
hg files \-vr .
.ft P
.fi
.IP \(bu 2
.
list all files named README:
.sp
.nf
.ft C
hg files \-I "**/README"
.ft P
.fi
.IP \(bu 2
.
list all binary files:
.sp
.nf
.ft C
hg files "set:binary()"
.ft P
.fi
.IP \(bu 2
.
find files containing a regular expression:
.sp
.nf
.ft C
hg files "set:grep(\(aqbob\(aq)"
.ft P
.fi
.IP \(bu 2
.
search tracked file contents with xargs and grep:
.sp
.nf
.ft C
hg files \-0 | xargs \-0 grep foo
.ft P
.fi
.UNINDENT
.sp
See \%\fBhg help patterns\fP\: and \%\fBhg help filesets\fP\: for more information
on specifying file patterns.
.sp
Returns 0 if a match is found, 1 otherwise.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV>
.
search the repository as it is in REV
.TP
.B \-0,  \-\-print0
.
end filenames with NUL, for use with xargs
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS forget
.sp
forget the specified files on the next commit:
.sp
.nf
.ft C
hg forget [OPTION]... FILE...
.ft P
.fi
.sp
Mark the specified files so they will no longer be tracked
after the next commit.
.sp
This only removes files from the current branch, not from the
entire project history, and it does not delete them from the
working directory.
.sp
To delete the file from the working directory, see \%\fBhg remove\fP\:.
.sp
To undo a forget before the next commit, see \%\fBhg add\fP\:.
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
forget newly\-added binary files:
.sp
.nf
.ft C
hg forget "set:added() and binary()"
.ft P
.fi
.IP \(bu 2
.
forget files that would be excluded by .hgignore:
.sp
.nf
.ft C
hg forget "set:hgignore()"
.ft P
.fi
.UNINDENT
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-i,  \-\-interactive
.
use interactive mode
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS locate
.sp
locate files matching specific patterns (DEPRECATED):
.sp
.nf
.ft C
hg locate [OPTION]... [PATTERN]...
.ft P
.fi
.sp
Print files under Mercurial control in the working directory whose
names match the given patterns.
.sp
By default, this command searches all directories in the working
directory. To search just the current directory and its
subdirectories, use "\-\-include .".
.sp
If no patterns are given to match, this command prints the names
of all files under Mercurial control in the working directory.
.sp
If you want to feed the output of this command into the "xargs"
command, use the \-0 option to both this command and "xargs". This
will avoid the problem of "xargs" treating single filenames that
contain whitespace as multiple filenames.
.sp
See \%\fBhg help files\fP\: for a more versatile command.
.sp
Returns 0 if a match is found, 1 otherwise.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV>
.
search the repository as it is in REV
.TP
.B \-0,  \-\-print0
.
end filenames with NUL, for use with xargs
.TP
.B \-f,  \-\-fullpath
.
print complete paths from the filesystem root
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS purge
.sp
removes files not tracked by Mercurial:
.sp
.nf
.ft C
hg purge [OPTION]... [DIR]...
.ft P
.fi
.sp
Delete files not known to Mercurial. This is useful to test local
and uncommitted changes in an otherwise\-clean source tree.
.sp
This means that purge will delete the following by default:
.INDENT 0.0
.IP \(bu 2
.
Unknown files: files marked with "?" by \%\fBhg status\fP\:
.IP \(bu 2
.
Empty directories: in fact Mercurial ignores directories unless
they contain files under source control management
.UNINDENT
.sp
But it will leave untouched:
.INDENT 0.0
.IP \(bu 2
.
Modified and unmodified tracked files
.IP \(bu 2
.
Ignored files (unless \-i or \-\-all is specified)
.IP \(bu 2
.
New files added to the repository (with \%\fBhg add\fP\:)
.UNINDENT
.sp
The \-\-files and \-\-dirs options can be used to direct purge to delete
only files, only directories, or both. If neither option is given,
both will be deleted.
.sp
If directories are given on the command line, only files in these
directories are considered.
.sp
Be careful with purge, as you could irreversibly delete some files
you forgot to add to the repository. If you only want to print the
list of files that this program would delete, use the \-\-print
option.
.sp
Options:
.INDENT 0.0
.TP
.B \-a,  \-\-abort\-on\-err
.
abort if an error occurs
.TP
.B \-\-all
.
purge ignored files too
.TP
.B \-i,  \-\-ignored
.
purge only ignored files
.TP
.B \-\-dirs
.
purge empty directories
.TP
.B \-\-files
.
purge files
.TP
.B \-p,  \-\-print
.
print filenames instead of deleting them
.TP
.B \-0,  \-\-print0
.
end filenames with NUL, for use with xargs (implies \-p/\-\-print)
.TP
.B \-\-confirm
.
ask before permanently deleting files
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: clean
.UNINDENT
.UNINDENT
.SS remove
.sp
remove the specified files on the next commit:
.sp
.nf
.ft C
hg remove [OPTION]... FILE...
.ft P
.fi
.sp
Schedule the indicated files for removal from the current branch.
.sp
This command schedules the files to be removed at the next commit.
To undo a remove before that, see \%\fBhg revert\fP\:. To undo added
files, see \%\fBhg forget\fP\:.
.sp
\-A/\-\-after can be used to remove only files that have already
been deleted, \-f/\-\-force can be used to force deletion, and \-Af
can be used to remove files from the next revision without
deleting them from the working directory.
.sp
The following table details the behavior of remove for different
file states (columns) and option combinations (rows). The file
states are Added [A], Clean [C], Modified [M] and Missing [!]
(as reported by \%\fBhg status\fP\:). The actions are Warn, Remove
(from branch) and Delete (from disk):
.TS
center;
|l|l|l|l|l|.
_
T{
opt/state
T}	T{
A
T}	T{
C
T}	T{
M
T}	T{
!
T}
_
T{
none
T}	T{
W
T}	T{
RD
T}	T{
W
T}	T{
R
T}
_
T{
\-f
T}	T{
R
T}	T{
RD
T}	T{
RD
T}	T{
R
T}
_
T{
\-A
T}	T{
W
T}	T{
W
T}	T{
W
T}	T{
R
T}
_
T{
\-Af
T}	T{
R
T}	T{
R
T}	T{
R
T}	T{
R
T}
_
.TE
.IP Note
.
\%\fBhg remove\fP\: never deletes files in Added [A] state from the
working directory, not even if \fB\-\-force\fP is specified.
.RE
.sp
Returns 0 on success, 1 if any warnings encountered.
.sp
Options:
.INDENT 0.0
.TP
.B \-A,  \-\-after
.
record delete for missing files
.TP
.B \-f,  \-\-force
.
forget added files, delete modified files
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: rm
.UNINDENT
.UNINDENT
.SS rename
.sp
rename files; equivalent of copy + remove:
.sp
.nf
.ft C
hg rename [OPTION]... SOURCE... DEST
.ft P
.fi
.sp
Mark dest as copies of sources; mark sources for deletion. If dest
is a directory, copies are put in that directory. If dest is a
file, there can only be one source.
.sp
By default, this command copies the contents of files as they
exist in the working directory. If invoked with \-A/\-\-after, the
operation is recorded, but no copying is performed.
.sp
To undo marking a destination file as renamed, use \-\-forget. With that
option, all given (positional) arguments are unmarked as renames. The
destination file(s) will be left in place (still tracked). The source
file(s) will not be restored. Note that \%\fBhg rename \-\-forget\fP\: behaves
the same way as \%\fBhg copy \-\-forget\fP\:.
.sp
This command takes effect with the next commit by default.
.sp
Returns 0 on success, 1 if errors are encountered.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-forget
.
unmark a destination file as renamed
.TP
.B \-A,  \-\-after
.
record a rename that has already occurred
.TP
.BI \-\-at\-rev \ <REV>
.
(un)mark renames in the given revision (EXPERIMENTAL)
.TP
.B \-f,  \-\-force
.
forcibly move over an existing managed file
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: move mv
.UNINDENT
.UNINDENT
.SS resolve
.sp
redo merges or set/view the merge status of files:
.sp
.nf
.ft C
hg resolve [OPTION]... [FILE]...
.ft P
.fi
.sp
Merges with unresolved conflicts are often the result of
non\-interactive merging using the \fBinternal:merge\fP configuration
setting, or a command\-line merge tool like \fBdiff3\fP. The resolve
command is used to manage the files involved in a merge, after
\%\fBhg merge\fP\: has been run, and before \%\fBhg commit\fP\: is run (i.e. the
working directory must have two parents). See \%\fBhg help
merge\-tools\fP\: for information on configuring merge tools.
.sp
The resolve command can be used in the following ways:
.INDENT 0.0
.IP \(bu 2
.
\%\fBhg resolve [\-\-re\-merge] [\-\-tool TOOL] FILE...\fP\:: attempt to re\-merge
the specified files, discarding any previous merge attempts. Re\-merging
is not performed for files already marked as resolved. Use \fB\-\-all/\-a\fP
to select all unresolved files. \fB\-\-tool\fP can be used to specify
the merge tool used for the given files. It overrides the HGMERGE
environment variable and your configuration files.  Previous file
contents are saved with a \fB.orig\fP suffix.
.IP \(bu 2
.
\%\fBhg resolve \-m [FILE]\fP\:: mark a file as having been resolved
(e.g. after having manually fixed\-up the files). The default is
to mark all unresolved files.
.IP \(bu 2
.
\%\fBhg resolve \-u [FILE]...\fP\:: mark a file as unresolved. The
default is to mark all resolved files.
.IP \(bu 2
.
\%\fBhg resolve \-l\fP\:: list files which had or still have conflicts.
In the printed list, \fBU\fP = unresolved and \fBR\fP = resolved.
You can use \fBset:unresolved()\fP or \fBset:resolved()\fP to filter
the list. See \%\fBhg help filesets\fP\: for details.
.UNINDENT
.IP Note
.
Mercurial will not let you commit files with unresolved merge
conflicts. You must use \%\fBhg resolve \-m ...\fP\: before you can
commit after a conflicting merge.
.RE
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B mergestatus
.
String. Character denoting merge conflicts, \fBU\fP or \fBR\fP.
.TP
.B path
.
String. Repository\-absolute path of the file.
.UNINDENT
.sp
Returns 0 on success, 1 if any files fail a resolve attempt.
.sp
Options:
.INDENT 0.0
.TP
.B \-a,  \-\-all
.
select all unresolved files
.TP
.B \-l,  \-\-list
.
list state of files needing merge
.TP
.B \-m,  \-\-mark
.
mark files as resolved
.TP
.B \-u,  \-\-unmark
.
mark files as unresolved
.TP
.B \-n,  \-\-no\-status
.
hide status prefix
.TP
.B \-\-re\-merge
.
re\-merge files
.TP
.BI \-t,  \-\-tool \ <TOOL>
.
specify merge tool
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS revert
.sp
restore files to their checkout state:
.sp
.nf
.ft C
hg revert [OPTION]... [\-r REV] [NAME]...
.ft P
.fi
.IP Note
.
To check out earlier revisions, you should use \%\fBhg update REV\fP\:.
To cancel an uncommitted merge (and lose your changes),
use \%\fBhg merge \-\-abort\fP\:.
.RE
.sp
With no revision specified, revert the specified files or directories
to the contents they had in the parent of the working directory.
This restores the contents of files to an unmodified
state and unschedules adds, removes, copies, and renames. If the
working directory has two parents, you must explicitly specify a
revision.
.sp
Using the \-r/\-\-rev or \-d/\-\-date options, revert the given files or
directories to their states as of a specific revision. Because
revert does not change the working directory parents, this will
cause these files to appear modified. This can be helpful to "back
out" some or all of an earlier change. See \%\fBhg backout\fP\: for a
related method.
.sp
Modified files are saved with a .orig suffix before reverting.
To disable these backups, use \-\-no\-backup. It is possible to store
the backup files in a custom directory relative to the root of the
repository by setting the \fBui.origbackuppath\fP configuration
option.
.sp
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
.sp
See \%\fBhg help backout\fP\: for a way to reverse the effect of an
earlier changeset.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-a,  \-\-all
.
revert all changes when no arguments given
.TP
.BI \-d,  \-\-date \ <DATE>
.
tipmost revision matching date
.TP
.BI \-r,  \-\-rev \ <REV>
.
revert to the specified revision
.TP
.B \-C,  \-\-no\-backup
.
do not save backup copies of files
.TP
.B \-i,  \-\-interactive
.
interactively select the changes
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS root
.sp
print the root (top) of the current working directory:
.sp
.nf
.ft C
hg root
.ft P
.fi
.sp
Print the root directory of the current repository.
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B hgpath
.
String. Path to the .hg directory.
.TP
.B storepath
.
String. Path to the directory holding versioned data.
.UNINDENT
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS shelve
.sp
save and set aside changes from the working directory:
.sp
.nf
.ft C
hg shelve [OPTION]... [FILE]...
.ft P
.fi
.sp
Shelving takes files that "hg status" reports as not clean, saves
the modifications to a bundle (a shelved change), and reverts the
files so that their state in the working directory becomes clean.
.sp
To restore these changes to the working directory, using "hg
unshelve"; this will work even if you switch to a different
commit.
.sp
When no files are specified, "hg shelve" saves all not\-clean
files. If specific files or directories are named, only changes to
those files are shelved.
.sp
In bare shelve (when no files are specified, without interactive,
include and exclude option), shelving remembers information if the
working directory was on newly created branch, in other words working
directory was on different branch than its first parent. In this
situation unshelving restores branch information to the working directory.
.sp
Each shelved change has a name that makes it easier to find later.
The name of a shelved change defaults to being based on the active
bookmark, or if there is no active bookmark, the current named
branch.  To specify a different name, use \fB\-\-name\fP.
.sp
To see a list of existing shelved changes, use the \fB\-\-list\fP
option. For each shelved change, this will print its name, age,
and description; use \fB\-\-patch\fP or \fB\-\-stat\fP for more details.
.sp
To delete specific shelved changes, use \fB\-\-delete\fP. To delete
all shelved changes, use \fB\-\-cleanup\fP.
.sp
Options:
.INDENT 0.0
.TP
.B \-A,  \-\-addremove
.
mark new/missing files as added/removed before shelving
.TP
.B \-u,  \-\-unknown
.
store unknown files in the shelve
.TP
.B \-\-cleanup
.
delete all shelved changes
.TP
.BI \-\-date \ <DATE>
.
shelve with the specified commit date
.TP
.B \-d,  \-\-delete
.
delete the named shelved change(s)
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-k,  \-\-keep
.
shelve, but keep changes in the working directory
.TP
.B \-l,  \-\-list
.
list current shelves
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as shelve message
.TP
.BI \-n,  \-\-name \ <NAME>
.
use the given name for the shelved commit
.TP
.B \-p,  \-\-patch
.
output patches for changes (provide the names of the shelved changes as positional arguments)
.TP
.B \-i,  \-\-interactive
.
interactive mode
.TP
.B \-\-stat
.
output diffstat\-style summary of changes (provide the names of the shelved changes as positional arguments)
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS status
.sp
show changed files in the working directory:
.sp
.nf
.ft C
hg status [OPTION]... [FILE]...
.ft P
.fi
.sp
Show status of files in the repository. If names are given, only
files that match are shown. Files that are clean or ignored or
the source of a copy/move operation, are not listed unless
\-c/\-\-clean, \-i/\-\-ignored, \-C/\-\-copies or \-A/\-\-all are given.
Unless options described with "show only ..." are given, the
options \-mardu are used.
.sp
Option \-q/\-\-quiet hides untracked (unknown and ignored) files
unless explicitly requested with \-u/\-\-unknown or \-i/\-\-ignored.
.IP Note
.
\%\fBhg status\fP\: may appear to disagree with diff if permissions have
changed or a merge has occurred. The standard diff format does
not report permission changes and diff only reports changes
relative to one merge parent.
.RE
.sp
If one revision is given, it is used as the base revision.
If two revisions are given, the differences between them are
shown. The \-\-change option can also be used as a shortcut to list
the changed files of a revision from its first parent.
.sp
The codes used to show the status of files are:
.sp
.nf
.ft C
M = modified
A = added
R = removed
C = clean
! = missing (deleted by non\-hg command, but still tracked)
? = not tracked
I = ignored
  = origin of the previous file (with \-\-copies)
.ft P
.fi
.sp
The \-t/\-\-terse option abbreviates the output by showing only the directory
name if all the files in it share the same status. The option takes an
argument indicating the statuses to abbreviate: \(aqm\(aq for \(aqmodified\(aq, \(aqa\(aq
for \(aqadded\(aq, \(aqr\(aq for \(aqremoved\(aq, \(aqd\(aq for \(aqdeleted\(aq, \(aqu\(aq for \(aqunknown\(aq, \(aqi\(aq
for \(aqignored\(aq and \(aqc\(aq for clean.
.sp
It abbreviates only those statuses which are passed. Note that clean and
ignored files are not displayed with \(aq\-\-terse ic\(aq unless the \-c/\-\-clean
and \-i/\-\-ignored options are also used.
.sp
The \-v/\-\-verbose option shows information when the repository is in an
unfinished merge, shelve, rebase state etc. You can have this behavior
turned on by default by enabling the \fBcommands.status.verbose\fP option.
.sp
You can skip displaying some of these states by setting
\fBcommands.status.skipstates\fP to one or more of: \(aqbisect\(aq, \(aqgraft\(aq,
\(aqhistedit\(aq, \(aqmerge\(aq, \(aqrebase\(aq, or \(aqunshelve\(aq.
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B path
.
String. Repository\-absolute path of the file.
.TP
.B source
.
String. Repository\-absolute path of the file originated from.
Available if \fB\-\-copies\fP is specified.
.TP
.B status
.
String. Character denoting file\(aqs status.
.UNINDENT
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
show changes in the working directory relative to a
changeset:
.sp
.nf
.ft C
hg status \-\-rev 9353
.ft P
.fi
.IP \(bu 2
.
show changes in the working directory relative to the
current directory (see \%\fBhg help patterns\fP\: for more information):
.sp
.nf
.ft C
hg status re:
.ft P
.fi
.IP \(bu 2
.
show all changes including copies in an existing changeset:
.sp
.nf
.ft C
hg status \-\-copies \-\-change 9353
.ft P
.fi
.IP \(bu 2
.
get a NUL separated list of added files, suitable for xargs:
.sp
.nf
.ft C
hg status \-an0
.ft P
.fi
.IP \(bu 2
.
show more information about the repository status, abbreviating
added, removed, modified, deleted, and untracked paths:
.sp
.nf
.ft C
hg status \-v \-t mardu
.ft P
.fi
.UNINDENT
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-A,  \-\-all
.
show status of all files
.TP
.B \-m,  \-\-modified
.
show only modified files
.TP
.B \-a,  \-\-added
.
show only added files
.TP
.B \-r,  \-\-removed
.
show only removed files
.TP
.B \-d,  \-\-deleted
.
show only missing files
.TP
.B \-c,  \-\-clean
.
show only files without changes
.TP
.B \-u,  \-\-unknown
.
show only unknown (not tracked) files
.TP
.B \-i,  \-\-ignored
.
show only ignored files
.TP
.B \-n,  \-\-no\-status
.
hide status prefix
.TP
.BI \-t,  \-\-terse \ <VALUE>
.
show the terse output (EXPERIMENTAL) (default: nothing)
.TP
.B \-C,  \-\-copies
.
show source of copied files (DEFAULT: ui.statuscopies)
.TP
.B \-0,  \-\-print0
.
end filenames with NUL, for use with xargs
.TP
.BI \-\-rev \ <REV[+]>
.
show difference from revision
.TP
.BI \-\-change \ <REV>
.
list the changed files of a revision
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: st
.UNINDENT
.UNINDENT
.SS summary
.sp
summarize working directory state:
.sp
.nf
.ft C
hg summary [\-\-remote]
.ft P
.fi
.sp
This generates a brief summary of the working directory state,
including parents, branch, commit status, phase and available updates.
.sp
With the \-\-remote option, this will check the default paths for
incoming and outgoing changes. This can be time\-consuming.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-remote
.
check for push and pull
.UNINDENT
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: sum
.UNINDENT
.UNINDENT
.SS unshelve
.sp
restore a shelved change to the working directory:
.sp
.nf
.ft C
hg unshelve [OPTION]... [[\-n] SHELVED]
.ft P
.fi
.sp
This command accepts an optional name of a shelved change to
restore. If none is given, the most recent shelved change is used.
.sp
If a shelved change is applied successfully, the bundle that
contains the shelved changes is moved to a backup location
(.hg/shelve\-backup).
.sp
Since you can restore a shelved change on top of an arbitrary
commit, it is possible that unshelving will result in a conflict
between your changes and the commits you are unshelving onto. If
this occurs, you must resolve the conflict, then use
\fB\-\-continue\fP to complete the unshelve operation. (The bundle
will not be moved until you successfully complete the unshelve.)
.sp
(Alternatively, you can use \fB\-\-abort\fP to abandon an unshelve
that causes a conflict. This reverts the unshelved changes, and
leaves the bundle in place.)
.sp
If bare shelved change (without interactive, include and exclude
option) was done on newly created branch it would restore branch
information to the working directory.
.sp
After a successful unshelve, the shelved changes are stored in a
backup directory. Only the N most recent backups are kept. N
defaults to 10 but can be overridden using the \fBshelve.maxbackups\fP
configuration option.
.sp
Timestamp in seconds is used to decide order of backups. More
than \fBmaxbackups\fP backups are kept, if same timestamp
prevents from deciding exact order of them, for safety.
.sp
Selected changes can be unshelved with \fB\-\-interactive\fP flag.
The working directory is updated with the selected changes, and
only the unselected changes remain shelved.
Note: The whole shelve is applied to working directory first before
running interactively. So, this will bring up all the conflicts between
working directory and the shelve, irrespective of which changes will be
unshelved.
.sp
Options:
.INDENT 0.0
.TP
.B \-a,  \-\-abort
.
abort an incomplete unshelve operation
.TP
.B \-c,  \-\-continue
.
continue an incomplete unshelve operation
.TP
.B \-i,  \-\-interactive
.
use interactive mode (EXPERIMENTAL)
.TP
.B \-k,  \-\-keep
.
keep shelve after unshelving
.TP
.BI \-n,  \-\-name \ <NAME>
.
restore shelved change with given name
.TP
.BI \-t,  \-\-tool \ <VALUE>
.
specify merge tool
.TP
.BI \-\-date \ <DATE>
.
set date for temporary commits (DEPRECATED)
.UNINDENT
.SS update
.sp
update working directory (or switch revisions):
.sp
.nf
.ft C
hg update [\-C|\-c|\-m] [\-d DATE] [[\-r] REV]
.ft P
.fi
.sp
Update the repository\(aqs working directory to the specified
changeset. If no changeset is specified, update to the tip of the
current named branch and move the active bookmark (see \%\fBhg help
bookmarks\fP\:).
.sp
Update sets the working directory\(aqs parent revision to the specified
changeset (see \%\fBhg help parents\fP\:).
.sp
If the changeset is not a descendant or ancestor of the working
directory\(aqs parent and there are uncommitted changes, the update is
aborted. With the \-c/\-\-check option, the working directory is checked
for uncommitted changes; if none are found, the working directory is
updated to the specified changeset.
.sp
The \-C/\-\-clean, \-c/\-\-check, and \-m/\-\-merge options control what
happens if the working directory contains uncommitted changes.
At most of one of them can be specified.
.INDENT 0.0
.IP 1. 3
.
If no option is specified, and if
the requested changeset is an ancestor or descendant of
the working directory\(aqs parent, the uncommitted changes
are merged into the requested changeset and the merged
result is left uncommitted. If the requested changeset is
not an ancestor or descendant (that is, it is on another
branch), the update is aborted and the uncommitted changes
are preserved.
.IP 2. 3
.
With the \-m/\-\-merge option, the update is allowed even if the
requested changeset is not an ancestor or descendant of
the working directory\(aqs parent.
.IP 3. 3
.
With the \-c/\-\-check option, the update is aborted and the
uncommitted changes are preserved.
.IP 4. 3
.
With the \-C/\-\-clean option, uncommitted changes are discarded and
the working directory is updated to the requested changeset.
.UNINDENT
.sp
To cancel an uncommitted merge (and lose your changes), use
\%\fBhg merge \-\-abort\fP\:.
.sp
Use null as the changeset to remove the working directory (like
\%\fBhg clone \-U\fP\:).
.sp
If you want to revert just one file to an older revision, use
\%\fBhg revert [\-r REV] NAME\fP\:.
.sp
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
.sp
Returns 0 on success, 1 if there are unresolved files.
.sp
Options:
.INDENT 0.0
.TP
.B \-C,  \-\-clean
.
discard uncommitted changes (no backup)
.TP
.B \-c,  \-\-check
.
require clean working directory
.TP
.B \-m,  \-\-merge
.
merge uncommitted changes
.TP
.BI \-d,  \-\-date \ <DATE>
.
tipmost revision matching date
.TP
.BI \-r,  \-\-rev \ <REV>
.
revision
.TP
.BI \-t,  \-\-tool \ <TOOL>
.
specify merge tool
.UNINDENT
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: up checkout co
.UNINDENT
.UNINDENT
.SS Change import/export
.SS archive
.sp
create an unversioned archive of a repository revision:
.sp
.nf
.ft C
hg archive [OPTION]... DEST
.ft P
.fi
.sp
By default, the revision used is the parent of the working
directory; use \-r/\-\-rev to specify a different revision.
.sp
The archive type is automatically detected based on file
extension (to override, use \-t/\-\-type).
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
create a zip file containing the 1.0 release:
.sp
.nf
.ft C
hg archive \-r 1.0 project\-1.0.zip
.ft P
.fi
.IP \(bu 2
.
create a tarball excluding .hg files:
.sp
.nf
.ft C
hg archive project.tar.gz \-X ".hg*"
.ft P
.fi
.UNINDENT
.sp
Valid types are:
.INDENT 0.0
.TP
.B \fBfiles\fP
.sp
a directory full of files (default)
.TP
.B \fBtar\fP
.sp
tar archive, uncompressed
.TP
.B \fBtbz2\fP
.sp
tar archive, compressed using bzip2
.TP
.B \fBtgz\fP
.sp
tar archive, compressed using gzip
.TP
.B \fBtxz\fP
.sp
tar archive, compressed using lzma (only in Python 3)
.TP
.B \fBuzip\fP
.sp
zip archive, uncompressed
.TP
.B \fBzip\fP
.sp
zip archive, compressed using deflate
.UNINDENT
.sp
The exact name of the destination archive or directory is given
using a format string; see \%\fBhg help export\fP\: for details.
.sp
Each member added to an archive file has a directory prefix
prepended. Use \-p/\-\-prefix to specify a format string for the
prefix. The default is the basename of the archive, with suffixes
removed.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-no\-decode
.
do not pass files through decoders
.TP
.BI \-p,  \-\-prefix \ <PREFIX>
.
directory prefix for files in archive
.TP
.BI \-r,  \-\-rev \ <REV>
.
revision to distribute
.TP
.BI \-t,  \-\-type \ <TYPE>
.
type of distribution to create
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS bundle
.sp
create a bundle file:
.sp
.nf
.ft C
hg bundle [\-f] [\-t BUNDLESPEC] [\-a] [\-r REV]... [\-\-base REV]... FILE [DEST]...
.ft P
.fi
.sp
Generate a bundle file containing data to be transferred to another
repository.
.sp
To create a bundle containing all changesets, use \-a/\-\-all
(or \-\-base null). Otherwise, hg assumes the destination will have
all the nodes you specify with \-\-base parameters. Otherwise, hg
will assume the repository has all the nodes in destination, or
default\-push/default if no destination is specified, where destination
is the repositories you provide through DEST option.
.sp
You can change bundle format with the \-t/\-\-type option. See
\%\fBhg help bundlespec\fP\: for documentation on this format. By default,
the most appropriate format is used and compression defaults to
bzip2.
.sp
The bundle file can then be transferred using conventional means
and applied to another repository with the unbundle or pull
command. This is useful when direct push and pull are not
available or when exporting an entire repository is undesirable.
.sp
Applying bundles preserves all changeset contents including
permissions, copy/rename information, and revision history.
.sp
Returns 0 on success, 1 if no changes found.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-exact
.
compute the base from the revision specified
.TP
.B \-f,  \-\-force
.
run even when the destination is unrelated
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
a changeset intended to be added to the destination
.TP
.BI \-b,  \-\-branch \ <BRANCH[+]>
.
a specific branch you would like to bundle
.TP
.BI \-\-base \ <REV[+]>
.
a base changeset assumed to be available at the destination
.TP
.B \-a,  \-\-all
.
bundle all changesets in the repository
.TP
.BI \-t,  \-\-type \ <TYPE>
.
bundle compression type to use (default: bzip2)
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS export
.sp
dump the header and diffs for one or more changesets:
.sp
.nf
.ft C
hg export [OPTION]... [\-o OUTFILESPEC] [\-r] [REV]...
.ft P
.fi
.sp
Print the changeset header and diffs for one or more revisions.
If no revision is given, the parent of the working directory is used.
.sp
The information shown in the changeset header is: author, date,
branch name (if non\-default), changeset hash, parent(s) and commit
comment.
.IP Note
.
\%\fBhg export\fP\: may generate unexpected diff output for merge
changesets, as it will compare the merge changeset against its
first parent only.
.RE
.sp
Output may be to a file, in which case the name of the file is
given using a template string. See \%\fBhg help templates\fP\:. In addition
to the common template keywords, the following formatting rules are
supported:
.INDENT 0.0
.TP
.B \fB%%\fP
.sp
literal "%" character
.TP
.B \fB%H\fP
.sp
changeset hash (40 hexadecimal digits)
.TP
.B \fB%N\fP
.sp
number of patches being generated
.TP
.B \fB%R\fP
.sp
changeset revision number
.TP
.B \fB%b\fP
.sp
basename of the exporting repository
.TP
.B \fB%h\fP
.sp
short\-form changeset hash (12 hexadecimal digits)
.TP
.B \fB%m\fP
.sp
first line of the commit message (only alphanumeric characters)
.TP
.B \fB%n\fP
.sp
zero\-padded sequence number, starting at 1
.TP
.B \fB%r\fP
.sp
zero\-padded changeset revision number
.TP
.B \fB\e\fP
.sp
literal "" character
.UNINDENT
.sp
Without the \-a/\-\-text option, export will avoid generating diffs
of files it detects as binary. With \-a, export will generate a
diff anyway, probably with undesirable results.
.sp
With \-B/\-\-bookmark changesets reachable by the given bookmark are
selected.
.sp
Use the \-g/\-\-git option to generate diffs in the git extended diff
format. See \%\fBhg help diffs\fP\: for more information.
.sp
With the \-\-switch\-parent option, the diff will be against the
second parent. It can be useful to review a merge.
.sp
Template:
.sp
The following keywords are supported in addition to the common template
keywords and functions. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B diff
.
String. Diff content.
.TP
.B parents
.
List of strings. Parent nodes of the changeset.
.UNINDENT
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
use export and import to transplant a bugfix to the current
branch:
.sp
.nf
.ft C
hg export \-r 9353 | hg import \-
.ft P
.fi
.IP \(bu 2
.
export all the changesets between two revisions to a file with
rename information:
.sp
.nf
.ft C
hg export \-\-git \-r 123:150 > changes.txt
.ft P
.fi
.IP \(bu 2
.
split outgoing changes into a series of patches with
descriptive names:
.sp
.nf
.ft C
hg export \-r "outgoing()" \-o "%n\-%m.patch"
.ft P
.fi
.UNINDENT
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-B,  \-\-bookmark \ <BOOKMARK>
.
export changes only reachable by given bookmark
.TP
.BI \-o,  \-\-output \ <FORMAT>
.
print output to file with formatted name
.TP
.B \-\-switch\-parent
.
diff against the second parent
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
revisions to export
.TP
.B \-a,  \-\-text
.
treat all files as text
.TP
.B \-g,  \-\-git
.
use git extended diff format (DEFAULT: diff.git)
.TP
.B \-\-binary
.
generate binary diffs in git mode (default)
.TP
.B \-\-nodates
.
omit dates from diff headers
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS import
.sp
import an ordered set of patches:
.sp
.nf
.ft C
hg import [OPTION]... PATCH...
.ft P
.fi
.sp
Import a list of patches and commit them individually (unless
\-\-no\-commit is specified).
.sp
To read a patch from standard input (stdin), use "\-" as the patch
name. If a URL is specified, the patch will be downloaded from
there.
.sp
Import first applies changes to the working directory (unless
\-\-bypass is specified), import will abort if there are outstanding
changes.
.sp
Use \-\-bypass to apply and commit patches directly to the
repository, without affecting the working directory. Without
\-\-exact, patches will be applied on top of the working directory
parent revision.
.sp
You can import a patch straight from a mail message. Even patches
as attachments work (to use the body part, it must have type
text/plain or text/x\-patch). From and Subject headers of email
message are used as default committer and commit message. All
text/plain body parts before first diff are added to the commit
message.
.sp
If the imported patch was generated by \%\fBhg export\fP\:, user and
description from patch override values from message headers and
body. Values given on command line with \-m/\-\-message and \-u/\-\-user
override these.
.sp
If \-\-exact is specified, import will set the working directory to
the parent of each patch before applying it, and will abort if the
resulting changeset has a different ID than the one recorded in
the patch. This will guard against various ways that portable
patch formats and mail systems might fail to transfer Mercurial
data or metadata. See \%\fBhg bundle\fP\: for lossless transmission.
.sp
Use \-\-partial to ensure a changeset will be created from the patch
even if some hunks fail to apply. Hunks that fail to apply will be
written to a <target\-file>.rej file. Conflicts can then be resolved
by hand before \%\fBhg commit \-\-amend\fP\: is run to update the created
changeset. This flag exists to let people import patches that
partially apply without losing the associated metadata (author,
date, description, ...).
.IP Note
.
When no hunks apply cleanly, \%\fBhg import \-\-partial\fP\: will create
an empty changeset, importing only the patch metadata.
.RE
.sp
With \-s/\-\-similarity, hg will attempt to discover renames and
copies in the patch in the same way as \%\fBhg addremove\fP\:.
.sp
It is possible to use external patch programs to perform the patch
by setting the \fBui.patch\fP configuration option. For the default
internal tool, the fuzz can also be configured via \fBpatch.fuzz\fP.
See \%\fBhg help config\fP\: for more information about configuration
files and how to use these options.
.sp
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
import a traditional patch from a website and detect renames:
.sp
.nf
.ft C
hg import \-s 80 http://example.com/bugfix.patch
.ft P
.fi
.IP \(bu 2
.
import a changeset from an hgweb server:
.sp
.nf
.ft C
hg import https://www.mercurial\-scm.org/repo/hg/rev/5ca8c111e9aa
.ft P
.fi
.IP \(bu 2
.
import all the patches in an Unix\-style mbox:
.sp
.nf
.ft C
hg import incoming\-patches.mbox
.ft P
.fi
.IP \(bu 2
.
import patches from stdin:
.sp
.nf
.ft C
hg import \-
.ft P
.fi
.IP \(bu 2
.
attempt to exactly restore an exported changeset (not always
possible):
.sp
.nf
.ft C
hg import \-\-exact proposed\-fix.patch
.ft P
.fi
.IP \(bu 2
.
use an external tool to apply a patch which is too fuzzy for
the default internal tool.
.INDENT 2.0
.INDENT 3.5
.sp
hg import \-\-config ui.patch="patch \-\-merge" fuzzy.patch
.UNINDENT
.UNINDENT
.IP \(bu 2
.
change the default fuzzing from 2 to a less strict 7
.INDENT 2.0
.INDENT 3.5
.sp
hg import \-\-config ui.fuzz=7 fuzz.patch
.UNINDENT
.UNINDENT
.UNINDENT
.sp
Returns 0 on success, 1 on partial success (see \-\-partial).
.sp
Options:
.INDENT 0.0
.TP
.BI \-p,  \-\-strip \ <NUM>
.
directory strip option for patch. This has the same meaning as the corresponding patch option (default: 1)
.TP
.BI \-b,  \-\-base \ <PATH>
.
base path (DEPRECATED)
.TP
.B \-\-secret
.
use the secret phase for committing
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-f,  \-\-force
.
skip check for outstanding uncommitted changes (DEPRECATED)
.TP
.B \-\-no\-commit
.
don\(aqt commit, just update the working directory
.TP
.B \-\-bypass
.
apply patch without touching the working directory
.TP
.B \-\-partial
.
commit even if some hunks fail
.TP
.B \-\-exact
.
abort if patch would apply lossily
.TP
.BI \-\-prefix \ <DIR>
.
apply patch to subdirectory
.TP
.B \-\-import\-branch
.
use any branch information in patch (implied by \-\-exact)
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.TP
.BI \-s,  \-\-similarity \ <SIMILARITY>
.
guess renamed files by similarity (0<=s<=100)
.UNINDENT
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: patch
.UNINDENT
.UNINDENT
.SS unbundle
.sp
apply one or more bundle files:
.sp
.nf
.ft C
hg unbundle [\-u] FILE...
.ft P
.fi
.sp
Apply one or more bundle files generated by \%\fBhg bundle\fP\:.
.sp
Returns 0 on success, 1 if an update has unresolved files.
.sp
Options:
.INDENT 0.0
.TP
.B \-u,  \-\-update
.
update to new branch head if changesets were unbundled
.UNINDENT
.SS Repository maintenance
.SS manifest
.sp
output the current or given revision of the project manifest:
.sp
.nf
.ft C
hg manifest [\-r REV]
.ft P
.fi
.sp
Print a list of version controlled files for the given revision.
If no revision is given, the first parent of the working directory
is used, or the null revision if no revision is checked out.
.sp
With \-v, print file permissions, symlink and executable bits.
With \-\-debug, print file revision hashes.
.sp
If option \-\-all is specified, the list of all files from all revisions
is printed. This includes deleted and renamed files.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV>
.
revision to display
.TP
.B \-\-all
.
list files from all revisions
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS recover
.sp
roll back an interrupted transaction:
.sp
.nf
.ft C
hg recover
.ft P
.fi
.sp
Recover from an interrupted commit or pull.
.sp
This command tries to fix the repository status after an
interrupted operation. It should only be necessary when Mercurial
suggests it.
.sp
Returns 0 if successful, 1 if nothing to recover or verify fails.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-verify
.
run \fIhg verify\fP after successful recover
.UNINDENT
.SS rollback
.sp
roll back the last transaction (DANGEROUS) (DEPRECATED):
.sp
.nf
.ft C
hg rollback
.ft P
.fi
.sp
Please use \%\fBhg commit \-\-amend\fP\: instead of rollback to correct
mistakes in the last commit.
.sp
This command should be used with care. There is only one level of
rollback, and there is no way to undo a rollback. It will also
restore the dirstate at the time of the last transaction, losing
any dirstate changes since that time. This command does not alter
the working directory.
.sp
Transactions are used to encapsulate the effects of all commands
that create new changesets or propagate existing changesets into a
repository.
.sp
For example, the following commands are transactional, and their
effects can be rolled back:
.INDENT 0.0
.IP \(bu 2
.
commit
.IP \(bu 2
.
import
.IP \(bu 2
.
pull
.IP \(bu 2
.
push (with this repository as the destination)
.IP \(bu 2
.
unbundle
.UNINDENT
.sp
To avoid permanent data loss, rollback will refuse to rollback a
commit transaction if it isn\(aqt checked out. Use \-\-force to
override this protection.
.sp
The rollback command can be entirely disabled by setting the
\fBui.rollback\fP configuration setting to false. If you\(aqre here
because you want to use rollback and it\(aqs disabled, you can
re\-enable the command by setting \fBui.rollback\fP to true.
.sp
This command is not intended for use on public repositories. Once
changes are visible for pull by other users, rolling a transaction
back locally is ineffective (someone else may already have pulled
the changes). Furthermore, a race is possible with readers of the
repository; for example an in\-progress pull from the repository
may fail if a rollback is performed.
.sp
Returns 0 on success, 1 if no rollback data is available.
.sp
Options:
.INDENT 0.0
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.TP
.B \-f,  \-\-force
.
ignore safety measures
.UNINDENT
.SS verify
.sp
verify the integrity of the repository:
.sp
.nf
.ft C
hg verify
.ft P
.fi
.sp
Verify the integrity of the current repository.
.sp
This will perform an extensive check of the repository\(aqs
integrity, validating the hashes and checksums of each entry in
the changelog, manifest, and tracked files, as well as the
integrity of their crosslinks and indices.
.sp
Please see \%https://mercurial\-scm.org/wiki/RepositoryCorruption\:
for more information about recovery from corruption of the
repository.
.sp
Returns 0 on success, 1 if errors are encountered.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-full
.
perform more checks (EXPERIMENTAL)
.UNINDENT
.SS Help
.SS config
.sp
show combined config settings from all hgrc files:
.sp
.nf
.ft C
hg config [\-u] [NAME]...
.ft P
.fi
.sp
With no arguments, print names and values of all config items.
.sp
With one argument of the form section.name, print just the value
of that config item.
.sp
With multiple arguments, print names and values of all config
items with matching section names or section.names.
.sp
With \-\-edit, start an editor on the user\-level config file. With
\-\-global, edit the system\-wide config file. With \-\-local, edit the
repository\-level config file.
.sp
With \-\-source, the source (filename and line number) is printed
for each config item.
.sp
See \%\fBhg help config\fP\: for more information about config files.
.sp
\-\-non\-shared flag is used to edit \fI.hg/hgrc\-not\-shared\fP config file.
This file is not shared across shares when in share\-safe mode.
.sp
Template:
.sp
The following keywords are supported. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B name
.
String. Config name.
.TP
.B source
.
String. Filename and line number where the item is defined.
.TP
.B value
.
String. Config value.
.UNINDENT
.sp
The \-\-shared flag can be used to edit the config file of shared source
repository. It only works when you have shared using the experimental
share safe feature.
.sp
Returns 0 on success, 1 if NAME does not exist.
.sp
Options:
.INDENT 0.0
.TP
.B \-u,  \-\-untrusted
.
show untrusted configuration options
.TP
.B \-\-exp\-all\-known
.
show all known config option (EXPERIMENTAL)
.TP
.B \-e,  \-\-edit
.
edit user config
.TP
.B \-l,  \-\-local
.
edit repository config
.TP
.B \-\-source
.
show source of configuration value
.TP
.B \-\-shared
.
edit shared source repository config (EXPERIMENTAL)
.TP
.B \-\-non\-shared
.
edit non shared config (EXPERIMENTAL)
.TP
.B \-g,  \-\-global
.
edit global config
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: showconfig debugconfig
.UNINDENT
.UNINDENT
.SS help
.sp
show help for a given topic or a help overview:
.sp
.nf
.ft C
hg help [\-eck] [\-s PLATFORM] [TOPIC]
.ft P
.fi
.sp
With no arguments, print a list of commands with short help messages.
.sp
Given a topic, extension, or command name, print help for that
topic.
.sp
Returns 0 if successful.
.sp
Options:
.INDENT 0.0
.TP
.B \-e,  \-\-extension
.
show only help for extensions
.TP
.B \-c,  \-\-command
.
show only help for commands
.TP
.B \-k,  \-\-keyword
.
show topics matching keyword
.TP
.BI \-s,  \-\-system \ <PLATFORM[+]>
.
show help for specific platform(s)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS version
.sp
output version and copyright information:
.sp
.nf
.ft C
hg version
.ft P
.fi
.sp
Template:
.sp
The following keywords are supported. See also \%\fBhg help templates\fP\:.
.INDENT 0.0
.TP
.B extensions
.
List of extensions.
.TP
.B ver
.
String. Version number.
.UNINDENT
.sp
And each entry of \fB{extensions}\fP provides the following sub\-keywords
in addition to \fB{ver}\fP.
.INDENT 0.0
.TP
.B bundled
.
Boolean. True if included in the release.
.TP
.B name
.
String. Extension name.
.UNINDENT
.sp
Options:
.INDENT 0.0
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS Uncategorized commands
.SH BUNDLE FILE FORMATS
.sp
Mercurial supports generating standalone "bundle" files that hold repository
data. These "bundles" are typically saved locally and used later or exchanged
between different repositories, possibly on different machines. Example
commands using bundles are \%\fBhg bundle\fP\: and \%\fBhg unbundle\fP\:.
.sp
Generation of bundle files is controlled by a "bundle specification"
("bundlespec") string. This string tells the bundle generation process how
to create the bundle.
.sp
A "bundlespec" string is composed of the following elements:
.INDENT 0.0
.TP
.B type
.
A string denoting the bundle format to use.
.TP
.B compression
.
Denotes the compression engine to use compressing the raw bundle data.
.TP
.B parameters
.
Arbitrary key\-value parameters to further control bundle generation.
.UNINDENT
.sp
A "bundlespec" string has the following formats:
.INDENT 0.0
.TP
.B <type>
.
The literal bundle format string is used.
.TP
.B <compression>\-<type>
.
The compression engine and format are delimited by a hyphen (\fB\-\fP).
.UNINDENT
.sp
Optional parameters follow the \fB<type>\fP. Parameters are URI escaped
\fBkey=value\fP pairs. Each pair is delimited by a semicolon (\fB;\fP). The
first parameter begins after a \fB;\fP immediately following the \fB<type>\fP
value.
.SS Available Types
.sp
The following bundle <type> strings are available:
.INDENT 0.0
.TP
.B v1
.
Produces a legacy "changegroup" version 1 bundle.
.sp
This format is compatible with nearly all Mercurial clients because it is
the oldest. However, it has some limitations, which is why it is no longer
the default for new repositories.
.sp
\fBv1\fP bundles can be used with modern repositories using the "generaldelta"
storage format. However, it may take longer to produce the bundle and the
resulting bundle may be significantly larger than a \fBv2\fP bundle.
.sp
\fBv1\fP bundles can only use the \fBgzip\fP, \fBbzip2\fP, and \fBnone\fP compression
formats.
.TP
.B v2
.
Produces a version 2 bundle.
.sp
Version 2 bundles are an extensible format that can store additional
repository data (such as bookmarks and phases information) and they can
store data more efficiently, resulting in smaller bundles.
.sp
Version 2 bundles can also use modern compression engines, such as
\fBzstd\fP, making them faster to compress and often smaller.
.UNINDENT
.SS Available Compression Engines
.sp
The following bundle <compression> engines can be used:
.INDENT 0.0
.TP
.B \fBbzip2\fP
.sp
An algorithm that produces smaller bundles than \fBgzip\fP.
.sp
All Mercurial clients should support this format.
.sp
This engine will likely produce smaller bundles than \fBgzip\fP but
will be significantly slower, both during compression and
decompression.
.sp
If available, the \fBzstd\fP engine can yield similar or better
compression at much higher speeds.
.TP
.B \fBgzip\fP
.sp
zlib compression using the DEFLATE algorithm.
.sp
All Mercurial clients should support this format. The compression
algorithm strikes a reasonable balance between compression ratio
and size.
.TP
.B \fBnone\fP
.sp
No compression is performed.
.sp
Use this compression engine to explicitly disable compression.
.UNINDENT
.SS Available Options
.sp
The following options exist:
.INDENT 0.0
.TP
.B changegroup
.
Include the changegroup data in the bundle (default to True).
.TP
.B cg.version
.
Select the version of the changegroup to use. Available options are : 01, 02
or 03. By default it will be automatically selected according to the current
repository format.
.TP
.B obsolescence
.
Include obsolescence\-markers relevant to the bundled changesets.
.TP
.B phases
.
Include phase information relevant to the bundled changesets.
.TP
.B revbranchcache
.
Include the "tags\-fnodes" cache inside the bundle.
.TP
.B tagsfnodescache
.
Include the "tags\-fnodes" cache inside the bundle.
.UNINDENT
.SS Examples
.INDENT 0.0
.TP
.B \fBv2\fP
.sp
Produce a \fBv2\fP bundle using default options, including compression.
.TP
.B \fBnone\-v1\fP
.sp
Produce a \fBv1\fP bundle with no compression.
.TP
.B \fBzstd\-v2\fP
.sp
Produce a \fBv2\fP bundle with zstandard compression using default
settings.
.TP
.B \fBzstd\-v1\fP
.sp
This errors because \fBzstd\fP is not supported for \fBv1\fP types.
.UNINDENT
.SH COLORIZING OUTPUTS
.sp
Mercurial colorizes output from several commands.
.sp
For example, the diff command shows additions in green and deletions
in red, while the status command shows modified files in magenta. Many
other commands have analogous colors. It is possible to customize
these colors.
.sp
To enable color (default) whenever possible use:
.sp
.nf
.ft C
[ui]
color = yes
.ft P
.fi
.sp
To disable color use:
.sp
.nf
.ft C
[ui]
color = no
.ft P
.fi
.sp
See \%\fBhg help config.ui.color\fP\: for details.
.sp
The default pager on Windows does not support color, so enabling the pager
will effectively disable color.  See \%\fBhg help config.ui.paginate\fP\: to disable
the pager.  Alternately, MSYS and Cygwin shells provide \fIless\fP as a pager,
which can be configured to support ANSI color mode.  Windows 10 natively
supports ANSI color mode.
.SS Mode
.sp
Mercurial can use various systems to display color. The supported modes are
\fBansi\fP, \fBwin32\fP, and \fBterminfo\fP.  See \%\fBhg help config.color\fP\: for details
about how to control the mode.
.SS Effects
.sp
Other effects in addition to color, like bold and underlined text, are
also available. By default, the terminfo database is used to find the
terminal codes used to change color and effect.  If terminfo is not
available, then effects are rendered with the ECMA\-48 SGR control
function (aka ANSI escape codes).
.sp
The available effects in terminfo mode are \(aqblink\(aq, \(aqbold\(aq, \(aqdim\(aq,
\(aqinverse\(aq, \(aqinvisible\(aq, \(aqitalic\(aq, \(aqstandout\(aq, and \(aqunderline\(aq; in
ECMA\-48 mode, the options are \(aqbold\(aq, \(aqinverse\(aq, \(aqitalic\(aq, and
\(aqunderline\(aq.  How each is rendered depends on the terminal emulator.
Some may not be available for a given terminal type, and will be
silently ignored.
.sp
If the terminfo entry for your terminal is missing codes for an effect
or has the wrong codes, you can add or override those codes in your
configuration:
.sp
.nf
.ft C
[color]
terminfo.dim = \eE[2m
.ft P
.fi
.sp
where \(aqE\(aq is substituted with an escape character.
.SS Labels
.sp
Text receives color effects depending on the labels that it has. Many
default Mercurial commands emit labelled text. You can also define
your own labels in templates using the label function, see \%\fBhg help
templates\fP\:. A single portion of text may have more than one label. In
that case, effects given to the last label will override any other
effects. This includes the special "none" effect, which nullifies
other effects.
.sp
Labels are normally invisible. In order to see these labels and their
position in the text, use the global \-\-color=debug option. The same
anchor text may be associated to multiple labels, e.g.
.INDENT 0.0
.INDENT 3.5
.sp
[log.changeset changeset.secret|changeset:   22611:6f0a53c8f587]
.UNINDENT
.UNINDENT
.sp
The following are the default effects for some default labels. Default
effects may be overridden from your configuration file:
.sp
.nf
.ft C
[color]
status.modified = blue bold underline red_background
status.added = green bold
status.removed = red bold blue_background
status.deleted = cyan bold underline
status.unknown = magenta bold underline
status.ignored = black bold

# \(aqnone\(aq turns off all effects
status.clean = none
status.copied = none

qseries.applied = blue bold underline
qseries.unapplied = black bold
qseries.missing = red bold

diff.diffline = bold
diff.extended = cyan bold
diff.file_a = red bold
diff.file_b = green bold
diff.hunk = magenta
diff.deleted = red
diff.inserted = green
diff.changed = white
diff.tab =
diff.trailingwhitespace = bold red_background

# Blank so it inherits the style of the surrounding label
changeset.public =
changeset.draft =
changeset.secret =

resolve.unresolved = red bold
resolve.resolved = green bold

bookmarks.active = green

branches.active = none
branches.closed = black bold
branches.current = green
branches.inactive = none

tags.normal = green
tags.local = black bold

rebase.rebased = blue
rebase.remaining = red bold

shelve.age = cyan
shelve.newest = green bold
shelve.name = blue bold

histedit.remaining = red bold
.ft P
.fi
.SS Custom colors
.sp
Because there are only eight standard colors, Mercurial allows you
to define color names for other color slots which might be available
for your terminal type, assuming terminfo mode.  For instance:
.sp
.nf
.ft C
color.brightblue = 12
color.pink = 207
color.orange = 202
.ft P
.fi
.sp
to set \(aqbrightblue\(aq to color slot 12 (useful for 16 color terminals
that have brighter colors defined in the upper eight) and, \(aqpink\(aq and
\(aqorange\(aq to colors in 256\-color xterm\(aqs default color cube.  These
defined colors may then be used as any of the pre\-defined eight,
including appending \(aq_background\(aq to set the background to that color.
.SH DATE FORMATS
.sp
Some commands allow the user to specify a date, e.g.:
.INDENT 0.0
.IP \(bu 2
.
backout, commit, import, tag: Specify the commit date.
.IP \(bu 2
.
log, revert, update: Select revision(s) by date.
.UNINDENT
.sp
Many date formats are valid. Here are some examples:
.INDENT 0.0
.IP \(bu 2
.
\fBWed Dec 6 13:18:29 2006\fP (local timezone assumed)
.IP \(bu 2
.
\fBDec 6 13:18 \-0600\fP (year assumed, time offset provided)
.IP \(bu 2
.
\fBDec 6 13:18 UTC\fP (UTC and GMT are aliases for +0000)
.IP \(bu 2
.
\fBDec 6\fP (midnight)
.IP \(bu 2
.
\fB13:18\fP (today assumed)
.IP \(bu 2
.
\fB3:39\fP (3:39AM assumed)
.IP \(bu 2
.
\fB3:39pm\fP (15:39)
.IP \(bu 2
.
\fB2006\-12\-06 13:18:29\fP (ISO 8601 format)
.IP \(bu 2
.
\fB2006\-12\-6 13:18\fP
.IP \(bu 2
.
\fB2006\-12\-6\fP
.IP \(bu 2
.
\fB12\-6\fP
.IP \(bu 2
.
\fB12/6\fP
.IP \(bu 2
.
\fB12/6/6\fP (Dec 6 2006)
.IP \(bu 2
.
\fBtoday\fP (midnight)
.IP \(bu 2
.
\fByesterday\fP (midnight)
.IP \(bu 2
.
\fBnow\fP \- right now
.UNINDENT
.sp
Lastly, there is Mercurial\(aqs internal format:
.INDENT 0.0
.IP \(bu 2
.
\fB1165411109 0\fP (Wed Dec 6 13:18:29 2006 UTC)
.UNINDENT
.sp
This is the internal representation format for dates. The first number
is the number of seconds since the epoch (1970\-01\-01 00:00 UTC). The
second is the offset of the local timezone, in seconds west of UTC
(negative if the timezone is east of UTC).
.sp
The log command also accepts date ranges:
.INDENT 0.0
.IP \(bu 2
.
\fB<DATE\fP \- at or before a given date/time
.IP \(bu 2
.
\fB>DATE\fP \- on or after a given date/time
.IP \(bu 2
.
\fBDATE to DATE\fP \- a date range, inclusive
.IP \(bu 2
.
\fB\-DAYS\fP \- within a given number of days from today
.UNINDENT
.SH DEPRECATED FEATURES
.sp
Mercurial evolves over time, some features, options, commands may be replaced by
better and more secure alternatives. This topic will help you migrating your
existing usage and/or configuration to newer features.
.SS Commands
.sp
The following commands are still available but their use are not recommended:
.sp
\fBlocate\fP
.sp
This command has been replaced by \fIhg files\fP.
.sp
\fBparents\fP
.sp
This command can be replaced by \fIhg summary\fP or \fIhg log\fP with appropriate
revsets. See \fIhg help revsets\fP for more information.
.sp
\fBtip\fP
.sp
The recommended alternative is \fIhg heads\fP.
.SS Options
.INDENT 0.0
.TP
.B \fBweb.allowpull\fP
.sp
Renamed to \fIallow\-pull\fP.
.TP
.B \fBweb.allow_push\fP
.sp
Renamed to \fIallow\-push\fP.
.UNINDENT
.SH DIFF FORMATS
.sp
Mercurial\(aqs default format for showing changes between two versions of
a file is compatible with the unified format of GNU diff, which can be
used by GNU patch and many other standard tools.
.sp
While this standard format is often enough, it does not encode the
following information:
.INDENT 0.0
.IP \(bu 2
.
executable status and other permission bits
.IP \(bu 2
.
copy or rename information
.IP \(bu 2
.
changes in binary files
.IP \(bu 2
.
creation or deletion of empty files
.UNINDENT
.sp
Mercurial also supports the extended diff format from the git VCS
which addresses these limitations. The git diff format is not produced
by default because a few widespread tools still do not understand this
format.
.sp
This means that when generating diffs from a Mercurial repository
(e.g. with \%\fBhg export\fP\:), you should be careful about things like file
copies and renames or other things mentioned above, because when
applying a standard diff to a different repository, this extra
information is lost. Mercurial\(aqs internal operations (like push and
pull) are not affected by this, because they use an internal binary
format for communicating changes.
.sp
To make Mercurial produce the git extended diff format, use the \-\-git
option available for many commands, or set \(aqgit = True\(aq in the [diff]
section of your configuration file. You do not need to set this option
when importing diffs in this format or using them in the mq extension.
.SH ENVIRONMENT VARIABLES
.INDENT 0.0
.TP
.B HG
.
Path to the \(aqhg\(aq executable, automatically passed when running
hooks, extensions or external tools. If unset or empty, this is
the hg executable\(aqs name if it\(aqs frozen, or an executable named
\(aqhg\(aq (with %PATHEXT% [defaulting to COM/EXE/BAT/CMD] extensions on
Windows) is searched.
.TP
.B HGEDITOR
.
This is the name of the editor to run when committing. See EDITOR.
.sp
(deprecated, see \%\fBhg help config.ui.editor\fP\:)
.TP
.B HGENCODING
.
This overrides the default locale setting detected by Mercurial.
This setting is used to convert data including usernames,
changeset descriptions, tag names, and branches. This setting can
be overridden with the \-\-encoding command\-line option.
.TP
.B HGENCODINGMODE
.
This sets Mercurial\(aqs behavior for handling unknown characters
while transcoding user input. The default is "strict", which
causes Mercurial to abort if it can\(aqt map a character. Other
settings include "replace", which replaces unknown characters, and
"ignore", which drops them. This setting can be overridden with
the \-\-encodingmode command\-line option.
.TP
.B HGENCODINGAMBIGUOUS
.
This sets Mercurial\(aqs behavior for handling characters with
"ambiguous" widths like accented Latin characters with East Asian
fonts. By default, Mercurial assumes ambiguous characters are
narrow, set this variable to "wide" if such characters cause
formatting problems.
.TP
.B HGMERGE
.
An executable to use for resolving merge conflicts. The program
will be executed with three arguments: local file, remote file,
ancestor file.
.sp
(deprecated, see \%\fBhg help config.ui.merge\fP\:)
.TP
.B HGRCPATH
.
A list of files or directories to search for configuration
files. Item separator is ":" on Unix, ";" on Windows. If HGRCPATH
is not set, platform default search path is used. If empty, only
the .hg/hgrc from the current repository is read.
.sp
For each element in HGRCPATH:
.INDENT 7.0
.IP \(bu 2
.
if it\(aqs a directory, all files ending with .rc are added
.IP \(bu 2
.
otherwise, the file itself will be added
.UNINDENT
.TP
.B HGRCSKIPREPO
.
When set, the .hg/hgrc from repositories are not read.
.TP
.B HGPLAIN
.
When set, this disables any configuration settings that might
change Mercurial\(aqs default output. This includes encoding,
defaults, verbose mode, debug mode, quiet mode, tracebacks, and
localization. This can be useful when scripting against Mercurial
in the face of existing user configuration.
.sp
In addition to the features disabled by \fBHGPLAIN=\fP, the following
values can be specified to adjust behavior:
.INDENT 7.0
.TP
.B \fB+strictflags\fP
.sp
Restrict parsing of command line flags.
.UNINDENT
.sp
Equivalent options set via command line flags or environment
variables are not overridden.
.sp
See \%\fBhg help scripting\fP\: for details.
.TP
.B HGPLAINEXCEPT
.
This is a comma\-separated list of features to preserve when
HGPLAIN is enabled. Currently the following values are supported:
.INDENT 7.0
.TP
.B \fBalias\fP
.sp
Don\(aqt remove aliases.
.TP
.B \fBcolor\fP
.sp
Don\(aqt disable colored output.
.TP
.B \fBi18n\fP
.sp
Preserve internationalization.
.TP
.B \fBrevsetalias\fP
.sp
Don\(aqt remove revset aliases.
.TP
.B \fBtemplatealias\fP
.sp
Don\(aqt remove template aliases.
.TP
.B \fBprogress\fP
.sp
Don\(aqt hide progress output.
.UNINDENT
.sp
Setting HGPLAINEXCEPT to anything (even an empty string) will
enable plain mode.
.TP
.B HGUSER
.
This is the string used as the author of a commit. If not set,
available values will be considered in this order:
.INDENT 7.0
.IP \(bu 2
.
HGUSER (deprecated)
.IP \(bu 2
.
configuration files from the HGRCPATH
.IP \(bu 2
.
EMAIL
.IP \(bu 2
.
interactive prompt
.IP \(bu 2
.
LOGNAME (with \fB@hostname\fP appended)
.UNINDENT
.sp
(deprecated, see \%\fBhg help config.ui.username\fP\:)
.TP
.B EMAIL
.
May be used as the author of a commit; see HGUSER.
.TP
.B LOGNAME
.
May be used as the author of a commit; see HGUSER.
.TP
.B VISUAL
.
This is the name of the editor to use when committing. See EDITOR.
.TP
.B EDITOR
.
Sometimes Mercurial needs to open a text file in an editor for a
user to modify, for example when writing commit messages. The
editor it uses is determined by looking at the environment
variables HGEDITOR, VISUAL and EDITOR, in that order. The first
non\-empty one is chosen. If all of them are empty, the editor
defaults to \(aqvi\(aq.
.TP
.B PYTHONPATH
.
This is used by Python to find imported modules and may need to be
set appropriately if this Mercurial is not installed system\-wide.
.UNINDENT
.SH SAFELY REWRITING HISTORY (EXPERIMENTAL)
.sp
Obsolescence markers make it possible to mark changesets that have been
deleted or superseded in a new version of the changeset.
.sp
Unlike the previous way of handling such changes, by stripping the old
changesets from the repository, obsolescence markers can be propagated
between repositories. This allows for a safe and simple way of exchanging
mutable history and altering it after the fact. Changeset phases are
respected, such that only draft and secret changesets can be altered (see
\%\fBhg help phases\fP\: for details).
.sp
Obsolescence is tracked using "obsolescence markers", a piece of metadata
tracking which changesets have been made obsolete, potential successors for
a given changeset, the moment the changeset was marked as obsolete, and the
user who performed the rewriting operation. The markers are stored
separately from standard changeset data can be exchanged without any of the
precursor changesets, preventing unnecessary exchange of obsolescence data.
.sp
The complete set of obsolescence markers describes a history of changeset
modifications that is orthogonal to the repository history of file
modifications. This changeset history allows for detection and automatic
resolution of edge cases arising from multiple users rewriting the same part
of history concurrently.
.SS Current feature status
.sp
This feature is still in development.
.SS Instability
.sp
Rewriting changesets might introduce instability.
.sp
There are two main kinds of instability: orphaning and diverging.
.sp
Orphans are changesets left behind when their ancestors are rewritten.
Divergence has two variants:
.INDENT 0.0
.IP \(bu 2
.
Content\-divergence occurs when independent rewrites of the same changesets
lead to different results.
.IP \(bu 2
.
Phase\-divergence occurs when the old (obsolete) version of a changeset
becomes public.
.UNINDENT
.sp
It is possible to prevent local creation of orphans by using the following config:
.sp
.nf
.ft C
[experimental]
evolution.createmarkers = true
evolution.exchange = true
.ft P
.fi
.sp
You can also enable that option explicitly:
.sp
.nf
.ft C
[experimental]
evolution.createmarkers = true
evolution.exchange = true
evolution.allowunstable = true
.ft P
.fi
.SH USING ADDITIONAL FEATURES
.sp
Mercurial has the ability to add new features through the use of
extensions. Extensions may add new commands, add options to
existing commands, change the default behavior of commands, or
implement hooks.
.sp
To enable the "foo" extension, either shipped with Mercurial or in the
Python search path, create an entry for it in your configuration file,
like this:
.sp
.nf
.ft C
[extensions]
foo =
.ft P
.fi
.sp
You may also specify the full path to an extension:
.sp
.nf
.ft C
[extensions]
myfeature = ~/.hgext/myfeature.py
.ft P
.fi
.sp
See \%\fBhg help config\fP\: for more information on configuration files.
.sp
Extensions are not loaded by default for a variety of reasons:
they can increase startup overhead; they may be meant for advanced
usage only; they may provide potentially dangerous abilities (such
as letting you destroy or modify history); they might not be ready
for prime time; or they may alter some usual behaviors of stock
Mercurial. It is thus up to the user to activate extensions as
needed.
.sp
To explicitly disable an extension enabled in a configuration file of
broader scope, prepend its path with !:
.sp
.nf
.ft C
[extensions]
# disabling extension bar residing in /path/to/extension/bar.py
bar = !/path/to/extension/bar.py
# ditto, but no path was supplied for extension baz
baz = !
.ft P
.fi
.sp
disabled extensions:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.TP
.B acl
.
hooks for controlling repository access
.TP
.B blackbox
.
log repository events to a blackbox for debugging
.TP
.B bugzilla
.
hooks for integrating with the Bugzilla bug tracker
.TP
.B censor
.
erase file content at a given revision
.TP
.B churn
.
command to display statistics about repository history
.TP
.B clonebundles
.
advertise pre\-generated bundles to seed clones
.TP
.B closehead
.
close arbitrary heads without checking them out first
.TP
.B convert
.
import revisions from foreign VCS repositories into Mercurial
.TP
.B eol
.
automatically manage newlines in repository files
.TP
.B extdiff
.
command to allow external programs to compare revisions
.TP
.B factotum
.
http authentication with factotum
.TP
.B fastexport
.
export repositories as git fast\-import stream
.TP
.B githelp
.
try mapping git commands to Mercurial commands
.TP
.B gpg
.
commands to sign and verify changesets
.TP
.B hgk
.
browse the repository in a graphical way
.TP
.B highlight
.
syntax highlighting for hgweb (requires Pygments)
.TP
.B histedit
.
interactive history editing
.TP
.B keyword
.
expand keywords in tracked files
.TP
.B largefiles
.
track large binary files
.TP
.B mq
.
manage a stack of patches
.TP
.B notify
.
hooks for sending email push notifications
.TP
.B patchbomb
.
command to send changesets as (a series of) patch emails
.TP
.B rebase
.
command to move sets of revisions to a different ancestor
.TP
.B relink
.
recreates hardlinks between repository clones
.TP
.B schemes
.
extend schemes with shortcuts to repository swarms
.TP
.B share
.
share a common history between several working directories
.TP
.B transplant
.
command to transplant changesets from another branch
.TP
.B win32mbcs
.
allow the use of MBCS paths with problematic encodings
.TP
.B zeroconf
.
discover and advertise repositories on the local network
.UNINDENT
.UNINDENT
.UNINDENT
.SH SPECIFYING FILE SETS
.sp
Mercurial supports a functional language for selecting a set of
files.
.sp
Like other file patterns, this pattern type is indicated by a prefix,
\(aqset:\(aq. The language supports a number of predicates which are joined
by infix operators. Parenthesis can be used for grouping.
.sp
Identifiers such as filenames or patterns must be quoted with single
or double quotes if they contain characters outside of
\fB[.*{}[]?/\e_a\-zA\-Z0\-9\ex80\-\exff]\fP or if they match one of the
predefined predicates. This generally applies to file patterns other
than globs and arguments for predicates. Pattern prefixes such as
\fBpath:\fP may be specified without quoting.
.sp
Special characters can be used in quoted identifiers by escaping them,
e.g., \fB\en\fP is interpreted as a newline. To prevent them from being
interpreted, strings can be prefixed with \fBr\fP, e.g. \fBr\(aq...\(aq\fP.
.sp
See also \%\fBhg help patterns\fP\:.
.SS Operators
.sp
There is a single prefix operator:
.INDENT 0.0
.TP
.B \fBnot x\fP
.sp
Files not in x. Short form is \fB! x\fP.
.UNINDENT
.sp
These are the supported infix operators:
.INDENT 0.0
.TP
.B \fBx and y\fP
.sp
The intersection of files in x and y. Short form is \fBx & y\fP.
.TP
.B \fBx or y\fP
.sp
The union of files in x and y. There are two alternative short
forms: \fBx | y\fP and \fBx + y\fP.
.TP
.B \fBx \- y\fP
.sp
Files in x but not in y.
.UNINDENT
.SS Predicates
.sp
The following predicates are supported:
.INDENT 0.0
.TP
.B \fBadded()\fP
.sp
File that is added according to \%\fBhg status\fP\:.
.TP
.B \fBbinary()\fP
.sp
File that appears to be binary (contains NUL bytes).
.TP
.B \fBclean()\fP
.sp
File that is clean according to \%\fBhg status\fP\:.
.TP
.B \fBcopied()\fP
.sp
File that is recorded as being copied.
.TP
.B \fBdeleted()\fP
.sp
Alias for \fBmissing()\fP.
.TP
.B \fBencoding(name)\fP
.sp
File can be successfully decoded with the given character
encoding. May not be useful for encodings other than ASCII and
UTF\-8.
.TP
.B \fBeol(style)\fP
.sp
File contains newlines of the given style (dos, unix, mac). Binary
files are excluded, files with mixed line endings match multiple
styles.
.TP
.B \fBexec()\fP
.sp
File that is marked as executable.
.TP
.B \fBgrep(regex)\fP
.sp
File contains the given regular expression.
.TP
.B \fBhgignore()\fP
.sp
File that matches the active .hgignore pattern.
.TP
.B \fBignored()\fP
.sp
File that is ignored according to \%\fBhg status\fP\:.
.TP
.B \fBmissing()\fP
.sp
File that is missing according to \%\fBhg status\fP\:.
.TP
.B \fBmodified()\fP
.sp
File that is modified according to \%\fBhg status\fP\:.
.TP
.B \fBportable()\fP
.sp
File that has a portable name. (This doesn\(aqt include filenames with case
collisions.)
.TP
.B \fBremoved()\fP
.sp
File that is removed according to \%\fBhg status\fP\:.
.TP
.B \fBresolved()\fP
.sp
File that is marked resolved according to \%\fBhg resolve \-l\fP\:.
.TP
.B \fBrevs(revs, pattern)\fP
.sp
Evaluate set in the specified revisions. If the revset match multiple
revs, this will return file matching pattern in any of the revision.
.TP
.B \fBsize(expression)\fP
.sp
File size matches the given expression. Examples:
.INDENT 7.0
.IP \(bu 2
.
size(\(aq1k\(aq) \- files from 1024 to 2047 bytes
.IP \(bu 2
.
size(\(aq< 20k\(aq) \- files less than 20480 bytes
.IP \(bu 2
.
size(\(aq>= .5MB\(aq) \- files at least 524288 bytes
.IP \(bu 2
.
size(\(aq4k \- 1MB\(aq) \- files from 4096 bytes to 1048576 bytes
.UNINDENT
.TP
.B \fBstatus(base, rev, pattern)\fP
.sp
Evaluate predicate using status change between \fBbase\fP and
\fBrev\fP. Examples:
.INDENT 7.0
.IP \(bu 2
.
\fBstatus(3, 7, added())\fP \- matches files added from "3" to "7"
.UNINDENT
.TP
.B \fBsubrepo([pattern])\fP
.sp
Subrepositories whose paths match the given pattern.
.TP
.B \fBsymlink()\fP
.sp
File that is marked as a symlink.
.TP
.B \fBtracked()\fP
.sp
File that is under Mercurial control.
.TP
.B \fBunknown()\fP
.sp
File that is unknown according to \%\fBhg status\fP\:.
.TP
.B \fBunresolved()\fP
.sp
File that is marked unresolved according to \%\fBhg resolve \-l\fP\:.
.UNINDENT
.SS Examples
.sp
Some sample queries:
.INDENT 0.0
.IP \(bu 2
.
Show status of files that appear to be binary in the working directory:
.sp
.nf
.ft C
hg status \-A "set:binary()"
.ft P
.fi
.IP \(bu 2
.
Forget files that are in .hgignore but are already tracked:
.sp
.nf
.ft C
hg forget "set:hgignore() and not ignored()"
.ft P
.fi
.IP \(bu 2
.
Find text files that contain a string:
.sp
.nf
.ft C
hg files "set:grep(magic) and not binary()"
.ft P
.fi
.IP \(bu 2
.
Find C files in a non\-standard encoding:
.sp
.nf
.ft C
hg files "set:**.c and not encoding(\(aqUTF\-8\(aq)"
.ft P
.fi
.IP \(bu 2
.
Revert copies of large binary files:
.sp
.nf
.ft C
hg revert "set:copied() and binary() and size(\(aq>1M\(aq)"
.ft P
.fi
.IP \(bu 2
.
Revert files that were added to the working directory:
.sp
.nf
.ft C
hg revert "set:revs(\(aqwdir()\(aq, added())"
.ft P
.fi
.IP \(bu 2
.
Remove files listed in foo.lst that contain the letter a or b:
.sp
.nf
.ft C
hg remove "set: listfile:foo.lst and (**a* or **b*)"
.ft P
.fi
.UNINDENT
.SH COMMAND\-LINE FLAGS
.sp
Most Mercurial commands accept various flags.
.SS Flag names
.sp
Flags for each command are listed in \%\fBhg help\fP\: for that command.
Additionally, some flags, such as \-\-repository, are global and can be used with
any command \- those are seen in \%\fBhg help \-v\fP\:, and can be specified before or
after the command.
.sp
Every flag has at least a long name, such as \-\-repository. Some flags may also
have a short one\-letter name, such as the equivalent \-R. Using the short or long
name is equivalent and has the same effect. The long name may be abbreviated to
any unambiguous prefix. For example, \%\fBhg commit \-\-amend\fP\: can be abbreviated
to \%\fBhg commit \-\-am\fP\:.
.sp
Flags that have a short name can also be bundled together \- for instance, to
specify both \-\-edit (short \-e) and \-\-interactive (short \-i), one could use:
.sp
.nf
.ft C
hg commit \-ei
.ft P
.fi
.sp
If any of the bundled flags takes a value (i.e. is not a boolean), it must be
last, followed by the value:
.sp
.nf
.ft C
hg commit \-im \(aqMessage\(aq
.ft P
.fi
.SS Flag types
.sp
Mercurial command\-line flags can be strings, numbers, booleans, or lists of
strings.
.SS Specifying flag values
.sp
The following syntaxes are allowed, assuming a flag \(aqflagname\(aq with short name
\(aqf\(aq:
.sp
.nf
.ft C
\-\-flagname=foo
\-\-flagname foo
\-f foo
\-ffoo
.ft P
.fi
.sp
This syntax applies to all non\-boolean flags (strings, numbers or lists).
.SS Specifying boolean flags
.sp
Boolean flags do not take a value parameter. To specify a boolean, use the flag
name to set it to true, or the same name prefixed with \(aqno\-\(aq to set it to
false:
.sp
.nf
.ft C
hg commit \-\-interactive
hg commit \-\-no\-interactive
.ft P
.fi
.SS Specifying list flags
.sp
List flags take multiple values. To specify them, pass the flag multiple times:
.sp
.nf
.ft C
hg files \-\-include mercurial \-\-include tests
.ft P
.fi
.SS Setting flag defaults
.sp
In order to set a default value for a flag in an hgrc file, it is recommended to
use aliases:
.sp
.nf
.ft C
[alias]
commit = commit \-\-interactive
.ft P
.fi
.sp
For more information on hgrc files, see \%\fBhg help config\fP\:.
.SS Overriding flags on the command line
.sp
If the same non\-list flag is specified multiple times on the command line, the
latest specification is used:
.sp
.nf
.ft C
hg commit \-m "Ignored value" \-m "Used value"
.ft P
.fi
.sp
This includes the use of aliases \- e.g., if one has:
.sp
.nf
.ft C
[alias]
committemp = commit \-m "Ignored value"
.ft P
.fi
.sp
then the following command will override that \-m:
.sp
.nf
.ft C
hg committemp \-m "Used value"
.ft P
.fi
.SS Overriding flag defaults
.sp
Every flag has a default value, and you may also set your own defaults in hgrc
as described above.
Except for list flags, defaults can be overridden on the command line simply by
specifying the flag in that location.
.SS Hidden flags
.sp
Some flags are not shown in a command\(aqs help by default \- specifically, those
that are deemed to be experimental, deprecated or advanced. To show all flags,
add the \-\-verbose flag for the help command:
.sp
.nf
.ft C
hg help \-\-verbose commit
.ft P
.fi
.SH GLOSSARY
.INDENT 0.0
.TP
.B Ancestor
.
Any changeset that can be reached by an unbroken chain of parent
changesets from a given changeset. More precisely, the ancestors
of a changeset can be defined by two properties: a parent of a
changeset is an ancestor, and a parent of an ancestor is an
ancestor. See also: \(aqDescendant\(aq.
.TP
.B Bookmark
.
Bookmarks are pointers to certain commits that move when
committing. They are similar to tags in that it is possible to use
bookmark names in all places where Mercurial expects a changeset
ID, e.g., with \%\fBhg update\fP\:. Unlike tags, bookmarks move along
when you make a commit.
.sp
Bookmarks can be renamed, copied and deleted. Bookmarks are local,
unless they are explicitly pushed or pulled between repositories.
Pushing and pulling bookmarks allow you to collaborate with others
on a branch without creating a named branch.
.TP
.B Branch
.
(Noun) A child changeset that has been created from a parent that
is not a head. These are known as topological branches, see
\(aqBranch, topological\(aq. If a topological branch is named, it becomes
a named branch. If a topological branch is not named, it becomes
an anonymous branch. See \(aqBranch, anonymous\(aq and \(aqBranch, named\(aq.
.sp
Branches may be created when changes are pulled from or pushed to
a remote repository, since new heads may be created by these
operations. Note that the term branch can also be used informally
to describe a development process in which certain development is
done independently of other development. This is sometimes done
explicitly with a named branch, but it can also be done locally,
using bookmarks or clones and anonymous branches.
.sp
Example: "The experimental branch."
.sp
(Verb) The action of creating a child changeset which results in
its parent having more than one child.
.sp
Example: "I\(aqm going to branch at X."
.TP
.B Branch, anonymous
.
Every time a new child changeset is created from a parent that is not
a head and the name of the branch is not changed, a new anonymous
branch is created.
.TP
.B Branch, closed
.
A named branch whose branch heads have all been closed.
.TP
.B Branch, default
.
The branch assigned to a changeset when no name has previously been
assigned.
.TP
.B Branch head
.
See \(aqHead, branch\(aq.
.TP
.B Branch, inactive
.
If a named branch has no topological heads, it is considered to be
inactive. As an example, a feature branch becomes inactive when it
is merged into the default branch. The \%\fBhg branches\fP\: command
shows inactive branches by default, though they can be hidden with
\%\fBhg branches \-\-active\fP\:.
.sp
NOTE: this concept is deprecated because it is too implicit.
Branches should now be explicitly closed using \%\fBhg commit
\-\-close\-branch\fP\: when they are no longer needed.
.TP
.B Branch, named
.
A collection of changesets which have the same branch name. By
default, children of a changeset in a named branch belong to the
same named branch. A child can be explicitly assigned to a
different branch. See \%\fBhg help branch\fP\:, \%\fBhg help branches\fP\: and
\%\fBhg commit \-\-close\-branch\fP\: for more information on managing
branches.
.sp
Named branches can be thought of as a kind of namespace, dividing
the collection of changesets that comprise the repository into a
collection of disjoint subsets. A named branch is not necessarily
a topological branch. If a new named branch is created from the
head of another named branch, or the default branch, but no
further changesets are added to that previous branch, then that
previous branch will be a branch in name only.
.TP
.B Branch tip
.
See \(aqTip, branch\(aq.
.TP
.B Branch, topological
.
Every time a new child changeset is created from a parent that is
not a head, a new topological branch is created. If a topological
branch is named, it becomes a named branch. If a topological
branch is not named, it becomes an anonymous branch of the
current, possibly default, branch.
.TP
.B Changelog
.
A record of the changesets in the order in which they were added
to the repository. This includes details such as changeset id,
author, commit message, date, and list of changed files.
.TP
.B Changeset
.
A snapshot of the state of the repository used to record a change.
.TP
.B Changeset, child
.
The converse of parent changeset: if P is a parent of C, then C is
a child of P. There is no limit to the number of children that a
changeset may have.
.TP
.B Changeset id
.
A SHA\-1 hash that uniquely identifies a changeset. It may be
represented as either a "long" 40 hexadecimal digit string, or a
"short" 12 hexadecimal digit string.
.TP
.B Changeset, merge
.
A changeset with two parents. This occurs when a merge is
committed.
.TP
.B Changeset, parent
.
A revision upon which a child changeset is based. Specifically, a
parent changeset of a changeset C is a changeset whose node
immediately precedes C in the DAG. Changesets have at most two
parents.
.TP
.B Checkout
.
(Noun) The working directory being updated to a specific
revision. This use should probably be avoided where possible, as
changeset is much more appropriate than checkout in this context.
.sp
Example: "I\(aqm using checkout X."
.sp
(Verb) Updating the working directory to a specific changeset. See
\%\fBhg help update\fP\:.
.sp
Example: "I\(aqm going to check out changeset X."
.TP
.B Child changeset
.
See \(aqChangeset, child\(aq.
.TP
.B Close changeset
.
See \(aqHead, closed branch\(aq.
.TP
.B Closed branch
.
See \(aqBranch, closed\(aq.
.TP
.B Clone
.
(Noun) An entire or partial copy of a repository. The partial
clone must be in the form of a revision and its ancestors.
.sp
Example: "Is your clone up to date?"
.sp
(Verb) The process of creating a clone, using \%\fBhg clone\fP\:.
.sp
Example: "I\(aqm going to clone the repository."
.TP
.B Closed branch head
.
See \(aqHead, closed branch\(aq.
.TP
.B Commit
.
(Noun) A synonym for changeset.
.sp
Example: "Is the bug fixed in your recent commit?"
.sp
(Verb) The act of recording changes to a repository. When files
are committed in a working directory, Mercurial finds the
differences between the committed files and their parent
changeset, creating a new changeset in the repository.
.sp
Example: "You should commit those changes now."
.TP
.B Cset
.
A common abbreviation of the term changeset.
.TP
.B DAG
.
The repository of changesets of a distributed version control
system (DVCS) can be described as a directed acyclic graph (DAG),
consisting of nodes and edges, where nodes correspond to
changesets and edges imply a parent \-> child relation. This graph
can be visualized by graphical tools such as \%\fBhg log \-\-graph\fP\:. In
Mercurial, the DAG is limited by the requirement for children to
have at most two parents.
.TP
.B Deprecated
.
Feature removed from documentation, but not scheduled for removal.
.TP
.B Default branch
.
See \(aqBranch, default\(aq.
.TP
.B Descendant
.
Any changeset that can be reached by a chain of child changesets
from a given changeset. More precisely, the descendants of a
changeset can be defined by two properties: the child of a
changeset is a descendant, and the child of a descendant is a
descendant. See also: \(aqAncestor\(aq.
.TP
.B Diff
.
(Noun) The difference between the contents and attributes of files
in two changesets or a changeset and the current working
directory. The difference is usually represented in a standard
form called a "diff" or "patch". The "git diff" format is used
when the changes include copies, renames, or changes to file
attributes, none of which can be represented/handled by classic
"diff" and "patch".
.sp
Example: "Did you see my correction in the diff?"
.sp
(Verb) Diffing two changesets is the action of creating a diff or
patch.
.sp
Example: "If you diff with changeset X, you will see what I mean."
.TP
.B Directory, working
.
The working directory represents the state of the files tracked by
Mercurial, that will be recorded in the next commit. The working
directory initially corresponds to the snapshot at an existing
changeset, known as the parent of the working directory. See
\(aqParent, working directory\(aq. The state may be modified by changes
to the files introduced manually or by a merge. The repository
metadata exists in the .hg directory inside the working directory.
.TP
.B Draft
.
Changesets in the draft phase have not been shared with publishing
repositories and may thus be safely changed by history\-modifying
extensions. See \%\fBhg help phases\fP\:.
.TP
.B Experimental
.
Feature that may change or be removed at a later date.
.TP
.B Graph
.
See DAG and \%\fBhg log \-\-graph\fP\:.
.TP
.B Head
.
The term \(aqhead\(aq may be used to refer to both a branch head or a
repository head, depending on the context. See \(aqHead, branch\(aq and
\(aqHead, repository\(aq for specific definitions.
.sp
Heads are where development generally takes place and are the
usual targets for update and merge operations.
.TP
.B Head, branch
.
A changeset with no descendants on the same named branch.
.TP
.B Head, closed branch
.
A changeset that marks a head as no longer interesting. The closed
head is no longer listed by \%\fBhg heads\fP\:. A branch is considered
closed when all its heads are closed and consequently is not
listed by \%\fBhg branches\fP\:.
.sp
Closed heads can be re\-opened by committing new changeset as the
child of the changeset that marks a head as closed.
.TP
.B Head, repository
.
A topological head which has not been closed.
.TP
.B Head, topological
.
A changeset with no children in the repository.
.TP
.B History, immutable
.
Once committed, changesets cannot be altered.  Extensions which
appear to change history actually create new changesets that
replace existing ones, and then destroy the old changesets. Doing
so in public repositories can result in old changesets being
reintroduced to the repository.
.TP
.B History, rewriting
.
The changesets in a repository are immutable. However, extensions
to Mercurial can be used to alter the repository, usually in such
a way as to preserve changeset contents.
.TP
.B Immutable history
.
See \(aqHistory, immutable\(aq.
.TP
.B Merge changeset
.
See \(aqChangeset, merge\(aq.
.TP
.B Manifest
.
Each changeset has a manifest, which is the list of files that are
tracked by the changeset.
.TP
.B Merge
.
Used to bring together divergent branches of work. When you update
to a changeset and then merge another changeset, you bring the
history of the latter changeset into your working directory. Once
conflicts are resolved (and marked), this merge may be committed
as a merge changeset, bringing two branches together in the DAG.
.TP
.B Named branch
.
See \(aqBranch, named\(aq.
.TP
.B Null changeset
.
The empty changeset. It is the parent state of newly\-initialized
repositories and repositories with no checked out revision. It is
thus the parent of root changesets and the effective ancestor when
merging unrelated changesets. Can be specified by the alias \(aqnull\(aq
or by the changeset ID \(aq000000000000\(aq.
.TP
.B Parent
.
See \(aqChangeset, parent\(aq.
.TP
.B Parent changeset
.
See \(aqChangeset, parent\(aq.
.TP
.B Parent, working directory
.
The working directory parent reflects a virtual revision which is
the child of the changeset (or two changesets with an uncommitted
merge) shown by \%\fBhg parents\fP\:. This is changed with
\%\fBhg update\fP\:. Other commands to see the working directory parent
are \%\fBhg summary\fP\: and \%\fBhg id\fP\:. Can be specified by the alias ".".
.TP
.B Patch
.
(Noun) The product of a diff operation.
.sp
Example: "I\(aqve sent you my patch."
.sp
(Verb) The process of using a patch file to transform one
changeset into another.
.sp
Example: "You will need to patch that revision."
.TP
.B Phase
.
A per\-changeset state tracking how the changeset has been or
should be shared. See \%\fBhg help phases\fP\:.
.TP
.B Public
.
Changesets in the public phase have been shared with publishing
repositories and are therefore considered immutable. See \%\fBhg help
phases\fP\:.
.TP
.B Pull
.
An operation in which changesets in a remote repository which are
not in the local repository are brought into the local
repository. Note that this operation without special arguments
only updates the repository, it does not update the files in the
working directory. See \%\fBhg help pull\fP\:.
.TP
.B Push
.
An operation in which changesets in a local repository which are
not in a remote repository are sent to the remote repository. Note
that this operation only adds changesets which have been committed
locally to the remote repository. Uncommitted changes are not
sent. See \%\fBhg help push\fP\:.
.TP
.B Repository
.
The metadata describing all recorded states of a collection of
files. Each recorded state is represented by a changeset. A
repository is usually (but not always) found in the \fB.hg\fP
subdirectory of a working directory. Any recorded state can be
recreated by "updating" a working directory to a specific
changeset.
.TP
.B Repository head
.
See \(aqHead, repository\(aq.
.TP
.B Revision
.
A state of the repository at some point in time. Earlier revisions
can be updated to by using \%\fBhg update\fP\:.  See also \(aqRevision
number\(aq; See also \(aqChangeset\(aq.
.TP
.B Revision number
.
This integer uniquely identifies a changeset in a specific
repository. It represents the order in which changesets were added
to a repository, starting with revision number 0. Note that the
revision number may be different in each clone of a repository. To
identify changesets uniquely between different clones, see
\(aqChangeset id\(aq.
.TP
.B Revlog
.
History storage mechanism used by Mercurial. It is a form of delta
encoding, with occasional full revision of data followed by delta
of each successive revision. It includes data and an index
pointing to the data.
.TP
.B Rewriting history
.
See \(aqHistory, rewriting\(aq.
.TP
.B Root
.
A changeset that has only the null changeset as its parent. Most
repositories have only a single root changeset.
.TP
.B Secret
.
Changesets in the secret phase may not be shared via push, pull,
or clone. See \%\fBhg help phases\fP\:.
.TP
.B Tag
.
An alternative name given to a changeset. Tags can be used in all
places where Mercurial expects a changeset ID, e.g., with
\%\fBhg update\fP\:. The creation of a tag is stored in the history and
will thus automatically be shared with other using push and pull.
.TP
.B Tip
.
The changeset with the highest revision number. It is the changeset
most recently added in a repository.
.TP
.B Tip, branch
.
The head of a given branch with the highest revision number. When
a branch name is used as a revision identifier, it refers to the
branch tip. See also \(aqBranch, head\(aq. Note that because revision
numbers may be different in different repository clones, the
branch tip may be different in different cloned repositories.
.TP
.B Update
.
(Noun) Another synonym of changeset.
.sp
Example: "I\(aqve pushed an update."
.sp
(Verb) This term is usually used to describe updating the state of
the working directory to that of a specific changeset. See
\%\fBhg help update\fP\:.
.sp
Example: "You should update."
.TP
.B Working directory
.
See \(aqDirectory, working\(aq.
.TP
.B Working directory parent
.
See \(aqParent, working directory\(aq.
.UNINDENT
.SH SYNTAX FOR MERCURIAL IGNORE FILES
.SS Synopsis
.sp
The Mercurial system uses a file called \fB.hgignore\fP in the root
directory of a repository to control its behavior when it searches
for files that it is not currently tracking.
.SS Description
.sp
The working directory of a Mercurial repository will often contain
files that should not be tracked by Mercurial. These include backup
files created by editors and build products created by compilers.
These files can be ignored by listing them in a \fB.hgignore\fP file in
the root of the working directory. The \fB.hgignore\fP file must be
created manually. It is typically put under version control, so that
the settings will propagate to other repositories with push and pull.
.sp
An untracked file is ignored if its path relative to the repository
root directory, or any prefix path of that path, is matched against
any pattern in \fB.hgignore\fP.
.sp
For example, say we have an untracked file, \fBfile.c\fP, at
\fBa/b/file.c\fP inside our repository. Mercurial will ignore \fBfile.c\fP
if any pattern in \fB.hgignore\fP matches \fBa/b/file.c\fP, \fBa/b\fP or \fBa\fP.
.sp
In addition, a Mercurial configuration file can reference a set of
per\-user or global ignore files. See the \fBignore\fP configuration
key on the \fB[ui]\fP section of \%\fBhg help config\fP\: for details of how to
configure these files.
.sp
To control Mercurial\(aqs handling of files that it manages, many
commands support the \fB\-I\fP and \fB\-X\fP options; see
\%\fBhg help <command>\fP\: and \%\fBhg help patterns\fP\: for details.
.sp
Files that are already tracked are not affected by .hgignore, even
if they appear in .hgignore. An untracked file X can be explicitly
added with \%\fBhg add X\fP\:, even if X would be excluded by a pattern
in .hgignore.
.SS Syntax
.sp
An ignore file is a plain text file consisting of a list of patterns,
with one pattern per line. Empty lines are skipped. The \fB#\fP
character is treated as a comment character, and the \fB\e\fP character
is treated as an escape character.
.sp
Mercurial supports several pattern syntaxes. The default syntax used
is Python/Perl\-style regular expressions.
.sp
To change the syntax used, use a line of the following form:
.sp
.nf
.ft C
syntax: NAME
.ft P
.fi
.sp
where \fBNAME\fP is one of the following:
.INDENT 0.0
.TP
.B \fBregexp\fP
.sp
Regular expression, Python/Perl syntax.
.TP
.B \fBglob\fP
.sp
Shell\-style glob.
.TP
.B \fBrootglob\fP
.sp
A variant of \fBglob\fP that is rooted (see below).
.UNINDENT
.sp
The chosen syntax stays in effect when parsing all patterns that
follow, until another syntax is selected.
.sp
Neither \fBglob\fP nor regexp patterns are rooted. A glob\-syntax
pattern of the form \fB*.c\fP will match a file ending in \fB.c\fP in any
directory, and a regexp pattern of the form \fB\e.c$\fP will do the
same. To root a regexp pattern, start it with \fB^\fP. To get the same
effect with glob\-syntax, you have to use \fBrootglob\fP.
.sp
Subdirectories can have their own .hgignore settings by adding
\fBsubinclude:path/to/subdir/.hgignore\fP to the root \fB.hgignore\fP. See
\%\fBhg help patterns\fP\: for details on \fBsubinclude:\fP and \fBinclude:\fP.
.IP Note
.
Patterns specified in other than \fB.hgignore\fP are always rooted.
Please see \%\fBhg help patterns\fP\: for details.
.RE
.SS Example
.sp
Here is an example ignore file.
.sp
.nf
.ft C
# use glob syntax.
syntax: glob

*.elc
*.pyc
*~

# switch to regexp syntax.
syntax: regexp
^\e.pc/
.ft P
.fi
.SS Debugging
.sp
Use the \fBdebugignore\fP command to see if and why a file is ignored, or to
see the combined ignore pattern. See \%\fBhg help debugignore\fP\: for details.
.SH CONFIGURING HGWEB
.sp
Mercurial\(aqs internal web server, hgweb, can serve either a single
repository, or a tree of repositories. In the second case, repository
paths and global options can be defined using a dedicated
configuration file common to \%\fBhg serve\fP\:, \fBhgweb.wsgi\fP,
\fBhgweb.cgi\fP and \fBhgweb.fcgi\fP.
.sp
This file uses the same syntax as other Mercurial configuration files
but recognizes only the following sections:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
.
web
.IP \(bu 2
.
paths
.IP \(bu 2
.
collections
.UNINDENT
.UNINDENT
.UNINDENT
.sp
The \fBweb\fP options are thoroughly described in \%\fBhg help config\fP\:.
.sp
The \fBpaths\fP section maps URL paths to paths of repositories in the
filesystem. hgweb will not expose the filesystem directly \- only
Mercurial repositories can be published and only according to the
configuration.
.sp
The left hand side is the path in the URL. Note that hgweb reserves
subpaths like \fBrev\fP or \fBfile\fP, try using different names for
nested repositories to avoid confusing effects.
.sp
The right hand side is the path in the filesystem. If the specified
path ends with \fB*\fP or \fB**\fP the filesystem will be searched
recursively for repositories below that point.
With \fB*\fP it will not recurse into the repositories it finds (except for
\fB.hg/patches\fP).
With \fB**\fP it will also search inside repository working directories
and possibly find subrepositories.
.sp
In this example:
.sp
.nf
.ft C
[paths]
/projects/a = /srv/tmprepos/a
/projects/b = c:/repos/b
/ = /srv/repos/*
/user/bob = /home/bob/repos/**
.ft P
.fi
.INDENT 0.0
.IP \(bu 2
.
The first two entries make two repositories in different directories
appear under the same directory in the web interface
.IP \(bu 2
.
The third entry will publish every Mercurial repository found in
\fB/srv/repos/\fP, for instance the repository \fB/srv/repos/quux/\fP
will appear as \fBhttp://server/quux/\fP
.IP \(bu 2
.
The fourth entry will publish both \fBhttp://server/user/bob/quux/\fP
and \fBhttp://server/user/bob/quux/testsubrepo/\fP
.UNINDENT
.sp
The \fBcollections\fP section is deprecated and has been superseded by
\fBpaths\fP.
.SS URLs and Common Arguments
.sp
URLs under each repository have the form \fB/{command}[/{arguments}]\fP
where \fB{command}\fP represents the name of a command or handler and
\fB{arguments}\fP represents any number of additional URL parameters
to that command.
.sp
The web server has a default style associated with it. Styles map to
a collection of named templates. Each template is used to render a
specific piece of data, such as a changeset or diff.
.sp
The style for the current request can be overridden two ways. First,
if \fB{command}\fP contains a hyphen (\fB\-\fP), the text before the hyphen
defines the style. For example, \fB/atom\-log\fP will render the \fBlog\fP
command handler with the \fBatom\fP style. The second way to set the
style is with the \fBstyle\fP query string argument. For example,
\fB/log?style=atom\fP. The hyphenated URL parameter is preferred.
.sp
Not all templates are available for all styles. Attempting to use
a style that doesn\(aqt have all templates defined may result in an error
rendering the page.
.sp
Many commands take a \fB{revision}\fP URL parameter. This defines the
changeset to operate on. This is commonly specified as the short,
12 digit hexadecimal abbreviation for the full 40 character unique
revision identifier. However, any value described by
\%\fBhg help revisions\fP\: typically works.
.SS Commands and URLs
.sp
The following web commands and their URLs are available:
.SS /annotate/{revision}/{path}
.sp
Show changeset information for each line in a file.
.sp
The \fBignorews\fP, \fBignorewsamount\fP, \fBignorewseol\fP, and
\fBignoreblanklines\fP query string arguments have the same meaning as
their \fB[annotate]\fP config equivalents. It uses the hgrc boolean
parsing logic to interpret the value. e.g. \fB0\fP and \fBfalse\fP are
false and \fB1\fP and \fBtrue\fP are true. If not defined, the server
default settings are used.
.sp
The \fBfileannotate\fP template is rendered.
.SS /archive/{revision}.{format}[/{path}]
.sp
Obtain an archive of repository content.
.sp
The content and type of the archive is defined by a URL path parameter.
\fBformat\fP is the file extension of the archive type to be generated. e.g.
\fBzip\fP or \fBtar.bz2\fP. Not all archive types may be allowed by your
server configuration.
.sp
The optional \fBpath\fP URL parameter controls content to include in the
archive. If omitted, every file in the specified revision is present in the
archive. If included, only the specified file or contents of the specified
directory will be included in the archive.
.sp
No template is used for this handler. Raw, binary content is generated.
.SS /bookmarks
.sp
Show information about bookmarks.
.sp
No arguments are accepted.
.sp
The \fBbookmarks\fP template is rendered.
.SS /branches
.sp
Show information about branches.
.sp
All known branches are contained in the output, even closed branches.
.sp
No arguments are accepted.
.sp
The \fBbranches\fP template is rendered.
.SS /changelog[/{revision}]
.sp
Show information about multiple changesets.
.sp
If the optional \fBrevision\fP URL argument is absent, information about
all changesets starting at \fBtip\fP will be rendered. If the \fBrevision\fP
argument is present, changesets will be shown starting from the specified
revision.
.sp
If \fBrevision\fP is absent, the \fBrev\fP query string argument may be
defined. This will perform a search for changesets.
.sp
The argument for \fBrev\fP can be a single revision, a revision set,
or a literal keyword to search for in changeset data (equivalent to
\%\fBhg log \-k\fP\:).
.sp
The \fBrevcount\fP query string argument defines the maximum numbers of
changesets to render.
.sp
For non\-searches, the \fBchangelog\fP template will be rendered.
.SS /changeset[/{revision}]
.sp
Show information about a single changeset.
.sp
A URL path argument is the changeset identifier to show. See \fBhg help
revisions\fP for possible values. If not defined, the \fBtip\fP changeset
will be shown.
.sp
The \fBchangeset\fP template is rendered. Contents of the \fBchangesettag\fP,
\fBchangesetbookmark\fP, \fBfilenodelink\fP, \fBfilenolink\fP, and the many
templates related to diffs may all be used to produce the output.
.SS /comparison/{revision}/{path}
.sp
Show a comparison between the old and new versions of a file from changes
made on a particular revision.
.sp
This is similar to the \fBdiff\fP handler. However, this form features
a split or side\-by\-side diff rather than a unified diff.
.sp
The \fBcontext\fP query string argument can be used to control the lines of
context in the diff.
.sp
The \fBfilecomparison\fP template is rendered.
.SS /diff/{revision}/{path}
.sp
Show how a file changed in a particular commit.
.sp
The \fBfilediff\fP template is rendered.
.sp
This handler is registered under both the \fB/diff\fP and \fB/filediff\fP
paths. \fB/diff\fP is used in modern code.
.SS /file/{revision}[/{path}]
.sp
Show information about a directory or file in the repository.
.sp
Info about the \fBpath\fP given as a URL parameter will be rendered.
.sp
If \fBpath\fP is a directory, information about the entries in that
directory will be rendered. This form is equivalent to the \fBmanifest\fP
handler.
.sp
If \fBpath\fP is a file, information about that file will be shown via
the \fBfilerevision\fP template.
.sp
If \fBpath\fP is not defined, information about the root directory will
be rendered.
.SS /diff/{revision}/{path}
.sp
Show how a file changed in a particular commit.
.sp
The \fBfilediff\fP template is rendered.
.sp
This handler is registered under both the \fB/diff\fP and \fB/filediff\fP
paths. \fB/diff\fP is used in modern code.
.SS /filelog/{revision}/{path}
.sp
Show information about the history of a file in the repository.
.sp
The \fBrevcount\fP query string argument can be defined to control the
maximum number of entries to show.
.sp
The \fBfilelog\fP template will be rendered.
.SS /graph[/{revision}]
.sp
Show information about the graphical topology of the repository.
.sp
Information rendered by this handler can be used to create visual
representations of repository topology.
.sp
The \fBrevision\fP URL parameter controls the starting changeset. If it\(aqs
absent, the default is \fBtip\fP.
.sp
The \fBrevcount\fP query string argument can define the number of changesets
to show information for.
.sp
The \fBgraphtop\fP query string argument can specify the starting changeset
for producing \fBjsdata\fP variable that is used for rendering graph in
JavaScript. By default it has the same value as \fBrevision\fP.
.sp
This handler will render the \fBgraph\fP template.
.SS /help[/{topic}]
.sp
Render help documentation.
.sp
This web command is roughly equivalent to \%\fBhg help\fP\:. If a \fBtopic\fP
is defined, that help topic will be rendered. If not, an index of
available help topics will be rendered.
.sp
The \fBhelp\fP template will be rendered when requesting help for a topic.
\fBhelptopics\fP will be rendered for the index of help topics.
.SS /log[/{revision}[/{path}]]
.sp
Show repository or file history.
.sp
For URLs of the form \fB/log/{revision}\fP, a list of changesets starting at
the specified changeset identifier is shown. If \fB{revision}\fP is not
defined, the default is \fBtip\fP. This form is equivalent to the
\fBchangelog\fP handler.
.sp
For URLs of the form \fB/log/{revision}/{file}\fP, the history for a specific
file will be shown. This form is equivalent to the \fBfilelog\fP handler.
.SS /manifest[/{revision}[/{path}]]
.sp
Show information about a directory.
.sp
If the URL path arguments are omitted, information about the root
directory for the \fBtip\fP changeset will be shown.
.sp
Because this handler can only show information for directories, it
is recommended to use the \fBfile\fP handler instead, as it can handle both
directories and files.
.sp
The \fBmanifest\fP template will be rendered for this handler.
.SS /changeset[/{revision}]
.sp
Show information about a single changeset.
.sp
A URL path argument is the changeset identifier to show. See \fBhg help
revisions\fP for possible values. If not defined, the \fBtip\fP changeset
will be shown.
.sp
The \fBchangeset\fP template is rendered. Contents of the \fBchangesettag\fP,
\fBchangesetbookmark\fP, \fBfilenodelink\fP, \fBfilenolink\fP, and the many
templates related to diffs may all be used to produce the output.
.SS /shortlog
.sp
Show basic information about a set of changesets.
.sp
This accepts the same parameters as the \fBchangelog\fP handler. The only
difference is the \fBshortlog\fP template will be rendered instead of the
\fBchangelog\fP template.
.SS /summary
.sp
Show a summary of repository state.
.sp
Information about the latest changesets, bookmarks, tags, and branches
is captured by this handler.
.sp
The \fBsummary\fP template is rendered.
.SS /tags
.sp
Show information about tags.
.sp
No arguments are accepted.
.sp
The \fBtags\fP template is rendered.
.SH TECHNICAL IMPLEMENTATION TOPICS
.sp
To access a subtopic, use "hg help internals.{subtopic\-name}"
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.TP
.B bid\-merge
.
Bid Merge Algorithm
.TP
.B bundle2
.
Bundle2
.TP
.B bundles
.
Bundles
.TP
.B cbor
.
CBOR
.TP
.B censor
.
Censor
.TP
.B changegroups
.
Changegroups
.TP
.B config
.
Config Registrar
.TP
.B dirstate\-v2
.
dirstate\-v2 file format
.TP
.B extensions
.
Extension API
.TP
.B mergestate
.
Mergestate
.TP
.B requirements
.
Repository Requirements
.TP
.B revlogs
.
Revision Logs
.TP
.B wireprotocol
.
Wire Protocol
.TP
.B wireprotocolrpc
.
Wire Protocol RPC
.TP
.B wireprotocolv2
.
Wire Protocol Version 2
.UNINDENT
.UNINDENT
.UNINDENT
.SH MERGE TOOLS
.sp
To merge files Mercurial uses merge tools.
.sp
A merge tool combines two different versions of a file into a merged
file. Merge tools are given the two files and the greatest common
ancestor of the two file versions, so they can determine the changes
made on both branches.
.sp
Merge tools are used both for \%\fBhg resolve\fP\:, \%\fBhg merge\fP\:, \%\fBhg update\fP\:,
\%\fBhg backout\fP\: and in several extensions.
.sp
Usually, the merge tool tries to automatically reconcile the files by
combining all non\-overlapping changes that occurred separately in
the two different evolutions of the same initial base file. Furthermore, some
interactive merge programs make it easier to manually resolve
conflicting merges, either in a graphical way, or by inserting some
conflict markers. Mercurial does not include any interactive merge
programs but relies on external tools for that.
.SS Available merge tools
.sp
External merge tools and their properties are configured in the
merge\-tools configuration section \- see hgrc(5) \- but they can often just
be named by their executable.
.sp
A merge tool is generally usable if its executable can be found on the
system and if it can handle the merge. The executable is found if it
is an absolute or relative executable path or the name of an
application in the executable search path. The tool is assumed to be
able to handle the merge if it can handle symlinks if the file is a
symlink, if it can handle binary files if the file is binary, and if a
GUI is available if the tool requires a GUI.
.sp
There are some internal merge tools which can be used. The internal
merge tools are:
.INDENT 0.0
.TP
.B \fB:dump\fP
.sp
Creates three versions of the files to merge, containing the
contents of local, other and base. These files can then be used to
perform a merge manually. If the file to be merged is named
\fBa.txt\fP, these files will accordingly be named \fBa.txt.local\fP,
\fBa.txt.other\fP and \fBa.txt.base\fP and they will be placed in the
same directory as \fBa.txt\fP.
.sp
This implies premerge. Therefore, files aren\(aqt dumped, if premerge
runs successfully. Use :forcedump to forcibly write files out.
.sp
(actual capabilities: binary, symlink)
.TP
.B \fB:fail\fP
.sp
Rather than attempting to merge files that were modified on both
branches, it marks them as unresolved. The resolve command must be
used to resolve these conflicts.
.sp
(actual capabilities: binary, symlink)
.TP
.B \fB:forcedump\fP
.sp
Creates three versions of the files as same as :dump, but omits premerge.
.sp
(actual capabilities: binary, symlink)
.TP
.B \fB:local\fP
.sp
Uses the local \fIp1()\fP version of files as the merged version.
.sp
(actual capabilities: binary, symlink)
.TP
.B \fB:merge\fP
.sp
Uses the internal non\-interactive simple merge algorithm for merging
files. It will fail if there are any conflicts and leave markers in
the partially merged file. Markers will have two sections, one for each side
of merge.
.TP
.B \fB:merge\-local\fP
.sp
Like :merge, but resolve all conflicts non\-interactively in favor
of the local \fIp1()\fP changes.
.TP
.B \fB:merge\-other\fP
.sp
Like :merge, but resolve all conflicts non\-interactively in favor
of the other \fIp2()\fP changes.
.TP
.B \fB:merge3\fP
.sp
Uses the internal non\-interactive simple merge algorithm for merging
files. It will fail if there are any conflicts and leave markers in
the partially merged file. Marker will have three sections, one from each
side of the merge and one for the base content.
.TP
.B \fB:mergediff\fP
.sp
Uses the internal non\-interactive simple merge algorithm for merging
files. It will fail if there are any conflicts and leave markers in
the partially merged file. The marker will have two sections, one with the
content from one side of the merge, and one with a diff from the base
content to the content on the other side. (experimental)
.TP
.B \fB:other\fP
.sp
Uses the other \fIp2()\fP version of files as the merged version.
.sp
(actual capabilities: binary, symlink)
.TP
.B \fB:prompt\fP
.sp
Asks the user which of the local \fIp1()\fP or the other \fIp2()\fP version to
keep as the merged version.
.sp
(actual capabilities: binary, symlink)
.TP
.B \fB:tagmerge\fP
.sp
Uses the internal tag merge algorithm (experimental).
.TP
.B \fB:union\fP
.sp
Uses the internal non\-interactive simple merge algorithm for merging
files. It will use both left and right sides for conflict regions.
No markers are inserted.
.UNINDENT
.sp
Internal tools are always available and do not require a GUI but will
by default not handle symlinks or binary files. See next section for
detail about "actual capabilities" described above.
.SS Choosing a merge tool
.sp
Mercurial uses these rules when deciding which merge tool to use:
.INDENT 0.0
.IP 1. 3
.
If a tool has been specified with the \-\-tool option to merge or resolve, it
is used.  If it is the name of a tool in the merge\-tools configuration, its
configuration is used. Otherwise the specified tool must be executable by
the shell.
.IP 2. 3
.
If the \fBHGMERGE\fP environment variable is present, its value is used and
must be executable by the shell.
.IP 3. 3
.
If the filename of the file to be merged matches any of the patterns in the
merge\-patterns configuration section, the first usable merge tool
corresponding to a matching pattern is used.
.IP 4. 3
.
If ui.merge is set it will be considered next. If the value is not the name
of a configured tool, the specified value is used and must be executable by
the shell. Otherwise the named tool is used if it is usable.
.IP 5. 3
.
If any usable merge tools are present in the merge\-tools configuration
section, the one with the highest priority is used.
.IP 6. 3
.
If a program named \fBhgmerge\fP can be found on the system, it is used \- but
it will by default not be used for symlinks and binary files.
.IP 7. 3
.
If the file to be merged is not binary and is not a symlink, then
internal \fB:merge\fP is used.
.IP 8. 3
.
Otherwise, \fB:prompt\fP is used.
.UNINDENT
.sp
For historical reason, Mercurial treats merge tools as below while
examining rules above.
.TS
center;
|l|l|l|l|.
_
T{
step
T}	T{
specified via
T}	T{
binary
T}	T{
symlink
T}
_
T{
.INDENT 0.0
.IP 1. 3
.UNINDENT
T}	T{
\-\-tool
T}	T{
o/o
T}	T{
o/o
T}
_
T{
.INDENT 0.0
.IP 2. 3
.UNINDENT
T}	T{
HGMERGE
T}	T{
o/o
T}	T{
o/o
T}
_
T{
.INDENT 0.0
.IP 3. 3
.UNINDENT
T}	T{
merge\-patterns
T}	T{
o/o(*)
T}	T{
x/?(*)
T}
_
T{
.INDENT 0.0
.IP 4. 3
.UNINDENT
T}	T{
ui.merge
T}	T{
x/?(*)
T}	T{
x/?(*)
T}
_
.TE
.sp
Each capability column indicates Mercurial behavior for
internal/external merge tools at examining each rule.
.INDENT 0.0
.IP \(bu 2
.
"o": "assume that a tool has capability"
.IP \(bu 2
.
"x": "assume that a tool does not have capability"
.IP \(bu 2
.
"?": "check actual capability of a tool"
.UNINDENT
.sp
If \fBmerge.strict\-capability\-check\fP configuration is true, Mercurial
checks capabilities of merge tools strictly in (*) cases above (= each
capability column becomes "?/?"). It is false by default for backward
compatibility.
.IP Note
.
After selecting a merge program, Mercurial will by default attempt
to merge the files using a simple merge algorithm first. Only if it doesn\(aqt
succeed because of conflicting changes will Mercurial actually execute the
merge program. Whether to use the simple merge algorithm first can be
controlled by the premerge setting of the merge tool. Premerge is enabled by
default unless the file is binary or a symlink.
.RE
.sp
See the merge\-tools and ui sections of hgrc(5) for details on the
configuration of merge tools.
.SH PAGER SUPPORT
.sp
Some Mercurial commands can produce a lot of output, and Mercurial will
attempt to use a pager to make those commands more pleasant.
.sp
To set the pager that should be used, set the application variable:
.sp
.nf
.ft C
[pager]
pager = less \-FRX
.ft P
.fi
.sp
If no pager is set in the user or repository configuration, Mercurial uses the
environment variable $PAGER. If $PAGER is not set, pager.pager from the default
or system configuration is used. If none of these are set, a default pager will
be used, typically \fIless\fP on Unix and \fImore\fP on Windows.
.sp
On Windows, \fImore\fP is not color aware, so using it effectively disables color.
MSYS and Cygwin shells provide \fIless\fP as a pager, which can be configured to
support ANSI color codes.  See \%\fBhg help config.color.pagermode\fP\: to configure
the color mode when invoking a pager.
.sp
You can disable the pager for certain commands by adding them to the
pager.ignore list:
.sp
.nf
.ft C
[pager]
ignore = version, help, update
.ft P
.fi
.sp
To ignore global commands like \%\fBhg version\fP\: or \%\fBhg help\fP\:, you have
to specify them in your user configuration file.
.sp
To control whether the pager is used at all for an individual command,
you can use \-\-pager=<value>:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
.
use as needed: \fIauto\fP.
.IP \(bu 2
.
require the pager: \fIyes\fP or \fIon\fP.
.IP \(bu 2
.
suppress the pager: \fIno\fP or \fIoff\fP (any unrecognized value
will also work).
.UNINDENT
.UNINDENT
.UNINDENT
.sp
To globally turn off all attempts to use a pager, set:
.sp
.nf
.ft C
[ui]
paginate = never
.ft P
.fi
.sp
which will prevent the pager from running.
.SH FILE NAME PATTERNS
.sp
Mercurial accepts several notations for identifying one or more files
at a time.
.sp
By default, Mercurial treats filenames verbatim without pattern
matching, relative to the current working directory. Note that your
system shell might perform pattern matching of its own before passing
filenames into Mercurial.
.sp
Alternate pattern notations must be specified explicitly.
.IP Note
.
Patterns specified in \fB.hgignore\fP are not rooted.
Please see \%\fBhg help hgignore\fP\: for details.
.RE
.sp
To use a plain path name without any pattern matching, start it with
\fBpath:\fP. These path names must completely match starting at the
current repository root, and when the path points to a directory, it is matched
recursively. To match all files in a directory non\-recursively (not including
any files in subdirectories), \fBrootfilesin:\fP can be used, specifying an
absolute path (relative to the repository root).
.sp
To use an extended glob, start a name with \fBglob:\fP. Globs are rooted
at the current directory; a glob such as \fB*.c\fP will only match files
in the current directory ending with \fB.c\fP. \fBrootglob:\fP can be used
instead of \fBglob:\fP for a glob that is rooted at the root of the
repository.
.sp
The supported glob syntax extensions are \fB**\fP to match any string
across path separators and \fB{a,b}\fP to mean "a or b".
.sp
To use a Perl/Python regular expression, start a name with \fBre:\fP.
Regexp pattern matching is anchored at the root of the repository.
.sp
To read name patterns from a file, use \fBlistfile:\fP or \fBlistfile0:\fP.
The latter expects null delimited patterns while the former expects line
feeds. Each string read from the file is itself treated as a file
pattern.
.sp
To read a set of patterns from a file, use \fBinclude:\fP or \fBsubinclude:\fP.
\fBinclude:\fP will use all the patterns from the given file and treat them as if
they had been passed in manually.  \fBsubinclude:\fP will only apply the patterns
against files that are under the subinclude file\(aqs directory. See \%\fBhg help
hgignore\fP\: for details on the format of these files.
.sp
All patterns, except for \fBglob:\fP specified in command line (not for
\fB\-I\fP or \fB\-X\fP options), can match also against directories: files
under matched directories are treated as matched.
For \fB\-I\fP and \fB\-X\fP options, \fBglob:\fP will match directories recursively.
.sp
Plain examples:
.sp
.nf
.ft C
path:foo/bar        a name bar in a directory named foo in the root
                    of the repository
path:path:name      a file or directory named "path:name"
rootfilesin:foo/bar the files in a directory called foo/bar, but not any files
                    in its subdirectories and not a file bar in directory foo
.ft P
.fi
.sp
Glob examples:
.sp
.nf
.ft C
glob:*.c       any name ending in ".c" in the current directory
*.c            any name ending in ".c" in the current directory
**.c           any name ending in ".c" in any subdirectory of the
               current directory including itself.
foo/*          any file in directory foo
foo/**         any file in directory foo plus all its subdirectories,
               recursively
foo/*.c        any name ending in ".c" in the directory foo
foo/**.c       any name ending in ".c" in any subdirectory of foo
               including itself.
rootglob:*.c   any name ending in ".c" in the root of the repository
.ft P
.fi
.sp
Regexp examples:
.sp
.nf
.ft C
re:.*\e.c$      any name ending in ".c", anywhere in the repository
.ft P
.fi
.sp
File examples:
.sp
.nf
.ft C
listfile:list.txt  read list from list.txt with one file pattern per line
listfile0:list.txt read list from list.txt with null byte delimiters
.ft P
.fi
.sp
See also \%\fBhg help filesets\fP\:.
.sp
Include examples:
.sp
.nf
.ft C
include:path/to/mypatternfile    reads patterns to be applied to all paths
subinclude:path/to/subignorefile reads patterns specifically for paths in the
                                 subdirectory
.ft P
.fi
.SH WORKING WITH PHASES
.SS What are phases?
.sp
Phases are a system for tracking which changesets have been or should
be shared. This helps prevent common mistakes when modifying history
(for instance, with the mq or rebase extensions).
.sp
Each changeset in a repository is in one of the following phases:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
.
public : changeset is visible on a public server
.IP \(bu 2
.
draft : changeset is not yet published
.IP \(bu 2
.
secret : changeset should not be pushed, pulled, or cloned
.UNINDENT
.UNINDENT
.UNINDENT
.sp
These phases are ordered (public < draft < secret) and no changeset
can be in a lower phase than its ancestors. For instance, if a
changeset is public, all its ancestors are also public. Lastly,
changeset phases should only be changed towards the public phase.
.SS How are phases managed?
.sp
For the most part, phases should work transparently. By default, a
changeset is created in the draft phase and is moved into the public
phase when it is pushed to another repository.
.sp
Once changesets become public, extensions like mq and rebase will
refuse to operate on them to prevent creating duplicate changesets.
Phases can also be manually manipulated with the \%\fBhg phase\fP\: command
if needed. See \%\fBhg help \-v phase\fP\: for examples.
.sp
To make your commits secret by default, put this in your
configuration file:
.sp
.nf
.ft C
[phases]
new\-commit = secret
.ft P
.fi
.SS Phases and servers
.sp
Normally, all servers are \fBpublishing\fP by default. This means:
.sp
.nf
.ft C
\- all draft changesets that are pulled or cloned appear in phase
public on the client

\- all draft changesets that are pushed appear as public on both
client and server

\- secret changesets are neither pushed, pulled, or cloned
.ft P
.fi
.IP Note
.
Pulling a draft changeset from a publishing server does not mark it
as public on the server side due to the read\-only nature of pull.
.RE
.sp
Sometimes it may be desirable to push and pull changesets in the draft
phase to share unfinished work. This can be done by setting a
repository to disable publishing in its configuration file:
.sp
.nf
.ft C
[phases]
publish = False
.ft P
.fi
.sp
See \%\fBhg help config\fP\: for more information on configuration files.
.IP Note
.
Servers running older versions of Mercurial are treated as
publishing.
.RE
.IP Note
.
Changesets in secret phase are not exchanged with the server. This
applies to their content: file names, file contents, and changeset
metadata. For technical reasons, the identifier (e.g. d825e4025e39)
of the secret changeset may be communicated to the server.
.RE
.SS Examples
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
.
list changesets in draft or secret phase:
.sp
.nf
.ft C
hg log \-r "not public()"
.ft P
.fi
.IP \(bu 2
.
change all secret changesets to draft:
.sp
.nf
.ft C
hg phase \-\-draft "secret()"
.ft P
.fi
.IP \(bu 2
.
forcibly move the current changeset and descendants from public to draft:
.sp
.nf
.ft C
hg phase \-\-force \-\-draft .
.ft P
.fi
.IP \(bu 2
.
show a list of changeset revisions and each corresponding phase:
.sp
.nf
.ft C
hg log \-\-template "{rev} {phase}\en"
.ft P
.fi
.IP \(bu 2
.
resynchronize draft changesets relative to a remote repository:
.sp
.nf
.ft C
hg phase \-fd "outgoing(URL)"
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.sp
See \%\fBhg help phase\fP\: for more information on manually manipulating phases.
.SH SPECIFYING REVISIONS
.sp
Mercurial supports several ways to specify revisions.
.SS Specifying single revisions
.sp
A plain integer is treated as a revision number. Negative integers are
treated as sequential offsets from the tip, with \-1 denoting the tip,
\-2 denoting the revision prior to the tip, and so forth.
.sp
A 40\-digit hexadecimal string is treated as a unique revision identifier.
A hexadecimal string less than 40 characters long is treated as a
unique revision identifier and is referred to as a short\-form
identifier. A short\-form identifier is only valid if it is the prefix
of exactly one full\-length identifier.
.sp
Any other string is treated as a bookmark, tag, or branch name. A
bookmark is a movable pointer to a revision. A tag is a permanent name
associated with a revision. A branch name denotes the tipmost open branch head
of that branch \- or if they are all closed, the tipmost closed head of the
branch. Bookmark, tag, and branch names must not contain the ":" character.
.sp
The reserved name "tip" always identifies the most recent revision.
.sp
The reserved name "null" indicates the null revision. This is the
revision of an empty repository, and the parent of revision 0.
.sp
The reserved name "." indicates the working directory parent. If no
working directory is checked out, it is equivalent to null. If an
uncommitted merge is in progress, "." is the revision of the first
parent.
.sp
Finally, commands that expect a single revision (like \fBhg update\fP) also
accept revsets (see below for details). When given a revset, they use the
last revision of the revset. A few commands accept two single revisions
(like \fBhg diff\fP). When given a revset, they use the first and the last
revisions of the revset.
.SS Specifying multiple revisions
.sp
Mercurial supports a functional language for selecting a set of
revisions. Expressions in this language are called revsets.
.sp
The language supports a number of predicates which are joined by infix
operators. Parenthesis can be used for grouping.
.sp
Identifiers such as branch names may need quoting with single or
double quotes if they contain characters like \fB\-\fP or if they match
one of the predefined predicates.
.sp
Special characters can be used in quoted identifiers by escaping them,
e.g., \fB\en\fP is interpreted as a newline. To prevent them from being
interpreted, strings can be prefixed with \fBr\fP, e.g. \fBr\(aq...\(aq\fP.
.SS Operators
.sp
There is a single prefix operator:
.INDENT 0.0
.TP
.B \fBnot x\fP
.sp
Changesets not in x. Short form is \fB! x\fP.
.UNINDENT
.sp
These are the supported infix operators:
.INDENT 0.0
.TP
.B \fBx::y\fP
.sp
A DAG range, meaning all changesets that are descendants of x and
ancestors of y, including x and y themselves. If the first endpoint
is left out, this is equivalent to \fBancestors(y)\fP, if the second
is left out it is equivalent to \fBdescendants(x)\fP.
.sp
An alternative syntax is \fBx..y\fP.
.TP
.B \fBx:y\fP
.sp
All changesets with revision numbers between x and y, both
inclusive. Either endpoint can be left out, they default to 0 and
tip.
.TP
.B \fBx and y\fP
.sp
The intersection of changesets in x and y. Short form is \fBx & y\fP.
.TP
.B \fBx or y\fP
.sp
The union of changesets in x and y. There are two alternative short
forms: \fBx | y\fP and \fBx + y\fP.
.TP
.B \fBx \- y\fP
.sp
Changesets in x but not in y.
.TP
.B \fBx % y\fP
.sp
Changesets that are ancestors of x but not ancestors of y (i.e. ::x \- ::y).
This is shorthand notation for \fBonly(x, y)\fP (see below). The second
argument is optional and, if left out, is equivalent to \fBonly(x)\fP.
.TP
.B \fBx^n\fP
.sp
The nth parent of x, n == 0, 1, or 2.
For n == 0, x; for n == 1, the first parent of each changeset in x;
for n == 2, the second parent of changeset in x.
.TP
.B \fBx~n\fP
.sp
The nth first ancestor of x; \fBx~0\fP is x; \fBx~3\fP is \fBx^^^\fP.
For n < 0, the nth unambiguous descendent of x.
.TP
.B \fBx ## y\fP
.sp
Concatenate strings and identifiers into one string.
.sp
All other prefix, infix and postfix operators have lower priority than
\fB##\fP. For example, \fBa1 ## a2~2\fP is equivalent to \fB(a1 ## a2)~2\fP.
.sp
For example:
.sp
.nf
.ft C
[revsetalias]
issue(a1) = grep(r\(aq\ebissue[ :]?\(aq ## a1 ## r\(aq\eb|\ebbug\e(\(aq ## a1 ## r\(aq\e)\(aq)
.ft P
.fi
.sp
\fBissue(1234)\fP is equivalent to
\fBgrep(r\(aq\ebissue[ :]?1234\eb|\ebbug\e(1234\e)\(aq)\fP
in this case. This matches against all of "issue 1234", "issue:1234",
"issue1234" and "bug(1234)".
.UNINDENT
.sp
There is a single postfix operator:
.INDENT 0.0
.TP
.B \fBx^\fP
.sp
Equivalent to \fBx^1\fP, the first parent of each changeset in x.
.UNINDENT
.SS Patterns
.sp
Where noted, predicates that perform string matching can accept a pattern
string. The pattern may be either a literal, or a regular expression. If the
pattern starts with \fBre:\fP, the remainder of the pattern is treated as a
regular expression. Otherwise, it is treated as a literal. To match a pattern
that actually starts with \fBre:\fP, use the prefix \fBliteral:\fP.
.sp
Matching is case\-sensitive, unless otherwise noted.  To perform a case\-
insensitive match on a case\-sensitive predicate, use a regular expression,
prefixed with \fB(?i)\fP.
.sp
For example, \fBtag(r\(aqre:(?i)release\(aq)\fP matches "release" or "RELEASE"
or "Release", etc.
.SS Predicates
.sp
The following predicates are supported:
.INDENT 0.0
.TP
.B \fBadds(pattern)\fP
.sp
Changesets that add a file matching pattern.
.sp
The pattern without explicit kind like \fBglob:\fP is expected to be
relative to the current directory and match against a file or a
directory.
.TP
.B \fBall()\fP
.sp
All changesets, the same as \fB0:tip\fP.
.TP
.B \fBancestor(*changeset)\fP
.sp
A greatest common ancestor of the changesets.
.sp
Accepts 0 or more changesets.
Will return empty list when passed no args.
Greatest common ancestor of a single changeset is that changeset.
.TP
.B \fBancestors(set[, depth])\fP
.sp
Changesets that are ancestors of changesets in set, including the
given changesets themselves.
.sp
If depth is specified, the result only includes changesets up to
the specified generation.
.TP
.B \fBauthor(string)\fP
.sp
Alias for \fBuser(string)\fP.
.TP
.B \fBbisect(string)\fP
.sp
Changesets marked in the specified bisect status:
.INDENT 7.0
.IP \(bu 2
.
\fBgood\fP, \fBbad\fP, \fBskip\fP: csets explicitly marked as good/bad/skip
.IP \(bu 2
.
\fBgoods\fP, \fBbads\fP      : csets topologically good/bad
.IP \(bu 2
.
\fBrange\fP              : csets taking part in the bisection
.IP \(bu 2
.
\fBpruned\fP             : csets that are goods, bads or skipped
.IP \(bu 2
.
\fBuntested\fP           : csets whose fate is yet unknown
.IP \(bu 2
.
\fBignored\fP            : csets ignored due to DAG topology
.IP \(bu 2
.
\fBcurrent\fP            : the cset currently being bisected
.UNINDENT
.TP
.B \fBbookmark([name])\fP
.sp
The named bookmark or all bookmarks.
.sp
Pattern matching is supported for \fIname\fP. See \%\fBhg help revisions.patterns\fP\:.
.TP
.B \fBbranch(string or set)\fP
.sp
All changesets belonging to the given branch or the branches of the given
changesets.
.sp
Pattern matching is supported for \fIstring\fP. See
\%\fBhg help revisions.patterns\fP\:.
.TP
.B \fBbranchpoint()\fP
.sp
Changesets with more than one child.
.TP
.B \fBbundle()\fP
.sp
Changesets in the bundle.
.sp
Bundle must be specified by the \-R option.
.TP
.B \fBchildren(set)\fP
.sp
Child changesets of changesets in set.
.TP
.B \fBclosed()\fP
.sp
Changeset is closed.
.TP
.B \fBcommonancestors(set)\fP
.sp
Changesets that are ancestors of every changeset in set.
.TP
.B \fBconflictlocal()\fP
.sp
The local side of the merge, if currently in an unresolved merge.
.sp
"merge" here includes merge conflicts from e.g. \(aqhg rebase\(aq or \(aqhg graft\(aq.
.TP
.B \fBconflictother()\fP
.sp
The other side of the merge, if currently in an unresolved merge.
.sp
"merge" here includes merge conflicts from e.g. \(aqhg rebase\(aq or \(aqhg graft\(aq.
.TP
.B \fBcontains(pattern)\fP
.sp
The revision\(aqs manifest contains a file matching pattern (but might not
modify it). See \%\fBhg help patterns\fP\: for information about file patterns.
.sp
The pattern without explicit kind like \fBglob:\fP is expected to be
relative to the current directory and match against a file exactly
for efficiency.
.TP
.B \fBconverted([id])\fP
.sp
Changesets converted from the given identifier in the old repository if
present, or all converted changesets if no identifier is specified.
.TP
.B \fBdate(interval)\fP
.sp
Changesets within the interval, see \%\fBhg help dates\fP\:.
.TP
.B \fBdesc(string)\fP
.sp
Search commit message for string. The match is case\-insensitive.
.sp
Pattern matching is supported for \fIstring\fP. See
\%\fBhg help revisions.patterns\fP\:.
.TP
.B \fBdescendants(set[, depth])\fP
.sp
Changesets which are descendants of changesets in set, including the
given changesets themselves.
.sp
If depth is specified, the result only includes changesets up to
the specified generation.
.TP
.B \fBdestination([set])\fP
.sp
Changesets that were created by a graft, transplant or rebase operation,
with the given revisions specified as the source.  Omitting the optional set
is the same as passing all().
.TP
.B \fBdiffcontains(pattern)\fP
.sp
Search revision differences for when the pattern was added or removed.
.sp
The pattern may be a substring literal or a regular expression. See
\%\fBhg help revisions.patterns\fP\:.
.TP
.B \fBdraft()\fP
.sp
Changeset in draft phase.
.TP
.B \fBexpectsize(set[, size])\fP
.sp
Return the given revset if size matches the revset size.
Abort if the revset doesn\(aqt expect given size.
size can either be an integer range or an integer.
.sp
For example, \fBexpectsize(0:1, 3:5)\fP will abort as revset size is 2 and
2 is not between 3 and 5 inclusive.
.TP
.B \fBextra(label, [value])\fP
.sp
Changesets with the given label in the extra metadata, with the given
optional value.
.sp
Pattern matching is supported for \fIvalue\fP. See
\%\fBhg help revisions.patterns\fP\:.
.TP
.B \fBfile(pattern)\fP
.sp
Changesets affecting files matched by pattern.
.sp
For a faster but less accurate result, consider using \fBfilelog()\fP
instead.
.sp
This predicate uses \fBglob:\fP as the default kind of pattern.
.TP
.B \fBfilelog(pattern)\fP
.sp
Changesets connected to the specified filelog.
.sp
For performance reasons, visits only revisions mentioned in the file\-level
filelog, rather than filtering through all changesets (much faster, but
doesn\(aqt include deletes or duplicate changes). For a slower, more accurate
result, use \fBfile()\fP.
.sp
The pattern without explicit kind like \fBglob:\fP is expected to be
relative to the current directory and match against a file exactly
for efficiency.
.TP
.B \fBfirst(set, [n])\fP
.sp
An alias for limit().
.TP
.B \fBfollow([file[, startrev]])\fP
.sp
An alias for \fB::.\fP (ancestors of the working directory\(aqs first parent).
If file pattern is specified, the histories of files matching given
pattern in the revision given by startrev are followed, including copies.
.TP
.B \fBfollowlines(file, fromline:toline[, startrev=., descend=False])\fP
.sp
Changesets modifying \fIfile\fP in line range (\(aqfromline\(aq, \(aqtoline\(aq).
.sp
Line range corresponds to \(aqfile\(aq content at \(aqstartrev\(aq and should hence be
consistent with file size. If startrev is not specified, working directory\(aqs
parent is used.
.sp
By default, ancestors of \(aqstartrev\(aq are returned. If \(aqdescend\(aq is True,
descendants of \(aqstartrev\(aq are returned though renames are (currently) not
followed in this direction.
.TP
.B \fBgrep(regex)\fP
.sp
Like \fBkeyword(string)\fP but accepts a regex. Use \fBgrep(r\(aq...\(aq)\fP
to ensure special escape characters are handled correctly. Unlike
\fBkeyword(string)\fP, the match is case\-sensitive.
.TP
.B \fBhead()\fP
.sp
Changeset is a named branch head.
.TP
.B \fBheads(set)\fP
.sp
Members of set with no children in set.
.TP
.B \fBhidden()\fP
.sp
Hidden changesets.
.TP
.B \fBid(string)\fP
.sp
Revision non\-ambiguously specified by the given hex string prefix.
.TP
.B \fBkeyword(string)\fP
.sp
Search commit message, user name, and names of changed files for
string. The match is case\-insensitive.
.sp
For a regular expression or case sensitive search of these fields, use
\fBgrep(regex)\fP.
.TP
.B \fBlast(set, [n])\fP
.sp
Last n members of set, defaulting to 1.
.TP
.B \fBlimit(set[, n[, offset]])\fP
.sp
First n members of set, defaulting to 1, starting from offset.
.TP
.B \fBmatching(revision [, field])\fP
.sp
Changesets in which a given set of fields match the set of fields in the
selected revision or set.
.sp
To match more than one field pass the list of fields to match separated
by spaces (e.g. \fBauthor description\fP).
.sp
Valid fields are most regular revision fields and some special fields.
.sp
Regular revision fields are \fBdescription\fP, \fBauthor\fP, \fBbranch\fP,
\fBdate\fP, \fBfiles\fP, \fBphase\fP, \fBparents\fP, \fBsubstate\fP, \fBuser\fP
and \fBdiff\fP.
Note that \fBauthor\fP and \fBuser\fP are synonyms. \fBdiff\fP refers to the
contents of the revision. Two revisions matching their \fBdiff\fP will
also match their \fBfiles\fP.
.sp
Special fields are \fBsummary\fP and \fBmetadata\fP:
\fBsummary\fP matches the first line of the description.
\fBmetadata\fP is equivalent to matching \fBdescription user date\fP
(i.e. it matches the main metadata fields).
.sp
\fBmetadata\fP is the default field which is used when no fields are
specified. You can match more than one field at a time.
.TP
.B \fBmax(set)\fP
.sp
Changeset with highest revision number in set.
.TP
.B \fBmerge()\fP
.sp
Changeset is a merge changeset.
.TP
.B \fBmin(set)\fP
.sp
Changeset with lowest revision number in set.
.TP
.B \fBmodifies(pattern)\fP
.sp
Changesets modifying files matched by pattern.
.sp
The pattern without explicit kind like \fBglob:\fP is expected to be
relative to the current directory and match against a file or a
directory.
.TP
.B \fBnamed(namespace)\fP
.sp
The changesets in a given namespace.
.sp
Pattern matching is supported for \fInamespace\fP. See
\%\fBhg help revisions.patterns\fP\:.
.TP
.B \fBnodefromfile(path)\fP
.sp
Read a list of nodes from the file at \fIpath\fP.
.sp
This applies \fIid(LINE)\fP to each line of the file.
.sp
This is useful when the amount of nodes you need to specify gets too large
for the command line.
.TP
.B \fBnone()\fP
.sp
No changesets.
.TP
.B \fBonly(set, [set])\fP
.sp
Changesets that are ancestors of the first set that are not ancestors
of any other head in the repo. If a second set is specified, the result
is ancestors of the first set that are not ancestors of the second set
(i.e. ::<set1> \- ::<set2>).
.TP
.B \fBorigin([set])\fP
.sp
Changesets that were specified as a source for the grafts, transplants or
rebases that created the given revisions.  Omitting the optional set is the
same as passing all().  If a changeset created by these operations is itself
specified as a source for one of these operations, only the source changeset
for the first operation is selected.
.TP
.B \fBoutgoing([path])\fP
.sp
Changesets not found in the specified destination repository, or the
default push location.
.sp
If the location resolve to multiple repositories, the union of all
outgoing changeset will be used.
.TP
.B \fBp1([set])\fP
.sp
First parent of changesets in set, or the working directory.
.TP
.B \fBp2([set])\fP
.sp
Second parent of changesets in set, or the working directory.
.TP
.B \fBparents([set])\fP
.sp
The set of all parents for all changesets in set, or the working directory.
.TP
.B \fBpresent(set)\fP
.sp
An empty set, if any revision in set isn\(aqt found; otherwise,
all revisions in set.
.sp
If any of specified revisions is not present in the local repository,
the query is normally aborted. But this predicate allows the query
to continue even in such cases.
.TP
.B \fBpublic()\fP
.sp
Changeset in public phase.
.TP
.B \fBremote([id [,path]])\fP
.sp
Local revision that corresponds to the given identifier in a
remote repository, if present. Here, the \(aq.\(aq identifier is a
synonym for the current local branch.
.TP
.B \fBremoves(pattern)\fP
.sp
Changesets which remove files matching pattern.
.sp
The pattern without explicit kind like \fBglob:\fP is expected to be
relative to the current directory and match against a file or a
directory.
.TP
.B \fBrev(number)\fP
.sp
Revision with the given numeric identifier.
.TP
.B \fBreverse(set)\fP
.sp
Reverse order of set.
.TP
.B \fBrevset(set)\fP
.sp
Strictly interpret the content as a revset.
.sp
The content of this special predicate will be strictly interpreted as a
revset. For example, \fBrevset(id(0))\fP will be interpreted as "id(0)"
without possible ambiguity with a "id(0)" bookmark or tag.
.TP
.B \fBroots(set)\fP
.sp
Changesets in set with no parent changeset in set.
.TP
.B \fBsecret()\fP
.sp
Changeset in secret phase.
.TP
.B \fBsort(set[, [\-]key... [, ...]])\fP
.sp
Sort set by keys. The default sort order is ascending, specify a key
as \fB\-key\fP to sort in descending order.
.sp
The keys can be:
.INDENT 7.0
.IP \(bu 2
.
\fBrev\fP for the revision number,
.IP \(bu 2
.
\fBbranch\fP for the branch name,
.IP \(bu 2
.
\fBdesc\fP for the commit message (description),
.IP \(bu 2
.
\fBuser\fP for user name (\fBauthor\fP can be used as an alias),
.IP \(bu 2
.
\fBdate\fP for the commit date
.IP \(bu 2
.
\fBtopo\fP for a reverse topographical sort
.IP \(bu 2
.
\fBnode\fP the nodeid of the revision
.IP \(bu 2
.
\fBrandom\fP randomly shuffle revisions
.UNINDENT
.sp
The \fBtopo\fP sort order cannot be combined with other sort keys. This sort
takes one optional argument, \fBtopo.firstbranch\fP, which takes a revset that
specifies what topographical branches to prioritize in the sort.
.sp
The \fBrandom\fP sort takes one optional \fBrandom.seed\fP argument to control
the pseudo\-randomness of the result.
.TP
.B \fBsubrepo([pattern])\fP
.sp
Changesets that add, modify or remove the given subrepo.  If no subrepo
pattern is named, any subrepo changes are returned.
.TP
.B \fBtag([name])\fP
.sp
The specified tag by name, or all tagged revisions if no name is given.
.sp
Pattern matching is supported for \fIname\fP. See
\%\fBhg help revisions.patterns\fP\:.
.TP
.B \fBuser(string)\fP
.sp
User name contains string. The match is case\-insensitive.
.sp
Pattern matching is supported for \fIstring\fP. See
\%\fBhg help revisions.patterns\fP\:.
.UNINDENT
.SS Aliases
.sp
New predicates (known as "aliases") can be defined, using any combination of
existing predicates or other aliases. An alias definition looks like:
.sp
.nf
.ft C
<alias> = <definition>
.ft P
.fi
.sp
in the \fBrevsetalias\fP section of a Mercurial configuration file. Arguments
of the form \fIa1\fP, \fIa2\fP, etc. are substituted from the alias into the
definition.
.sp
For example,
.sp
.nf
.ft C
[revsetalias]
h = heads()
d(s) = sort(s, date)
rs(s, k) = reverse(sort(s, k))
.ft P
.fi
.sp
defines three aliases, \fBh\fP, \fBd\fP, and \fBrs\fP. \fBrs(0:tip, author)\fP is
exactly equivalent to \fBreverse(sort(0:tip, author))\fP.
.SS Equivalents
.sp
Command line equivalents for \%\fBhg log\fP\::
.sp
.nf
.ft C
\-f    \->  ::.
\-d x  \->  date(x)
\-k x  \->  keyword(x)
\-m    \->  merge()
\-u x  \->  user(x)
\-b x  \->  branch(x)
\-P x  \->  !::x
\-l x  \->  limit(expr, x)
.ft P
.fi
.SS Examples
.sp
Some sample queries:
.INDENT 0.0
.IP \(bu 2
.
Changesets on the default branch:
.sp
.nf
.ft C
hg log \-r "branch(default)"
.ft P
.fi
.IP \(bu 2
.
Changesets on the default branch since tag 1.5 (excluding merges):
.sp
.nf
.ft C
hg log \-r "branch(default) and 1.5:: and not merge()"
.ft P
.fi
.IP \(bu 2
.
Open branch heads:
.sp
.nf
.ft C
hg log \-r "head() and not closed()"
.ft P
.fi
.IP \(bu 2
.
Changesets between tags 1.3 and 1.5 mentioning "bug" that affect
\fBhgext/*\fP:
.sp
.nf
.ft C
hg log \-r "1.3::1.5 and keyword(bug) and file(\(aqhgext/*\(aq)"
.ft P
.fi
.IP \(bu 2
.
Changesets committed in May 2008, sorted by user:
.sp
.nf
.ft C
hg log \-r "sort(date(\(aqMay 2008\(aq), user)"
.ft P
.fi
.IP \(bu 2
.
Changesets mentioning "bug" or "issue" that are not in a tagged
release:
.sp
.nf
.ft C
hg log \-r "(keyword(bug) or keyword(issue)) and not ancestors(tag())"
.ft P
.fi
.IP \(bu 2
.
Update to the commit that bookmark @ is pointing to, without activating the
bookmark (this works because the last revision of the revset is used):
.sp
.nf
.ft C
hg update :@
.ft P
.fi
.IP \(bu 2
.
Show diff between tags 1.3 and 1.5 (this works because the first and the
last revisions of the revset are used):
.sp
.nf
.ft C
hg diff \-r 1.3::1.5
.ft P
.fi
.UNINDENT
.SH RUST IN MERCURIAL
.sp
Mercurial can be augmented with Rust extensions for speeding up certain
operations.
.SS Compatibility
.sp
Though the Rust extensions are only tested by the project under Linux, users of
MacOS, FreeBSD and other UNIX\-likes have been using the Rust extensions. Your
mileage may vary, but by all means do give us feedback or signal your interest
for better support.
.sp
No Rust extensions are available for Windows at this time.
.SS Features
.sp
The following operations are sped up when using Rust:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
.
discovery of differences between repositories (pull/push)
.IP \(bu 2
.
nodemap (see \%\fBhg help config.format.use\-persistent\-nodemap\fP\:)
.IP \(bu 2
.
all commands using the dirstate (status, commit, diff, add, update, etc.)
.IP \(bu 2
.
dirstate\-v2 (see \%\fBhg help config.format.use\-dirstate\-v2\fP\:)
.IP \(bu 2
.
iteration over ancestors in a graph
.UNINDENT
.UNINDENT
.UNINDENT
.sp
More features are in the works, and improvements on the above listed are still
in progress. For more experimental work see the "rhg" section.
.SS Checking for Rust
.sp
You may already have the Rust extensions depending on how you install
Mercurial:
.sp
.nf
.ft C
$ hg debuginstall | grep \-i rust
checking Rust extensions (installed)
checking module policy (rust+c\-allow)
.ft P
.fi
.sp
If those lines don\(aqt even exist, you\(aqre using an old version of \fIhg\fP which does
not have any Rust extensions yet.
.SS Installing
.sp
You will need \fIcargo\fP to be in your \fI$PATH\fP. See the "MSRV" section for which
version to use.
.SS Using pip
.sp
Users of \fIpip\fP can install the Rust extensions with the following command:
.sp
.nf
.ft C
$ pip install mercurial \-\-global\-option \-\-rust \-\-no\-use\-pep517
.ft P
.fi
.sp
\fI\-\-no\-use\-pep517\fP is here to tell \fIpip\fP to preserve backwards compatibility with
the legacy \fIsetup.py\fP system. Mercurial has not yet migrated its complex setup
to the new system, so we still need this to add compiled extensions.
.sp
This might take a couple of minutes because you\(aqre compiling everything.
.sp
See the "Checking for Rust" section to see if the install succeeded.
.SS From your distribution
.sp
Some distributions are shipping Mercurial with Rust extensions enabled and
pre\-compiled (meaning you won\(aqt have to install \fIcargo\fP), or allow you to
specify an install flag. Check with your specific distribution for how to do
that, or ask their team to add support for hg+Rust!
.SS From source
.sp
Please refer to the \fIrust/README.rst\fP file in the Mercurial repository for
instructions on how to install from source.
.SS MSRV
.sp
The minimum supported Rust version is currently 1.48.0. The project\(aqs policy is
to follow the version from Debian stable, to make the distributions\(aq job easier.
.SS rhg
.sp
There exists an experimental pure\-Rust version of Mercurial called \fIrhg\fP with a
fallback mechanism for unsupported invocations. It allows for much faster
execution of certain commands while adding no discernable overhead for the rest.
.sp
The only way of trying it out is by building it from source. Please refer to
\fIrust/README.rst\fP in the Mercurial repository.
.sp
See \fIhg help config.rhg\fP for configuration options.
.SS Contributing
.sp
If you would like to help the Rust endeavor, please refer to \fIrust/README.rst\fP
in the Mercurial repository.
.SH USING MERCURIAL FROM SCRIPTS AND AUTOMATION
.sp
It is common for machines (as opposed to humans) to consume Mercurial.
This help topic describes some of the considerations for interfacing
machines with Mercurial.
.SS Choosing an Interface
.sp
Machines have a choice of several methods to interface with Mercurial.
These include:
.INDENT 0.0
.IP \(bu 2
.
Executing the \fBhg\fP process
.IP \(bu 2
.
Querying a HTTP server
.IP \(bu 2
.
Calling out to a command server
.UNINDENT
.sp
Executing \fBhg\fP processes is very similar to how humans interact with
Mercurial in the shell. It should already be familiar to you.
.sp
\%\fBhg serve\fP\: can be used to start a server. By default, this will start
a "hgweb" HTTP server. This HTTP server has support for machine\-readable
output, such as JSON. For more, see \%\fBhg help hgweb\fP\:.
.sp
\%\fBhg serve\fP\: can also start a "command server." Clients can connect
to this server and issue Mercurial commands over a special protocol.
For more details on the command server, including links to client
libraries, see \%https://www.mercurial\-scm.org/wiki/CommandServer\:.
.sp
\%\fBhg serve\fP\: based interfaces (the hgweb and command servers) have the
advantage over simple \fBhg\fP process invocations in that they are
likely more efficient. This is because there is significant overhead
to spawn new Python processes.
.IP Tip
.
If you need to invoke several \fBhg\fP processes in short order and/or
performance is important to you, use of a server\-based interface
is highly recommended.
.RE
.SS Environment Variables
.sp
As documented in \%\fBhg help environment\fP\:, various environment variables
influence the operation of Mercurial. The following are particularly
relevant for machines consuming Mercurial:
.INDENT 0.0
.TP
.B HGPLAIN
.
If not set, Mercurial\(aqs output could be influenced by configuration
settings that impact its encoding, verbose mode, localization, etc.
.sp
It is highly recommended for machines to set this variable when
invoking \fBhg\fP processes.
.TP
.B HGENCODING
.
If not set, the locale used by Mercurial will be detected from the
environment. If the determined locale does not support display of
certain characters, Mercurial may render these character sequences
incorrectly (often by using "?" as a placeholder for invalid
characters in the current locale).
.sp
Explicitly setting this environment variable is a good practice to
guarantee consistent results. "utf\-8" is a good choice on UNIX\-like
environments.
.TP
.B HGRCPATH
.
If not set, Mercurial will inherit config options from config files
using the process described in \%\fBhg help config\fP\:. This includes
inheriting user or system\-wide config files.
.sp
When utmost control over the Mercurial configuration is desired, the
value of \fBHGRCPATH\fP can be set to an explicit file with known good
configs. In rare cases, the value can be set to an empty file or the
null device (often \fB/dev/null\fP) to bypass loading of any user or
system config files. Note that these approaches can have unintended
consequences, as the user and system config files often define things
like the username and extensions that may be required to interface
with a repository.
.TP
.B HGRCSKIPREPO
.
When set, the .hg/hgrc from repositories are not read.
.sp
Note that not reading the repository\(aqs configuration can have
unintended consequences, as the repository config files can define
things like extensions that are required for access to the
repository.
.UNINDENT
.SS Command\-line Flags
.sp
Mercurial\(aqs default command\-line parser is designed for humans, and is not
robust against malicious input. For instance, you can start a debugger by
passing \fB\-\-debugger\fP as an option value:
.sp
.nf
.ft C
$ REV=\-\-debugger sh \-c \(aqhg log \-r "$REV"\(aq
.ft P
.fi
.sp
This happens because several command\-line flags need to be scanned without
using a concrete command table, which may be modified while loading repository
settings and extensions.
.sp
Since Mercurial 4.4.2, the parsing of such flags may be restricted by setting
\fBHGPLAIN=+strictflags\fP. When this feature is enabled, all early options
(e.g. \fB\-R/\-\-repository\fP, \fB\-\-cwd\fP, \fB\-\-config\fP) must be specified first
amongst the other global options, and cannot be injected to an arbitrary
location:
.sp
.nf
.ft C
$ HGPLAIN=+strictflags hg \-R "$REPO" log \-r "$REV"
.ft P
.fi
.sp
In earlier Mercurial versions where \fB+strictflags\fP isn\(aqt available, you
can mitigate the issue by concatenating an option value with its flag:
.sp
.nf
.ft C
$ hg log \-r"$REV" \-\-keyword="$KEYWORD"
.ft P
.fi
.SS Consuming Command Output
.sp
It is common for machines to need to parse the output of Mercurial
commands for relevant data. This section describes the various
techniques for doing so.
.SS Parsing Raw Command Output
.sp
Likely the simplest and most effective solution for consuming command
output is to simply invoke \fBhg\fP commands as you would as a user and
parse their output.
.sp
The output of many commands can easily be parsed with tools like
\fBgrep\fP, \fBsed\fP, and \fBawk\fP.
.sp
A potential downside with parsing command output is that the output
of commands can change when Mercurial is upgraded. While Mercurial
does generally strive for strong backwards compatibility, command
output does occasionally change. Having tests for your automated
interactions with \fBhg\fP commands is generally recommended, but is
even more important when raw command output parsing is involved.
.SS Using Templates to Control Output
.sp
Many \fBhg\fP commands support templatized output via the
\fB\-T/\-\-template\fP argument. For more, see \%\fBhg help templates\fP\:.
.sp
Templates are useful for explicitly controlling output so that
you get exactly the data you want formatted how you want it. For
example, \fBlog \-T {node}\en\fP can be used to print a newline
delimited list of changeset nodes instead of a human\-tailored
output containing authors, dates, descriptions, etc.
.IP Tip
.
If parsing raw command output is too complicated, consider
using templates to make your life easier.
.RE
.sp
The \fB\-T/\-\-template\fP argument allows specifying pre\-defined styles.
Mercurial ships with the machine\-readable styles \fBcbor\fP, \fBjson\fP,
and \fBxml\fP, which provide CBOR, JSON, and XML output, respectively.
These are useful for producing output that is machine readable as\-is.
.sp
(Mercurial 5.0 is required for CBOR style.)
.IP Important
.
The \fBjson\fP and \fBxml\fP styles are considered experimental. While
they may be attractive to use for easily obtaining machine\-readable
output, their behavior may change in subsequent versions.
.sp
These styles may also exhibit unexpected results when dealing with
certain encodings. Mercurial treats things like filenames as a
series of bytes and normalizing certain byte sequences to JSON
or XML with certain encoding settings can lead to surprises.
.RE
.SS Command Server Output
.sp
If using the command server to interact with Mercurial, you are likely
using an existing library/API that abstracts implementation details of
the command server. If so, this interface layer may perform parsing for
you, saving you the work of implementing it yourself.
.SS Output Verbosity
.sp
Commands often have varying output verbosity, even when machine
readable styles are being used (e.g. \fB\-T json\fP). Adding
\fB\-v/\-\-verbose\fP and \fB\-\-debug\fP to the command\(aqs arguments can
increase the amount of data exposed by Mercurial.
.sp
An alternate way to get the data you need is by explicitly specifying
a template.
.SS Other Topics
.INDENT 0.0
.TP
.B revsets
.
Revisions sets is a functional query language for selecting a set
of revisions. Think of it as SQL for Mercurial repositories. Revsets
are useful for querying repositories for specific data.
.sp
See \%\fBhg help revsets\fP\: for more.
.TP
.B share extension
.
The \fBshare\fP extension provides functionality for sharing
repository data across several working copies. It can even
automatically "pool" storage for logically related repositories when
cloning.
.sp
Configuring the \fBshare\fP extension can lead to significant resource
utilization reduction, particularly around disk space and the
network. This is especially true for continuous integration (CI)
environments.
.sp
See \%\fBhg help \-e share\fP\: for more.
.UNINDENT
.SH SUBREPOSITORIES
.sp
Subrepositories let you nest external repositories or projects into a
parent Mercurial repository, and make commands operate on them as a
group.
.sp
Mercurial currently supports Mercurial, Git, and Subversion
subrepositories.
.sp
Subrepositories are made of three components:
.INDENT 0.0
.IP 1. 3
.
Nested repository checkouts. They can appear anywhere in the
parent working directory.
.IP 2. 3
.
Nested repository references. They are defined in \fB.hgsub\fP, which
should be placed in the root of working directory, and
tell where the subrepository checkouts come from. Mercurial
subrepositories are referenced like:
.sp
.nf
.ft C
path/to/nested = https://example.com/nested/repo/path
.ft P
.fi
.sp
Git and Subversion subrepos are also supported:
.sp
.nf
.ft C
path/to/nested = [git]git://example.com/nested/repo/path
path/to/nested = [svn]https://example.com/nested/trunk/path
.ft P
.fi
.sp
where \fBpath/to/nested\fP is the checkout location relatively to the
parent Mercurial root, and \fBhttps://example.com/nested/repo/path\fP
is the source repository path. The source can also reference a
filesystem path.
.sp
Note that \fB.hgsub\fP does not exist by default in Mercurial
repositories, you have to create and add it to the parent
repository before using subrepositories.
.IP 3. 3
.
Nested repository states. They are defined in \fB.hgsubstate\fP, which
is placed in the root of working directory, and
capture whatever information is required to restore the
subrepositories to the state they were committed in a parent
repository changeset. Mercurial automatically record the nested
repositories states when committing in the parent repository.
.IP Note
.
The \fB.hgsubstate\fP file should not be edited manually.
.RE
.UNINDENT
.SS Adding a Subrepository
.sp
If \fB.hgsub\fP does not exist, create it and add it to the parent
repository. Clone or checkout the external projects where you want it
to live in the parent repository. Edit \fB.hgsub\fP and add the
subrepository entry as described above. At this point, the
subrepository is tracked and the next commit will record its state in
\fB.hgsubstate\fP and bind it to the committed changeset.
.SS Synchronizing a Subrepository
.sp
Subrepos do not automatically track the latest changeset of their
sources. Instead, they are updated to the changeset that corresponds
with the changeset checked out in the top\-level changeset. This is so
developers always get a consistent set of compatible code and
libraries when they update.
.sp
Thus, updating subrepos is a manual process. Simply check out target
subrepo at the desired revision, test in the top\-level repo, then
commit in the parent repository to record the new combination.
.SS Deleting a Subrepository
.sp
To remove a subrepository from the parent repository, delete its
reference from \fB.hgsub\fP, then remove its files.
.SS Interaction with Mercurial Commands
.INDENT 0.0
.TP
.B add
.
add does not recurse in subrepos unless \-S/\-\-subrepos is
specified.  However, if you specify the full path of a file in a
subrepo, it will be added even without \-S/\-\-subrepos specified.
Subversion subrepositories are currently silently
ignored.
.TP
.B addremove
.
addremove does not recurse into subrepos unless
\-S/\-\-subrepos is specified.  However, if you specify the full
path of a directory in a subrepo, addremove will be performed on
it even without \-S/\-\-subrepos being specified.  Git and
Subversion subrepositories will print a warning and continue.
.TP
.B archive
.
archive does not recurse in subrepositories unless
\-S/\-\-subrepos is specified.
.TP
.B cat
.
Git subrepositories only support exact file matches.
Subversion subrepositories are currently ignored.
.TP
.B commit
.
commit creates a consistent snapshot of the state of the
entire project and its subrepositories. If any subrepositories
have been modified, Mercurial will abort.  Mercurial can be made
to instead commit all modified subrepositories by specifying
\-S/\-\-subrepos, or setting "ui.commitsubrepos=True" in a
configuration file (see \%\fBhg help config\fP\:).  After there are no
longer any modified subrepositories, it records their state and
finally commits it in the parent repository.  The \-\-addremove
option also honors the \-S/\-\-subrepos option.  However, Git and
Subversion subrepositories will print a warning and abort.
.TP
.B diff
.
diff does not recurse in subrepos unless \-S/\-\-subrepos is
specified.  However, if you specify the full path of a file or
directory in a subrepo, it will be diffed even without
\-S/\-\-subrepos being specified.  Subversion subrepositories are
currently silently ignored.
.TP
.B files
.
files does not recurse into subrepos unless \-S/\-\-subrepos is
specified.  However, if you specify the full path of a file or
directory in a subrepo, it will be displayed even without
\-S/\-\-subrepos being specified.  Git and Subversion subrepositories
are currently silently ignored.
.TP
.B forget
.
forget currently only handles exact file matches in subrepos.
Git and Subversion subrepositories are currently silently ignored.
.TP
.B incoming
.
incoming does not recurse in subrepos unless \-S/\-\-subrepos
is specified. Git and Subversion subrepositories are currently
silently ignored.
.TP
.B outgoing
.
outgoing does not recurse in subrepos unless \-S/\-\-subrepos
is specified. Git and Subversion subrepositories are currently
silently ignored.
.TP
.B pull
.
pull is not recursive since it is not clear what to pull prior
to running \%\fBhg update\fP\:. Listing and retrieving all
subrepositories changes referenced by the parent repository pulled
changesets is expensive at best, impossible in the Subversion
case.
.TP
.B push
.
Mercurial will automatically push all subrepositories first
when the parent repository is being pushed. This ensures new
subrepository changes are available when referenced by top\-level
repositories.  Push is a no\-op for Subversion subrepositories.
.TP
.B serve
.
serve does not recurse into subrepositories unless
\-S/\-\-subrepos is specified.  Git and Subversion subrepositories
are currently silently ignored.
.TP
.B status
.
status does not recurse into subrepositories unless
\-S/\-\-subrepos is specified. Subrepository changes are displayed as
regular Mercurial changes on the subrepository
elements. Subversion subrepositories are currently silently
ignored.
.TP
.B remove
.
remove does not recurse into subrepositories unless
\-S/\-\-subrepos is specified.  However, if you specify a file or
directory path in a subrepo, it will be removed even without
\-S/\-\-subrepos.  Git and Subversion subrepositories are currently
silently ignored.
.TP
.B update
.
update restores the subrepos in the state they were
originally committed in target changeset. If the recorded
changeset is not available in the current subrepository, Mercurial
will pull it in first before updating.  This means that updating
can require network access when using subrepositories.
.UNINDENT
.SS Remapping Subrepositories Sources
.sp
A subrepository source location may change during a project life,
invalidating references stored in the parent repository history. To
fix this, rewriting rules can be defined in parent repository \fBhgrc\fP
file or in Mercurial configuration. See the \fB[subpaths]\fP section in
hgrc(5) for more details.
.SH TEMPLATE USAGE
.sp
Mercurial allows you to customize output of commands through
templates. You can either pass in a template or select an existing
template\-style from the command line, via the \-\-template option.
.sp
You can customize output for any "log\-like" command: log,
outgoing, incoming, tip, parents, and heads.
.sp
Some built\-in styles are packaged with Mercurial. These can be listed
with \%\fBhg log \-\-template list\fP\:. Example usage:
.sp
.nf
.ft C
$ hg log \-r1.0::1.1 \-\-template changelog
.ft P
.fi
.sp
A template is a piece of text, with markup to invoke variable
expansion:
.sp
.nf
.ft C
$ hg log \-r1 \-\-template "{node}\en"
b56ce7b07c52de7d5fd79fb89701ea538af65746
.ft P
.fi
.SS Keywords
.sp
Strings in curly braces are called keywords. The availability of
keywords depends on the exact context of the templater. These
keywords are usually available for templating a log\-like command:
.INDENT 0.0
.TP
.B _fast_rank
.
the rank of a changeset if cached
.sp
The rank of a revision is the size of the sub\-graph it defines as a head.
Equivalently, the rank of a revision \fIr\fP is the size of the set
\fIancestors(r)\fP, \fIr\fP included.
.TP
.B activebookmark
.
String. The active bookmark, if it is associated with the changeset.
.TP
.B author
.
Alias for \fB{user}\fP
.TP
.B bisect
.
String. The changeset bisection status.
.TP
.B bookmarks
.
List of strings. Any bookmarks associated with the
changeset. Also sets \(aqactive\(aq, the name of the active bookmark.
.TP
.B branch
.
String. The name of the branch on which the changeset was
committed.
.TP
.B changessincelatesttag
.
Integer. All ancestors not in the latest tag.
.TP
.B children
.
List of strings. The children of the changeset.
.TP
.B date
.
Date information. The date when the changeset was committed.
.TP
.B desc
.
String. The text of the changeset description.
.TP
.B diffstat
.
String. Statistics of changes with the following format:
"modified files: +added/\-removed lines"
.TP
.B extras
.
List of dicts with key, value entries of the \(aqextras\(aq
field of this changeset.
.TP
.B file_adds
.
List of strings. Files added by this changeset.
.TP
.B file_copies
.
List of strings. Files copied in this changeset with
their sources.
.TP
.B file_copies_switch
.
List of strings. Like "file_copies" but displayed
only if the \-\-copied switch is set.
.TP
.B file_dels
.
List of strings. Files removed by this changeset.
.TP
.B file_mods
.
List of strings. Files modified by this changeset.
.TP
.B files
.
List of strings. All files modified, added, or removed by this
changeset.
.TP
.B graphnode
.
String. The character representing the changeset node in an ASCII
revision graph.
.TP
.B graphwidth
.
Integer. The width of the graph drawn by \(aqlog \-\-graph\(aq or zero.
.TP
.B index
.
Integer. The current iteration of the loop. (0 indexed)
.TP
.B latesttag
.
List of strings. The global tags on the most recent globally
tagged ancestor of this changeset.  If no such tags exist, the list
consists of the single string "null".
.TP
.B latesttagdistance
.
Integer. Longest path to the latest tag.
.TP
.B namespaces
.
Dict of lists. Names attached to this changeset per
namespace.
.TP
.B negrev
.
Integer. The repository\-local changeset negative revision number,
which counts in the opposite direction.
.TP
.B node
.
String. The changeset identification hash, as a 40 hexadecimal
digit string.
.TP
.B onelinesummary
.
String. A one\-line summary for the ctx (not including trailing newline).
The default template be overridden in command\-templates.oneline\-summary.
.TP
.B p1
.
Changeset. The changeset\(aqs first parent. \fB{p1.rev}\fP for the revision
number, and \fB{p1.node}\fP for the identification hash.
.TP
.B p2
.
Changeset. The changeset\(aqs second parent. \fB{p2.rev}\fP for the revision
number, and \fB{p2.node}\fP for the identification hash.
.TP
.B parents
.
List of strings. The parents of the changeset in "rev:node"
format. If the changeset has only one "natural" parent (the predecessor
revision) nothing is shown.
.TP
.B peerurls
.
A dictionary of repository locations defined in the [paths] section
of your configuration file.
.TP
.B phase
.
String. The changeset phase name.
.TP
.B reporoot
.
String. The root directory of the current repository.
.TP
.B rev
.
Integer. The repository\-local changeset revision number.
.TP
.B subrepos
.
List of strings. Updated subrepositories in the changeset.
.TP
.B tags
.
List of strings. Any tags associated with the changeset.
.TP
.B termwidth
.
Integer. The width of the current terminal.
.TP
.B user
.
String. The unmodified author of the changeset.
.TP
.B verbosity
.
String. The current output verbosity in \(aqdebug\(aq, \(aqquiet\(aq, \(aqverbose\(aq,
or \(aq\(aq.
.UNINDENT
.sp
The "date" keyword does not produce human\-readable output. If you
want to use a date in your output, you can use a filter to process
it. Filters are functions which return a string based on the input
variable. Be sure to use the stringify filter first when you\(aqre
applying a string\-input filter to a list\-like input variable.
You can also use a chain of filters to get the desired output:
.sp
.nf
.ft C
$ hg tip \-\-template "{date|isodate}\en"
2008\-08\-21 18:22 +0000
.ft P
.fi
.SS Filters
.sp
List of filters:
.INDENT 0.0
.TP
.B addbreaks
.
Any text. Add an XHTML "<br />" tag before the end of
every line except the last.
.TP
.B age
.
Date. Returns a human\-readable date/time difference between the
given date/time and the current date/time.
.TP
.B basename
.
Any text. Treats the text as a path, and returns the last
component of the path after splitting by the path separator.
For example, "foo/bar/baz" becomes "baz" and "foo/bar//" becomes "".
.TP
.B cbor
.
Any object. Serializes the object to CBOR bytes.
.TP
.B commondir
.
List of text. Treats each list item as file name with /
as path separator and returns the longest common directory
prefix shared by all list items.
Returns the empty string if no common prefix exists.
.sp
The list items are not normalized, i.e. "foo/../bar" is handled as
file "bar" in the directory "foo/..". Leading slashes are ignored.
.sp
For example, ["foo/bar/baz", "foo/baz/bar"] becomes "foo" and
["foo/bar", "baz"] becomes "".
.TP
.B count
.
List or text. Returns the length as an integer.
.TP
.B dirname
.
Any text. Treats the text as a path, and strips the last
component of the path after splitting by the path separator.
.TP
.B domain
.
Any text. Finds the first string that looks like an email
address, and extracts just the domain component. Example: \fBUser
<user@example.com>\fP becomes \fBexample.com\fP.
.TP
.B email
.
Any text. Extracts the first string that looks like an email
address. Example: \fBUser <user@example.com>\fP becomes
\fBuser@example.com\fP.
.TP
.B emailuser
.
Any text. Returns the user portion of an email address.
.TP
.B escape
.
Any text. Replaces the special XML/XHTML characters "&", "<"
and ">" with XML entities, and filters out NUL characters.
.TP
.B fill68
.
Any text. Wraps the text to fit in 68 columns.
.TP
.B fill76
.
Any text. Wraps the text to fit in 76 columns.
.TP
.B firstline
.
Any text. Returns the first line of text.
.TP
.B hex
.
Any text. Convert a binary Mercurial node identifier into
its long hexadecimal representation.
.TP
.B hgdate
.
Date. Returns the date as a pair of numbers: "1157407993
25200" (Unix timestamp, timezone offset).
.TP
.B isodate
.
Date. Returns the date in ISO 8601 format: "2009\-08\-18 13:00
+0200".
.TP
.B isodatesec
.
Date. Returns the date in ISO 8601 format, including
seconds: "2009\-08\-18 13:00:13 +0200". See also the rfc3339date
filter.
.TP
.B json
.
Any object. Serializes the object to a JSON formatted text.
.TP
.B lower
.
Any text. Converts the text to lowercase.
.TP
.B nonempty
.
Any text. Returns \(aq(none)\(aq if the string is empty.
.TP
.B obfuscate
.
Any text. Returns the input text rendered as a sequence of
XML entities.
.TP
.B person
.
Any text. Returns the name before an email address,
interpreting it as per RFC 5322.
.TP
.B reverse
.
List. Reverses the order of list items.
.TP
.B revescape
.
Any text. Escapes all "special" characters, except @.
Forward slashes are escaped twice to prevent web servers from prematurely
unescaping them. For example, "@foo bar/baz" becomes "@foo%20bar%252Fbaz".
.TP
.B rfc3339date
.
Date. Returns a date using the Internet date format
specified in RFC 3339: "2009\-08\-18T13:00:13+02:00".
.TP
.B rfc822date
.
Date. Returns a date using the same format used in email
headers: "Tue, 18 Aug 2009 13:00:13 +0200".
.TP
.B short
.
Changeset hash. Returns the short form of a changeset hash,
i.e. a 12 hexadecimal digit string.
.TP
.B shortbisect
.
Any text. Treats \fIlabel\fP as a bisection status, and
returns a single\-character representing the status (G: good, B: bad,
S: skipped, U: untested, I: ignored). Returns single space if \fItext\fP
is not a valid bisection status.
.TP
.B shortdate
.
Date. Returns a date like "2006\-09\-18".
.TP
.B slashpath
.
Any text. Replaces the native path separator with slash.
.TP
.B splitlines
.
Any text. Split text into a list of lines.
.TP
.B stringify
.
Any type. Turns the value into text by converting values into
text and concatenating them.
.TP
.B stripdir
.
Treat the text as path and strip a directory level, if
possible. For example, "foo" and "foo/bar" becomes "foo".
.TP
.B tabindent
.
Any text. Returns the text, with every non\-empty line
except the first starting with a tab character.
.TP
.B upper
.
Any text. Converts the text to uppercase.
.TP
.B urlescape
.
Any text. Escapes all "special" characters. For example,
"foo bar" becomes "foo%20bar".
.TP
.B user
.
Any text. Returns a short representation of a user name or email
address.
.TP
.B utf8
.
Any text. Converts from the local character encoding to UTF\-8.
.UNINDENT
.sp
Note that a filter is nothing more than a function call, i.e.
\fBexpr|filter\fP is equivalent to \fBfilter(expr)\fP.
.SS Functions
.sp
In addition to filters, there are some basic built\-in functions:
.INDENT 0.0
.TP
.B config(section, name[, default])
.
Returns the requested hgrc config option as a string.
.TP
.B configbool(section, name[, default])
.
Returns the requested hgrc config option as a boolean.
.TP
.B configint(section, name[, default])
.
Returns the requested hgrc config option as an integer.
.TP
.B date(date[, fmt])
.
Format a date. See \%\fBhg help dates\fP\: for formatting
strings. The default is a Unix date format, including the timezone:
"Mon Sep 04 15:13:13 2006 0700".
.TP
.B dict([[key=]value...])
.
Construct a dict from key\-value pairs. A key may be omitted if
a value expression can provide an unambiguous name.
.TP
.B diff([includepattern [, excludepattern]])
.
Show a diff, optionally
specifying files to include or exclude.
.TP
.B files(pattern)
.
All files of the current changeset matching the pattern. See
\%\fBhg help patterns\fP\:.
.TP
.B fill(text[, width[, initialident[, hangindent]]])
.
Fill many
paragraphs with optional indentation. See the "fill" filter.
.TP
.B filter(iterable[, expr])
.
Remove empty elements from a list or a dict. If expr specified, it\(aqs
applied to each element to test emptiness.
.TP
.B get(dict, key)
.
Get an attribute/key from an object. Some keywords
are complex types. This function allows you to obtain the value of an
attribute on these types.
.TP
.B if(expr, then[, else])
.
Conditionally execute based on the result of
an expression.
.TP
.B ifcontains(needle, haystack, then[, else])
.
Conditionally execute based
on whether the item "needle" is in "haystack".
.TP
.B ifeq(expr1, expr2, then[, else])
.
Conditionally execute based on
whether 2 items are equivalent.
.TP
.B indent(text, indentchars[, firstline])
.
Indents all non\-empty lines
with the characters given in the indentchars string. An optional
third parameter will override the indent for the first line only
if present.
.TP
.B join(list, sep)
.
Join items in a list with a delimiter.
.TP
.B label(label, expr)
.
Apply a label to generated content. Content with
a label applied can result in additional post\-processing, such as
automatic colorization.
.TP
.B latesttag([pattern])
.
The global tags matching the given pattern on the
most recent globally tagged ancestor of this changeset.
If no such tags exist, the "{tag}" template resolves to
the string "null". See \%\fBhg help revisions.patterns\fP\: for the pattern
syntax.
.TP
.B localdate(date[, tz])
.
Converts a date to the specified timezone.
The default is local date.
.TP
.B mailmap(author)
.
Return the author, updated according to the value
set in the .mailmap file
.TP
.B max(iterable)
.
Return the max of an iterable
.TP
.B min(iterable)
.
Return the min of an iterable
.TP
.B mod(a, b)
.
Calculate a mod b such that a / b + a mod b == a
.TP
.B pad(text, width[, fillchar=\(aq \(aq[, left=False[, truncate=False]]])
.
Pad text with a
fill character.
.TP
.B relpath(path)
.
Convert a repository\-absolute path into a filesystem path relative to
the current working directory.
.TP
.B revset(query[, formatargs...])
.
Execute a revision set query. See
\%\fBhg help revset\fP\:.
.TP
.B rstdoc(text, style)
.
Format reStructuredText.
.TP
.B search(pattern, text)
.
Look for the first text matching the regular expression pattern.
Groups are accessible as \fB{1}\fP, \fB{2}\fP, ... in %\-mapped template.
.TP
.B separate(sep, args...)
.
Add a separator between non\-empty arguments.
.TP
.B shortest(node, minlength=4)
.
Obtain the shortest representation of
a node.
.TP
.B startswith(pattern, text)
.
Returns the value from the "text" argument
if it begins with the content from the "pattern" argument.
.TP
.B strip(text[, chars])
.
Strip characters from a string. By default,
strips all leading and trailing whitespace.
.TP
.B sub(pattern, replacement, expression)
.
Perform text substitution
using regular expressions.
.TP
.B subsetparents(rev, revset)
.
Look up parents of the rev in the sub graph given by the revset.
.TP
.B word(number, text[, separator])
.
Return the nth word from a string.
.UNINDENT
.SS Operators
.sp
We provide a limited set of infix arithmetic operations on integers:
.sp
.nf
.ft C
+ for addition
\- for subtraction
* for multiplication
/ for floor division (division rounded to integer nearest \-infinity)
.ft P
.fi
.sp
Division fulfills the law x = x / y + mod(x, y).
.sp
Also, for any expression that returns a list, there is a list operator:
.sp
.nf
.ft C
expr % "{template}"
.ft P
.fi
.sp
As seen in the above example, \fB{template}\fP is interpreted as a template.
To prevent it from being interpreted, you can use an escape character \fB\e{\fP
or a raw string prefix, \fBr\(aq...\(aq\fP.
.sp
The dot operator can be used as a shorthand for accessing a sub item:
.INDENT 0.0
.IP \(bu 2
.
\fBexpr.member\fP is roughly equivalent to \fBexpr % \(aq{member}\(aq\fP if \fBexpr\fP
returns a non\-list/dict. The returned value is not stringified.
.IP \(bu 2
.
\fBdict.key\fP is identical to \fBget(dict, \(aqkey\(aq)\fP.
.UNINDENT
.SS Aliases
.sp
New keywords and functions can be defined in the \fBtemplatealias\fP section of
a Mercurial configuration file:
.sp
.nf
.ft C
<alias> = <definition>
.ft P
.fi
.sp
Arguments of the form \fIa1\fP, \fIa2\fP, etc. are substituted from the alias into
the definition.
.sp
For example,
.sp
.nf
.ft C
[templatealias]
r = rev
rn = "{r}:{node|short}"
leftpad(s, w) = pad(s, w, \(aq \(aq, True)
.ft P
.fi
.sp
defines two symbol aliases, \fBr\fP and \fBrn\fP, and a function alias
\fBleftpad()\fP.
.sp
It\(aqs also possible to specify complete template strings, using the
\fBtemplates\fP section. The syntax used is the general template string syntax.
.sp
For example,
.sp
.nf
.ft C
[templates]
nodedate = "{node|short}: {date(date, "%Y\-%m\-%d")}\en"
.ft P
.fi
.sp
defines a template, \fBnodedate\fP, which can be called like:
.sp
.nf
.ft C
$ hg log \-r . \-Tnodedate
.ft P
.fi
.sp
A template defined in \fBtemplates\fP section can also be referenced from
another template:
.sp
.nf
.ft C
$ hg log \-r . \-T "{rev} {nodedate}"
.ft P
.fi
.sp
but be aware that the keywords cannot be overridden by templates. For example,
a template defined as \fBtemplates.rev\fP cannot be referenced as \fB{rev}\fP.
.sp
A template defined in \fBtemplates\fP section may have sub templates which
are inserted before/after/between items:
.sp
.nf
.ft C
[templates]
myjson = \(aq {dict(rev, node|short)|json}\(aq
myjson:docheader = \(aq\e{\en\(aq
myjson:docfooter = \(aq\en}\en\(aq
myjson:separator = \(aq,\en\(aq
.ft P
.fi
.SS Examples
.sp
Some sample command line templates:
.INDENT 0.0
.IP \(bu 2
.
Format lists, e.g. files:
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "files:\en{files % \(aq  {file}\en\(aq}"
.ft P
.fi
.IP \(bu 2
.
Join the list of files with a ", ":
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "files: {join(files, \(aq, \(aq)}\en"
.ft P
.fi
.IP \(bu 2
.
Join the list of files ending with ".py" with a ", ":
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "pythonfiles: {join(files(\(aq**.py\(aq), \(aq, \(aq)}\en"
.ft P
.fi
.IP \(bu 2
.
Separate non\-empty arguments by a " ":
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "{separate(\(aq \(aq, node, bookmarks, tags}\en"
.ft P
.fi
.IP \(bu 2
.
Modify each line of a commit description:
.sp
.nf
.ft C
$ hg log \-\-template "{splitlines(desc) % \(aq**** {line}\en\(aq}"
.ft P
.fi
.IP \(bu 2
.
Format date:
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "{date(date, \(aq%Y\(aq)}\en"
.ft P
.fi
.IP \(bu 2
.
Display date in UTC:
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "{localdate(date, \(aqUTC\(aq)|date}\en"
.ft P
.fi
.IP \(bu 2
.
Output the description set to a fill\-width of 30:
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "{fill(desc, 30)}"
.ft P
.fi
.IP \(bu 2
.
Use a conditional to test for the default branch:
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "{ifeq(branch, \(aqdefault\(aq, \(aqon the main branch\(aq,
\(aqon branch {branch}\(aq)}\en"
.ft P
.fi
.IP \(bu 2
.
Append a newline if not empty:
.sp
.nf
.ft C
$ hg tip \-\-template "{if(author, \(aq{author}\en\(aq)}"
.ft P
.fi
.IP \(bu 2
.
Label the output for use with the color extension:
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "{label(\(aqchangeset.{phase}\(aq, node|short)}\en"
.ft P
.fi
.IP \(bu 2
.
Invert the firstline filter, i.e. everything but the first line:
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "{sub(r\(aq^.*\en?\en?\(aq, \(aq\(aq, desc)}\en"
.ft P
.fi
.IP \(bu 2
.
Display the contents of the \(aqextra\(aq field, one per line:
.sp
.nf
.ft C
$ hg log \-r 0 \-\-template "{join(extras, \(aq\en\(aq)}\en"
.ft P
.fi
.IP \(bu 2
.
Mark the active bookmark with \(aq*\(aq:
.sp
.nf
.ft C
$ hg log \-\-template "{bookmarks % \(aq{bookmark}{ifeq(bookmark, active, \(aq*\(aq)} \(aq}\en"
.ft P
.fi
.IP \(bu 2
.
Find the previous release candidate tag, the distance and changes since the tag:
.sp
.nf
.ft C
$ hg log \-r . \-\-template "{latesttag(\(aqre:^.*\-rc$\(aq) % \(aq{tag}, {changes}, {distance}\(aq}\en"
.ft P
.fi
.IP \(bu 2
.
Mark the working copy parent with \(aq@\(aq:
.sp
.nf
.ft C
$ hg log \-\-template "{ifcontains(rev, revset(\(aq.\(aq), \(aq@\(aq)}\en"
.ft P
.fi
.IP \(bu 2
.
Show details of parent revisions:
.sp
.nf
.ft C
$ hg log \-\-template "{revset(\(aqparents(%d)\(aq, rev) % \(aq{desc|firstline}\en\(aq}"
.ft P
.fi
.IP \(bu 2
.
Show only commit descriptions that start with "template":
.sp
.nf
.ft C
$ hg log \-\-template "{startswith(\(aqtemplate\(aq, firstline(desc))}\en"
.ft P
.fi
.IP \(bu 2
.
Print the first word of each line of a commit message:
.sp
.nf
.ft C
$ hg log \-\-template "{word(0, desc)}\en"
.ft P
.fi
.UNINDENT
.SH URL PATHS
.sp
Valid URLs are of the form:
.sp
.nf
.ft C
local/filesystem/path[#revision]
file://local/filesystem/path[#revision]
http://[user[:pass]@]host[:port]/[path][#revision]
https://[user[:pass]@]host[:port]/[path][#revision]
ssh://[user@]host[:port]/[path][#revision]
path://pathname
.ft P
.fi
.sp
Paths in the local filesystem can either point to Mercurial
repositories or to bundle files (as created by \%\fBhg bundle\fP\: or
\%\fBhg incoming \-\-bundle\fP\:). See also \%\fBhg help paths\fP\:.
.sp
An optional identifier after # indicates a particular branch, tag, or
changeset to use from the remote repository. See also \%\fBhg help
revisions\fP\:.
.sp
Some features, such as pushing to \%http://\: and \%https://\: URLs are only
possible if the feature is explicitly enabled on the remote Mercurial
server.
.sp
Note that the security of HTTPS URLs depends on proper configuration of
web.cacerts.
.sp
Some notes about using SSH with Mercurial:
.INDENT 0.0
.IP \(bu 2
.
SSH requires an accessible shell account on the destination machine
and a copy of hg in the remote path or specified with remotecmd.
.IP \(bu 2
.
path is relative to the remote user\(aqs home directory by default. Use
an extra slash at the start of a path to specify an absolute path:
.sp
.nf
.ft C
ssh://example.com//tmp/repository
.ft P
.fi
.IP \(bu 2
.
Mercurial doesn\(aqt use its own compression via SSH; the right thing
to do is to configure it in your ~/.ssh/config, e.g.:
.sp
.nf
.ft C
Host *.mylocalnetwork.example.com
  Compression no
Host *
  Compression yes
.ft P
.fi
.sp
Alternatively specify "ssh \-C" as your ssh command in your
configuration file or with the \-\-ssh command line option.
.UNINDENT
.sp
These URLs can all be stored in your configuration file with path
aliases under the [paths] section like so:
.sp
.nf
.ft C
[paths]
alias1 = URL1
alias2 = URL2
\&...
.ft P
.fi
.sp
You can then use the alias for any command that uses a URL (for
example \%\fBhg pull alias1\fP\: will be treated as \%\fBhg pull URL1\fP\:).
.sp
Two path aliases are special because they are used as defaults when
you do not provide the URL to a command:
.INDENT 0.0
.TP
.B default:
.
When you create a repository with hg clone, the clone command saves
the location of the source repository as the new repository\(aqs
\(aqdefault\(aq path. This is then used when you omit path from push\- and
pull\-like commands (including incoming and outgoing).
.TP
.B default\-push:
.
The push command will look for a path named \(aqdefault\-push\(aq, and
prefer it over \(aqdefault\(aq if both are defined.
.UNINDENT
.sp
These alias can also be use in the \fIpath://\fP scheme:
.sp
.nf
.ft C
[paths]
alias1 = URL1
alias2 = path://alias1
\&...
.ft P
.fi
.sp
check \%\fBhg help config.paths\fP\: for details about the behavior of such "sub\-path".
.SH EXTENSIONS
.sp
This section contains help for extensions that are distributed together with Mercurial. Help for other extensions is available in the help system.
.SS absorb
.sp
apply working directory changes to changesets (EXPERIMENTAL)
.sp
The absorb extension provides a command to use annotate information to
amend modified chunks into the corresponding non\-public changesets.
.sp
.nf
.ft C
[absorb]
# only check 50 recent non\-public changesets at most
max\-stack\-size = 50
# whether to add noise to new commits to avoid obsolescence cycle
add\-noise = 1
# make \(gaamend \-\-correlated\(ga a shortcut to the main command
amend\-flag = correlated

[color]
absorb.description = yellow
absorb.node = blue bold
absorb.path = bold
.ft P
.fi
.SS Commands
.SS Change creation
.SS absorb
.sp
incorporate corrections into the stack of draft changesets:
.sp
.nf
.ft C
hg absorb [OPTION] [FILE]...
.ft P
.fi
.sp
absorb analyzes each change in your working directory and attempts to
amend the changed lines into the changesets in your stack that first
introduced those lines.
.sp
If absorb cannot find an unambiguous changeset to amend for a change,
that change will be left in the working directory, untouched. They can be
observed by \%\fBhg status\fP\: or \%\fBhg diff\fP\: afterwards. In other words,
absorb does not write to the working directory.
.sp
Changesets outside the revset \fI::. and not public() and not merge()\fP will
not be changed.
.sp
Changesets that become empty after applying the changes will be deleted.
.sp
By default, absorb will show what it plans to do and prompt for
confirmation.  If you are confident that the changes will be absorbed
to the correct place, run \%\fBhg absorb \-a\fP\: to apply the changes
immediately.
.sp
Returns 0 on success, 1 if all chunks were ignored and nothing amended.
.sp
Options:
.INDENT 0.0
.TP
.B \-a,  \-\-apply\-changes
.
apply changes without prompting for confirmation
.TP
.B \-p,  \-\-print\-changes
.
always print which changesets are modified by which changes
.TP
.B \-i,  \-\-interactive
.
interactively select which chunks to apply
.TP
.B \-e,  \-\-edit\-lines
.
edit what lines belong to which changesets before commit (EXPERIMENTAL)
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.TP
.BI \-\-style \ <STYLE>
.
display using template map file (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS acl
.sp
hooks for controlling repository access
.sp
This hook makes it possible to allow or deny write access to given
branches and paths of a repository when receiving incoming changesets
via pretxnchangegroup and pretxncommit.
.sp
The authorization is matched based on the local user name on the
system where the hook runs, and not the committer of the original
changeset (since the latter is merely informative).
.sp
The acl hook is best used along with a restricted shell like hgsh,
preventing authenticating users from doing anything other than pushing
or pulling. The hook is not safe to use if users have interactive
shell access, as they can then disable the hook. Nor is it safe if
remote users share an account, because then there is no way to
distinguish them.
.sp
The order in which access checks are performed is:
.INDENT 0.0
.IP 1. 3
.
Deny  list for branches (section \fBacl.deny.branches\fP)
.IP 2. 3
.
Allow list for branches (section \fBacl.allow.branches\fP)
.IP 3. 3
.
Deny  list for paths    (section \fBacl.deny\fP)
.IP 4. 3
.
Allow list for paths    (section \fBacl.allow\fP)
.UNINDENT
.sp
The allow and deny sections take key\-value pairs.
.SS Branch\-based Access Control
.sp
Use the \fBacl.deny.branches\fP and \fBacl.allow.branches\fP sections to
have branch\-based access control. Keys in these sections can be
either:
.INDENT 0.0
.IP \(bu 2
.
a branch name, or
.IP \(bu 2
.
an asterisk, to match any branch;
.UNINDENT
.sp
The corresponding values can be either:
.INDENT 0.0
.IP \(bu 2
.
a comma\-separated list containing users and groups, or
.IP \(bu 2
.
an asterisk, to match anyone;
.UNINDENT
.sp
You can add the "!" prefix to a user or group name to invert the sense
of the match.
.SS Path\-based Access Control
.sp
Use the \fBacl.deny\fP and \fBacl.allow\fP sections to have path\-based
access control. Keys in these sections accept a subtree pattern (with
a glob syntax by default). The corresponding values follow the same
syntax as the other sections above.
.SS Bookmark\-based Access Control
.sp
Use the \fBacl.deny.bookmarks\fP and \fBacl.allow.bookmarks\fP sections to
have bookmark\-based access control. Keys in these sections can be
either:
.INDENT 0.0
.IP \(bu 2
.
a bookmark name, or
.IP \(bu 2
.
an asterisk, to match any bookmark;
.UNINDENT
.sp
The corresponding values can be either:
.INDENT 0.0
.IP \(bu 2
.
a comma\-separated list containing users and groups, or
.IP \(bu 2
.
an asterisk, to match anyone;
.UNINDENT
.sp
You can add the "!" prefix to a user or group name to invert the sense
of the match.
.sp
Note: for interactions between clients and servers using Mercurial 3.6+
a rejection will generally reject the entire push, for interactions
involving older clients, the commit transactions will already be accepted,
and only the bookmark movement will be rejected.
.SS Groups
.sp
Group names must be prefixed with an \fB@\fP symbol. Specifying a group
name has the same effect as specifying all the users in that group.
.sp
You can define group members in the \fBacl.groups\fP section.
If a group name is not defined there, and Mercurial is running under
a Unix\-like system, the list of users will be taken from the OS.
Otherwise, an exception will be raised.
.SS Example Configuration
.sp
.nf
.ft C
[hooks]

# Use this if you want to check access restrictions at commit time
pretxncommit.acl = python:hgext.acl.hook

# Use this if you want to check access restrictions for pull, push,
# bundle and serve.
pretxnchangegroup.acl = python:hgext.acl.hook

[acl]
# Allow or deny access for incoming changes only if their source is
# listed here, let them pass otherwise. Source is "serve" for all
# remote access (http or ssh), "push", "pull" or "bundle" when the
# related commands are run locally.
# Default: serve
sources = serve

[acl.deny.branches]

# Everyone is denied to the frozen branch:
frozen\-branch = *

# A bad user is denied on all branches:
* = bad\-user

[acl.allow.branches]

# A few users are allowed on branch\-a:
branch\-a = user\-1, user\-2, user\-3

# Only one user is allowed on branch\-b:
branch\-b = user\-1

# The super user is allowed on any branch:
* = super\-user

# Everyone is allowed on branch\-for\-tests:
branch\-for\-tests = *

[acl.deny]
# This list is checked first. If a match is found, acl.allow is not
# checked. All users are granted access if acl.deny is not present.
# Format for both lists: glob pattern = user, ..., @group, ...

# To match everyone, use an asterisk for the user:
# my/glob/pattern = *

# user6 will not have write access to any file:
** = user6

# Group "hg\-denied" will not have write access to any file:
** = @hg\-denied

# Nobody will be able to change "DONT\-TOUCH\-THIS.txt", despite
# everyone being able to change all other files. See below.
src/main/resources/DONT\-TOUCH\-THIS.txt = *

[acl.allow]
# if acl.allow is not present, all users are allowed by default
# empty acl.allow = no users allowed

# User "doc_writer" has write access to any file under the "docs"
# folder:
docs/** = doc_writer

# User "jack" and group "designers" have write access to any file
# under the "images" folder:
images/** = jack, @designers

# Everyone (except for "user6" and "@hg\-denied" \- see acl.deny above)
# will have write access to any file under the "resources" folder
# (except for 1 file. See acl.deny):
src/main/resources/** = *

\&.hgtags = release_engineer
.ft P
.fi
.SS Examples using the "!" prefix
.sp
Suppose there\(aqs a branch that only a given user (or group) should be able to
push to, and you don\(aqt want to restrict access to any other branch that may
be created.
.sp
The "!" prefix allows you to prevent anyone except a given user or group to
push changesets in a given branch or path.
.sp
In the examples below, we will:
1) Deny access to branch "ring" to anyone but user "gollum"
2) Deny access to branch "lake" to anyone but members of the group "hobbit"
3) Deny access to a file to anyone but user "gollum"
.sp
.nf
.ft C
[acl.allow.branches]
# Empty

[acl.deny.branches]

# 1) only \(aqgollum\(aq can commit to branch \(aqring\(aq;
# \(aqgollum\(aq and anyone else can still commit to any other branch.
ring = !gollum

# 2) only members of the group \(aqhobbit\(aq can commit to branch \(aqlake\(aq;
# \(aqhobbit\(aq members and anyone else can still commit to any other branch.
lake = !@hobbit

# You can also deny access based on file paths:

[acl.allow]
# Empty

[acl.deny]
# 3) only \(aqgollum\(aq can change the file below;
# \(aqgollum\(aq and anyone else can still change any other file.
/misty/mountains/cave/ring = !gollum
.ft P
.fi
.SS amend
.sp
provide the amend command (EXPERIMENTAL)
.sp
This extension provides an \fBamend\fP command that is similar to
\fBcommit \-\-amend\fP but does not prompt an editor.
.SS Commands
.SS Change creation
.SS amend
.sp
amend the working copy parent with all or specified outstanding changes:
.sp
.nf
.ft C
hg amend [OPTION]... [FILE]...
.ft P
.fi
.sp
Similar to \%\fBhg commit \-\-amend\fP\:, but reuse the commit message without
invoking editor, unless \fB\-\-edit\fP was set.
.sp
See \%\fBhg help commit\fP\: for more details.
.sp
Options:
.INDENT 0.0
.TP
.B \-A,  \-\-addremove
.
mark new/missing files as added/removed before committing
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-i,  \-\-interactive
.
use interactive mode
.TP
.B \-\-close\-branch
.
mark a branch as closed, hiding it from the branch list
.TP
.B \-s,  \-\-secret
.
use the secret phase for committing
.TP
.BI \-n,  \-\-note \ <VALUE>
.
store a note on the amend
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.TP
.B \-D,  \-\-currentdate
.
record the current date as commit date
.TP
.B \-U,  \-\-currentuser
.
record the current user as committer
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS automv
.sp
check for unrecorded moves at commit time (EXPERIMENTAL)
.sp
This extension checks at commit/amend time if any of the committed files
comes from an unrecorded mv.
.sp
The threshold at which a file is considered a move can be set with the
\fBautomv.similarity\fP config option. This option takes a percentage between 0
(disabled) and 100 (files must be identical), the default is 95.
.SS beautifygraph
.sp
beautify log \-G output by using Unicode characters (EXPERIMENTAL)
.INDENT 0.0
.INDENT 3.5
.sp
A terminal with UTF\-8 support and monospace narrow text are required.
.UNINDENT
.UNINDENT
.SS blackbox
.sp
log repository events to a blackbox for debugging
.sp
Logs event information to .hg/blackbox.log to help debug and diagnose problems.
The events that get logged can be configured via the blackbox.track and
blackbox.ignore config keys.
.sp
Examples:
.sp
.nf
.ft C
[blackbox]
track = *
ignore = pythonhook
# dirty is *EXPENSIVE* (slow);
# each log entry indicates \(ga+\(ga if the repository is dirty, like :hg:\(gaid\(ga.
dirty = True
# record the source of log messages
logsource = True

[blackbox]
track = command, commandfinish, commandexception, exthook, pythonhook

[blackbox]
track = incoming

[blackbox]
# limit the size of a log file
maxsize = 1.5 MB
# rotate up to N log files when the current one gets too big
maxfiles = 3

[blackbox]
# Include microseconds in log entries with %f (see Python function
# datetime.datetime.strftime)
date\-format = %Y\-%m\-%d @ %H:%M:%S.%f
.ft P
.fi
.SS Commands
.SS Repository maintenance
.SS blackbox
.sp
view the recent repository events:
.sp
.nf
.ft C
hg blackbox [OPTION]...
.ft P
.fi
.sp
view the recent repository events
.sp
Options:
.INDENT 0.0
.TP
.BI \-l,  \-\-limit \ <VALUE>
.
the number of events to show (default: 10)
.UNINDENT
.SS bookflow
.sp
implements bookmark\-based branching (EXPERIMENTAL)
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
.
Disables creation of new branches (config: enable_branches=False).
.IP \(bu 2
.
Requires an active bookmark on commit (config: require_bookmark=True).
.IP \(bu 2
.
Doesn\(aqt move the active bookmark on update, only on commit.
.IP \(bu 2
.
Requires \(aq\-\-rev\(aq for moving an existing bookmark.
.IP \(bu 2
.
Protects special bookmarks (config: protect=@).
.UNINDENT
.sp
flow related commands
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.TP
.B hg book NAME
.
create a new bookmark
.TP
.B hg book NAME \-r REV
.
move bookmark to revision (fast\-forward)
.TP
.B hg up|co NAME
.
switch to bookmark
.TP
.B hg push \-B .
.
push active bookmark
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.UNINDENT
.SS bugzilla
.sp
hooks for integrating with the Bugzilla bug tracker
.sp
This hook extension adds comments on bugs in Bugzilla when changesets
that refer to bugs by Bugzilla ID are seen. The comment is formatted using
the Mercurial template mechanism.
.sp
The bug references can optionally include an update for Bugzilla of the
hours spent working on the bug. Bugs can also be marked fixed.
.sp
Four basic modes of access to Bugzilla are provided:
.INDENT 0.0
.IP 1. 3
.
Access via the Bugzilla REST\-API. Requires bugzilla 5.0 or later.
.IP 2. 3
.
Access via the Bugzilla XMLRPC interface. Requires Bugzilla 3.4 or later.
.IP 3. 3
.
Check data via the Bugzilla XMLRPC interface and submit bug change
via email to Bugzilla email interface. Requires Bugzilla 3.4 or later.
.IP 4. 3
.
Writing directly to the Bugzilla database. Only Bugzilla installations
using MySQL are supported. Requires Python MySQLdb.
.UNINDENT
.sp
Writing directly to the database is susceptible to schema changes, and
relies on a Bugzilla contrib script to send out bug change
notification emails. This script runs as the user running Mercurial,
must be run on the host with the Bugzilla install, and requires
permission to read Bugzilla configuration details and the necessary
MySQL user and password to have full access rights to the Bugzilla
database. For these reasons this access mode is now considered
deprecated, and will not be updated for new Bugzilla versions going
forward. Only adding comments is supported in this access mode.
.sp
Access via XMLRPC needs a Bugzilla username and password to be specified
in the configuration. Comments are added under that username. Since the
configuration must be readable by all Mercurial users, it is recommended
that the rights of that user are restricted in Bugzilla to the minimum
necessary to add comments. Marking bugs fixed requires Bugzilla 4.0 and later.
.sp
Access via XMLRPC/email uses XMLRPC to query Bugzilla, but sends
email to the Bugzilla email interface to submit comments to bugs.
The From: address in the email is set to the email address of the Mercurial
user, so the comment appears to come from the Mercurial user. In the event
that the Mercurial user email is not recognized by Bugzilla as a Bugzilla
user, the email associated with the Bugzilla username used to log into
Bugzilla is used instead as the source of the comment. Marking bugs fixed
works on all supported Bugzilla versions.
.sp
Access via the REST\-API needs either a Bugzilla username and password
or an apikey specified in the configuration. Comments are made under
the given username or the user associated with the apikey in Bugzilla.
.sp
Configuration items common to all access modes:
.INDENT 0.0
.TP
.B bugzilla.version
.
The access type to use. Values recognized are:
.INDENT 7.0
.TP
.B \fBrestapi\fP
.sp
Bugzilla REST\-API, Bugzilla 5.0 and later.
.TP
.B \fBxmlrpc\fP
.sp
Bugzilla XMLRPC interface.
.TP
.B \fBxmlrpc+email\fP
.sp
Bugzilla XMLRPC and email interfaces.
.TP
.B \fB3.0\fP
.sp
MySQL access, Bugzilla 3.0 and later.
.TP
.B \fB2.18\fP
.sp
MySQL access, Bugzilla 2.18 and up to but not
including 3.0.
.TP
.B \fB2.16\fP
.sp
MySQL access, Bugzilla 2.16 and up to but not
including 2.18.
.UNINDENT
.TP
.B bugzilla.regexp
.
Regular expression to match bug IDs for update in changeset commit message.
It must contain one "()" named group \fB<ids>\fP containing the bug
IDs separated by non\-digit characters. It may also contain
a named group \fB<hours>\fP with a floating\-point number giving the
hours worked on the bug. If no named groups are present, the first
"()" group is assumed to contain the bug IDs, and work time is not
updated. The default expression matches \fBBug 1234\fP, \fBBug no. 1234\fP,
\fBBug number 1234\fP, \fBBugs 1234,5678\fP, \fBBug 1234 and 5678\fP and
variations thereof, followed by an hours number prefixed by \fBh\fP or
\fBhours\fP, e.g. \fBhours 1.5\fP. Matching is case insensitive.
.TP
.B bugzilla.fixregexp
.
Regular expression to match bug IDs for marking fixed in changeset
commit message. This must contain a "()" named group \fB<ids>\(ga containing
the bug IDs separated by non\-digit characters. It may also contain
a named group \(ga\(ga<hours>\fP with a floating\-point number giving the
hours worked on the bug. If no named groups are present, the first
"()" group is assumed to contain the bug IDs, and work time is not
updated. The default expression matches \fBFixes 1234\fP, \fBFixes bug 1234\fP,
\fBFixes bugs 1234,5678\fP, \fBFixes 1234 and 5678\fP and
variations thereof, followed by an hours number prefixed by \fBh\fP or
\fBhours\fP, e.g. \fBhours 1.5\fP. Matching is case insensitive.
.TP
.B bugzilla.fixstatus
.
The status to set a bug to when marking fixed. Default \fBRESOLVED\fP.
.TP
.B bugzilla.fixresolution
.
The resolution to set a bug to when marking fixed. Default \fBFIXED\fP.
.TP
.B bugzilla.style
.
The style file to use when formatting comments.
.TP
.B bugzilla.template
.
Template to use when formatting comments. Overrides style if
specified. In addition to the usual Mercurial keywords, the
extension specifies:
.INDENT 7.0
.TP
.B \fB{bug}\fP
.sp
The Bugzilla bug ID.
.TP
.B \fB{root}\fP
.sp
The full pathname of the Mercurial repository.
.TP
.B \fB{webroot}\fP
.sp
Stripped pathname of the Mercurial repository.
.TP
.B \fB{hgweb}\fP
.sp
Base URL for browsing Mercurial repositories.
.UNINDENT
.sp
Default \fBchangeset {node|short} in repo {root} refers to bug
{bug}.\endetails:\en\et{desc|tabindent}\fP
.TP
.B bugzilla.strip
.
The number of path separator characters to strip from the front of
the Mercurial repository path (\fB{root}\fP in templates) to produce
\fB{webroot}\fP. For example, a repository with \fB{root}\fP
\fB/var/local/my\-project\fP with a strip of 2 gives a value for
\fB{webroot}\fP of \fBmy\-project\fP. Default 0.
.TP
.B web.baseurl
.
Base URL for browsing Mercurial repositories. Referenced from
templates as \fB{hgweb}\fP.
.UNINDENT
.sp
Configuration items common to XMLRPC+email and MySQL access modes:
.INDENT 0.0
.TP
.B bugzilla.usermap
.
Path of file containing Mercurial committer email to Bugzilla user email
mappings. If specified, the file should contain one mapping per
line:
.sp
.nf
.ft C
committer = Bugzilla user
.ft P
.fi
.sp
See also the \fB[usermap]\fP section.
.UNINDENT
.sp
The \fB[usermap]\fP section is used to specify mappings of Mercurial
committer email to Bugzilla user email. See also \fBbugzilla.usermap\fP.
Contains entries of the form \fBcommitter = Bugzilla user\fP.
.sp
XMLRPC and REST\-API access mode configuration:
.INDENT 0.0
.TP
.B bugzilla.bzurl
.
The base URL for the Bugzilla installation.
Default \fBhttp://localhost/bugzilla\fP.
.TP
.B bugzilla.user
.
The username to use to log into Bugzilla via XMLRPC. Default
\fBbugs\fP.
.TP
.B bugzilla.password
.
The password for Bugzilla login.
.UNINDENT
.sp
REST\-API access mode uses the options listed above as well as:
.INDENT 0.0
.TP
.B bugzilla.apikey
.
An apikey generated on the Bugzilla instance for api access.
Using an apikey removes the need to store the user and password
options.
.UNINDENT
.sp
XMLRPC+email access mode uses the XMLRPC access mode configuration items,
and also:
.INDENT 0.0
.TP
.B bugzilla.bzemail
.
The Bugzilla email address.
.UNINDENT
.sp
In addition, the Mercurial email settings must be configured. See the
documentation in hgrc(5), sections \fB[email]\fP and \fB[smtp]\fP.
.sp
MySQL access mode configuration:
.INDENT 0.0
.TP
.B bugzilla.host
.
Hostname of the MySQL server holding the Bugzilla database.
Default \fBlocalhost\fP.
.TP
.B bugzilla.db
.
Name of the Bugzilla database in MySQL. Default \fBbugs\fP.
.TP
.B bugzilla.user
.
Username to use to access MySQL server. Default \fBbugs\fP.
.TP
.B bugzilla.password
.
Password to use to access MySQL server.
.TP
.B bugzilla.timeout
.
Database connection timeout (seconds). Default 5.
.TP
.B bugzilla.bzuser
.
Fallback Bugzilla user name to record comments with, if changeset
committer cannot be found as a Bugzilla user.
.TP
.B bugzilla.bzdir
.
Bugzilla install directory. Used by default notify. Default
\fB/var/www/html/bugzilla\fP.
.TP
.B bugzilla.notify
.
The command to run to get Bugzilla to send bug change notification
emails. Substitutes from a map with 3 keys, \fBbzdir\fP, \fBid\fP (bug
id) and \fBuser\fP (committer bugzilla email). Default depends on
version; from 2.18 it is "cd %(bzdir)s && perl \-T
contrib/sendbugmail.pl %(id)s %(user)s".
.UNINDENT
.sp
Activating the extension:
.sp
.nf
.ft C
[extensions]
bugzilla =

[hooks]
# run bugzilla hook on every change pulled or pushed in here
incoming.bugzilla = python:hgext.bugzilla.hook
.ft P
.fi
.sp
Example configurations:
.sp
XMLRPC example configuration. This uses the Bugzilla at
\fBhttp://my\-project.org/bugzilla\fP, logging in as user
\fBbugmail@my\-project.org\fP with password \fBplugh\fP. It is used with a
collection of Mercurial repositories in \fB/var/local/hg/repos/\fP,
with a web interface at \fBhttp://my\-project.org/hg\fP.
.sp
.nf
.ft C
[bugzilla]
bzurl=http://my\-project.org/bugzilla
user=bugmail@my\-project.org
password=plugh
version=xmlrpc
template=Changeset {node|short} in {root|basename}.
         {hgweb}/{webroot}/rev/{node|short}\en
         {desc}\en
strip=5

[web]
baseurl=http://my\-project.org/hg
.ft P
.fi
.sp
XMLRPC+email example configuration. This uses the Bugzilla at
\fBhttp://my\-project.org/bugzilla\fP, logging in as user
\fBbugmail@my\-project.org\fP with password \fBplugh\fP. It is used with a
collection of Mercurial repositories in \fB/var/local/hg/repos/\fP,
with a web interface at \fBhttp://my\-project.org/hg\fP. Bug comments
are sent to the Bugzilla email address
\fBbugzilla@my\-project.org\fP.
.sp
.nf
.ft C
[bugzilla]
bzurl=http://my\-project.org/bugzilla
user=bugmail@my\-project.org
password=plugh
version=xmlrpc+email
bzemail=bugzilla@my\-project.org
template=Changeset {node|short} in {root|basename}.
         {hgweb}/{webroot}/rev/{node|short}\en
         {desc}\en
strip=5

[web]
baseurl=http://my\-project.org/hg

[usermap]
user@emaildomain.com=user.name@bugzilladomain.com
.ft P
.fi
.sp
MySQL example configuration. This has a local Bugzilla 3.2 installation
in \fB/opt/bugzilla\-3.2\fP. The MySQL database is on \fBlocalhost\fP,
the Bugzilla database name is \fBbugs\fP and MySQL is
accessed with MySQL username \fBbugs\fP password \fBXYZZY\fP. It is used
with a collection of Mercurial repositories in \fB/var/local/hg/repos/\fP,
with a web interface at \fBhttp://my\-project.org/hg\fP.
.sp
.nf
.ft C
[bugzilla]
host=localhost
password=XYZZY
version=3.0
bzuser=unknown@domain.com
bzdir=/opt/bugzilla\-3.2
template=Changeset {node|short} in {root|basename}.
         {hgweb}/{webroot}/rev/{node|short}\en
         {desc}\en
strip=5

[web]
baseurl=http://my\-project.org/hg

[usermap]
user@emaildomain.com=user.name@bugzilladomain.com
.ft P
.fi
.sp
All the above add a comment to the Bugzilla bug record of the form:
.sp
.nf
.ft C
Changeset 3b16791d6642 in repository\-name.
http://my\-project.org/hg/repository\-name/rev/3b16791d6642

Changeset commit comment. Bug 1234.
.ft P
.fi
.SS censor
.sp
erase file content at a given revision
.sp
The censor command instructs Mercurial to erase all content of a file at a given
revision \fIwithout updating the changeset hash.\fP This allows existing history to
remain valid while preventing future clones/pulls from receiving the erased
data.
.sp
Typical uses for censor are due to security or legal requirements, including:
.sp
.nf
.ft C
* Passwords, private keys, cryptographic material
* Licensed data/code/libraries for which the license has expired
* Personally Identifiable Information or other private data
.ft P
.fi
.sp
Censored nodes can interrupt mercurial\(aqs typical operation whenever the excised
data needs to be materialized. Some commands, like \fBhg cat\fP/\fBhg revert\fP,
simply fail when asked to produce censored data. Others, like \fBhg verify\fP and
\fBhg update\fP, must be capable of tolerating censored data to continue to
function in a meaningful way. Such commands only tolerate censored file
revisions if they are allowed by the "censor.policy=ignore" config option.
.sp
A few informative commands such as \fBhg grep\fP will unconditionally
ignore censored data and merely report that it was encountered.
.SS Commands
.SS Repository maintenance
.SS censor
.sp
.nf
.ft C
hg censor \-r REV [\-t TEXT] [FILE]
.ft P
.fi
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV>
.
censor file from specified revision
.TP
.BI \-t,  \-\-tombstone \ <TEXT>
.
replacement tombstone data
.UNINDENT
.SS children
.sp
command to display child changesets (DEPRECATED)
.sp
This extension is deprecated. You should use \%\fBhg log \-r
"children(REV)"\fP\: instead.
.SS Commands
.SS Change navigation
.SS children
.sp
show the children of the given or working directory revision:
.sp
.nf
.ft C
hg children [\-r REV] [FILE]
.ft P
.fi
.sp
Print the children of the working directory\(aqs revisions. If a
revision is given via \-r/\-\-rev, the children of that revision will
be printed. If a file argument is given, revision in which the
file was last changed (after the working directory revision or the
argument to \-\-rev if given) is printed.
.sp
Please use \%\fBhg log\fP\: instead:
.sp
.nf
.ft C
hg children => hg log \-r "children(.)"
hg children \-r REV => hg log \-r "children(REV)"
.ft P
.fi
.sp
See \%\fBhg help log\fP\: and \%\fBhg help revsets.children\fP\:.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV>
.
show children of the specified revision (default: .)
.TP
.BI \-\-style \ <STYLE>
.
display using template map file (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS churn
.sp
command to display statistics about repository history
.SS Commands
.SS Repository maintenance
.SS churn
.sp
histogram of changes to the repository:
.sp
.nf
.ft C
hg churn [\-d DATE] [\-r REV] [\-\-aliases FILE] [FILE]
.ft P
.fi
.sp
This command will display a histogram representing the number
of changed lines or revisions, grouped according to the given
template. The default template will group changes by author.
The \-\-dateformat option may be used to group the results by
date instead.
.sp
Statistics are based on the number of changed lines, or
alternatively the number of matching revisions if the
\-\-changesets option is specified.
.sp
Examples:
.sp
.nf
.ft C
# display count of changed lines for every committer
hg churn \-T "{author|email}"

# display daily activity graph
hg churn \-f "%H" \-s \-c

# display activity of developers by month
hg churn \-f "%Y\-%m" \-s \-c

# display count of lines changed in every year
hg churn \-f "%Y" \-s

# display count of lines changed in a time range
hg churn \-d "2020\-04 to 2020\-09"
.ft P
.fi
.sp
It is possible to map alternate email addresses to a main address
by providing a file using the following format:
.sp
.nf
.ft C
<alias email> = <actual email>
.ft P
.fi
.sp
Such a file may be specified with the \-\-aliases option, otherwise
a .hgchurn file will be looked for in the working directory root.
Aliases will be split from the rightmost "=".
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
count rate for the specified revision or revset
.TP
.BI \-d,  \-\-date \ <DATE>
.
count rate for revisions matching date spec
.TP
.BI \-t,  \-\-oldtemplate \ <TEMPLATE>
.
template to group changesets (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
template to group changesets (default: {author|email})
.TP
.BI \-f,  \-\-dateformat \ <FORMAT>
.
strftime\-compatible format for grouping by date
.TP
.B \-c,  \-\-changesets
.
count rate by number of changesets
.TP
.B \-s,  \-\-sort
.
sort by key (default: sort by count)
.TP
.B \-\-diffstat
.
display added/removed lines separately
.TP
.BI \-\-aliases \ <FILE>
.
file with email aliases
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS clonebundles
.sp
advertise pre\-generated bundles to seed clones
.sp
"clonebundles" is a server\-side extension used to advertise the existence
of pre\-generated, externally hosted bundle files to clients that are
cloning so that cloning can be faster, more reliable, and require less
resources on the server. "pullbundles" is a related feature for sending
pre\-generated bundle files to clients as part of pull operations.
.sp
Cloning can be a CPU and I/O intensive operation on servers. Traditionally,
the server, in response to a client\(aqs request to clone, dynamically generates
a bundle containing the entire repository content and sends it to the client.
There is no caching on the server and the server will have to redundantly
generate the same outgoing bundle in response to each clone request. For
servers with large repositories or with high clone volume, the load from
clones can make scaling the server challenging and costly.
.sp
This extension provides server operators the ability to offload
potentially expensive clone load to an external service. Pre\-generated
bundles also allow using more CPU intensive compression, reducing the
effective bandwidth requirements.
.sp
Here\(aqs how clone bundles work:
.INDENT 0.0
.IP 1. 3
.
A server operator establishes a mechanism for making bundle files available
on a hosting service where Mercurial clients can fetch them.
.IP 2. 3
.
A manifest file listing available bundle URLs and some optional metadata
is added to the Mercurial repository on the server.
.IP 3. 3
.
A client initiates a clone against a clone bundles aware server.
.IP 4. 3
.
The client sees the server is advertising clone bundles and fetches the
manifest listing available bundles.
.IP 5. 3
.
The client filters and sorts the available bundles based on what it
supports and prefers.
.IP 6. 3
.
The client downloads and applies an available bundle from the
server\-specified URL.
.IP 7. 3
.
The client reconnects to the original server and performs the equivalent
of \%\fBhg pull\fP\: to retrieve all repository data not in the bundle. (The
repository could have been updated between when the bundle was created
and when the client started the clone.) This may use "pullbundles".
.UNINDENT
.sp
Instead of the server generating full repository bundles for every clone
request, it generates full bundles once and they are subsequently reused to
bootstrap new clones. The server may still transfer data at clone time.
However, this is only data that has been added/changed since the bundle was
created. For large, established repositories, this can reduce server load for
clones to less than 1% of original.
.sp
Here\(aqs how pullbundles work:
.INDENT 0.0
.IP 1. 3
.
A manifest file listing available bundles and describing the revisions
is added to the Mercurial repository on the server.
.IP 2. 3
.
A new\-enough client informs the server that it supports partial pulls
and initiates a pull.
.IP 3. 3
.
If the server has pull bundles enabled and sees the client advertising
partial pulls, it checks for a matching pull bundle in the manifest.
A bundle matches if the format is supported by the client, the client
has the required revisions already and needs something from the bundle.
.IP 4. 3
.
If there is at least one matching bundle, the server sends it to the client.
.IP 5. 3
.
The client applies the bundle and notices that the server reply was
incomplete. It initiates another pull.
.UNINDENT
.sp
To work, this extension requires the following of server operators:
.INDENT 0.0
.IP \(bu 2
.
Generating bundle files of repository content (typically periodically,
such as once per day).
.IP \(bu 2
.
Clone bundles: A file server that clients have network access to and that
Python knows how to talk to through its normal URL handling facility
(typically an HTTP/HTTPS server).
.IP \(bu 2
.
A process for keeping the bundles manifest in sync with available bundle
files.
.UNINDENT
.sp
Strictly speaking, using a static file hosting server isn\(aqt required: a server
operator could use a dynamic service for retrieving bundle data. However,
static file hosting services are simple and scalable and should be sufficient
for most needs.
.sp
Bundle files can be generated with the \%\fBhg bundle\fP\: command. Typically
\%\fBhg bundle \-\-all\fP\: is used to produce a bundle of the entire repository.
.sp
\%\fBhg debugcreatestreamclonebundle\fP\: can be used to produce a special
\fIstreaming clonebundle\fP. These are bundle files that are extremely efficient
to produce and consume (read: fast). However, they are larger than
traditional bundle formats and require that clients support the exact set
of repository data store formats in use by the repository that created them.
Typically, a newer server can serve data that is compatible with older clients.
However, \fIstreaming clone bundles\fP don\(aqt have this guarantee. \fBServer
operators need to be aware that newer versions of Mercurial may produce
streaming clone bundles incompatible with older Mercurial versions.\fP
.sp
A server operator is responsible for creating a \fB.hg/clonebundles.manifest\fP
file containing the list of available bundle files suitable for seeding
clones. If this file does not exist, the repository will not advertise the
existence of clone bundles when clients connect. For pull bundles,
\fB.hg/pullbundles.manifest\fP is used.
.sp
The manifest file contains a newline (n) delimited list of entries.
.sp
Each line in this file defines an available bundle. Lines have the format:
.INDENT 0.0
.INDENT 3.5
.sp
<URL> [<key>=<value>[ <key>=<value>]]
.UNINDENT
.UNINDENT
.sp
That is, a URL followed by an optional, space\-delimited list of key=value
pairs describing additional properties of this bundle. Both keys and values
are URI encoded.
.sp
For pull bundles, the URL is a path under the \fB.hg\fP directory of the
repository.
.sp
Keys in UPPERCASE are reserved for use by Mercurial and are defined below.
All non\-uppercase keys can be used by site installations. An example use
for custom properties is to use the \fIdatacenter\fP attribute to define which
data center a file is hosted in. Clients could then prefer a server in the
data center closest to them.
.sp
The following reserved keys are currently defined:
.INDENT 0.0
.TP
.B BUNDLESPEC
.
A "bundle specification" string that describes the type of the bundle.
.sp
These are string values that are accepted by the "\-\-type" argument of
\%\fBhg bundle\fP\:.
.sp
The values are parsed in strict mode, which means they must be of the
"<compression>\-<type>" form. See
mercurial.exchange.parsebundlespec() for more details.
.sp
\%\fBhg debugbundle \-\-spec\fP\: can be used to print the bundle specification
string for a bundle file. The output of this command can be used verbatim
for the value of \fBBUNDLESPEC\fP (it is already escaped).
.sp
Clients will automatically filter out specifications that are unknown or
unsupported so they won\(aqt attempt to download something that likely won\(aqt
apply.
.sp
The actual value doesn\(aqt impact client behavior beyond filtering:
clients will still sniff the bundle type from the header of downloaded
files.
.sp
\fBUse of this key is highly recommended\fP, as it allows clients to
easily skip unsupported bundles. If this key is not defined, an old
client may attempt to apply a bundle that it is incapable of reading.
.TP
.B REQUIRESNI
.
Whether Server Name Indication (SNI) is required to connect to the URL.
SNI allows servers to use multiple certificates on the same IP. It is
somewhat common in CDNs and other hosting providers. Older Python
versions do not support SNI. Defining this attribute enables clients
with older Python versions to filter this entry without experiencing
an opaque SSL failure at connection time.
.sp
If this is defined, it is important to advertise a non\-SNI fallback
URL or clients running old Python releases may not be able to clone
with the clonebundles facility.
.sp
Value should be "true".
.TP
.B REQUIREDRAM
.
Value specifies expected memory requirements to decode the payload.
Values can have suffixes for common bytes sizes. e.g. "64MB".
.sp
This key is often used with zstd\-compressed bundles using a high
compression level / window size, which can require 100+ MB of memory
to decode.
.TP
.B heads
.
Used for pull bundles. This contains the \fB;\fP separated changeset
hashes of the heads of the bundle content.
.TP
.B bases
.
Used for pull bundles. This contains the \fB;\fP separated changeset
hashes of the roots of the bundle content. This can be skipped if
the bundle was created without \fB\-\-base\fP.
.UNINDENT
.sp
Manifests can contain multiple entries. Assuming metadata is defined, clients
will filter entries from the manifest that they don\(aqt support. The remaining
entries are optionally sorted by client preferences
(\fBui.clonebundleprefers\fP config option). The client then attempts
to fetch the bundle at the first URL in the remaining list.
.sp
\fBErrors when downloading a bundle will fail the entire clone operation:
clients do not automatically fall back to a traditional clone.\fP The reason
for this is that if a server is using clone bundles, it is probably doing so
because the feature is necessary to help it scale. In other words, there
is an assumption that clone load will be offloaded to another service and
that the Mercurial server isn\(aqt responsible for serving this clone load.
If that other service experiences issues and clients start mass falling back to
the original Mercurial server, the added clone load could overwhelm the server
due to unexpected load and effectively take it offline. Not having clients
automatically fall back to cloning from the original server mitigates this
scenario.
.sp
Because there is no automatic Mercurial server fallback on failure of the
bundle hosting service, it is important for server operators to view the bundle
hosting service as an extension of the Mercurial server in terms of
availability and service level agreements: if the bundle hosting service goes
down, so does the ability for clients to clone. Note: clients will see a
message informing them how to bypass the clone bundles facility when a failure
occurs. So server operators should prepare for some people to follow these
instructions when a failure occurs, thus driving more load to the original
Mercurial server when the bundle hosting service fails.
.SS closehead
.sp
close arbitrary heads without checking them out first
.SS Commands
.SS Change manipulation
.SS close\-head
.sp
close the given head revisions:
.sp
.nf
.ft C
hg close\-head [OPTION]... [REV]...
.ft P
.fi
.sp
This is equivalent to checking out each revision in a clean tree and running
\fBhg commit \-\-close\-branch\fP, except that it doesn\(aqt change the working
directory.
.sp
The commit message must be specified with \-l or \-m.
.sp
Options:
.INDENT 0.0
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
revision to check
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: close\-heads
.UNINDENT
.UNINDENT
.SS commitextras
.sp
adds a new flag extras to commit (ADVANCED)
.SS convert
.sp
import revisions from foreign VCS repositories into Mercurial
.SS Commands
.SS Uncategorized commands
.SS convert
.sp
convert a foreign SCM repository to a Mercurial one.:
.sp
.nf
.ft C
hg convert [OPTION]... SOURCE [DEST [REVMAP]]
.ft P
.fi
.sp
Accepted source formats [identifiers]:
.INDENT 0.0
.IP \(bu 2
.
Mercurial [hg]
.IP \(bu 2
.
CVS [cvs]
.IP \(bu 2
.
Darcs [darcs]
.IP \(bu 2
.
git [git]
.IP \(bu 2
.
Subversion [svn]
.IP \(bu 2
.
Monotone [mtn]
.IP \(bu 2
.
GNU Arch [gnuarch]
.IP \(bu 2
.
Bazaar [bzr]
.IP \(bu 2
.
Perforce [p4]
.UNINDENT
.sp
Accepted destination formats [identifiers]:
.INDENT 0.0
.IP \(bu 2
.
Mercurial [hg]
.IP \(bu 2
.
Subversion [svn] (history on branches is not preserved)
.UNINDENT
.sp
If no revision is given, all revisions will be converted.
Otherwise, convert will only import up to the named revision
(given in a format understood by the source).
.sp
If no destination directory name is specified, it defaults to the
basename of the source with \fB\-hg\fP appended. If the destination
repository doesn\(aqt exist, it will be created.
.sp
By default, all sources except Mercurial will use \-\-branchsort.
Mercurial uses \-\-sourcesort to preserve original revision numbers
order. Sort modes have the following effects:
.INDENT 0.0
.TP
.B \-\-branchsort
.
convert from parent to child revision when possible,
which means branches are usually converted one after
the other. It generates more compact repositories.
.TP
.B \-\-datesort
.
sort revisions by date. Converted repositories have
good\-looking changelogs but are often an order of
magnitude larger than the same ones generated by
\-\-branchsort.
.TP
.B \-\-sourcesort
.
try to preserve source revisions order, only
supported by Mercurial sources.
.TP
.B \-\-closesort
.
try to move closed revisions as close as possible
to parent branches, only supported by Mercurial
sources.
.UNINDENT
.sp
If \fBREVMAP\fP isn\(aqt given, it will be put in a default location
(\fB<dest>/.hg/shamap\fP by default). The \fBREVMAP\fP is a simple
text file that maps each source commit ID to the destination ID
for that revision, like so:
.sp
.nf
.ft C
<source ID> <destination ID>
.ft P
.fi
.sp
If the file doesn\(aqt exist, it\(aqs automatically created. It\(aqs
updated on each commit copied, so \%\fBhg convert\fP\: can be interrupted
and can be run repeatedly to copy new commits.
.sp
The authormap is a simple text file that maps each source commit
author to a destination commit author. It is handy for source SCMs
that use unix logins to identify authors (e.g.: CVS). One line per
author mapping and the line format is:
.sp
.nf
.ft C
source author = destination author
.ft P
.fi
.sp
Empty lines and lines starting with a \fB#\fP are ignored.
.sp
The filemap is a file that allows filtering and remapping of files
and directories. Each line can contain one of the following
directives:
.sp
.nf
.ft C
include path/to/file\-or\-dir

exclude path/to/file\-or\-dir

rename path/to/source path/to/destination
.ft P
.fi
.sp
Comment lines start with \fB#\fP. A specified path matches if it
equals the full relative name of a file or one of its parent
directories. The \fBinclude\fP or \fBexclude\fP directive with the
longest matching path applies, so line order does not matter.
.sp
The \fBinclude\fP directive causes a file, or all files under a
directory, to be included in the destination repository. The default
if there are no \fBinclude\fP statements is to include everything.
If there are any \fBinclude\fP statements, nothing else is included.
The \fBexclude\fP directive causes files or directories to
be omitted. The \fBrename\fP directive renames a file or directory if
it is converted. To rename from a subdirectory into the root of
the repository, use \fB.\fP as the path to rename to.
.sp
\fB\-\-full\fP will make sure the converted changesets contain exactly
the right files with the right content. It will make a full
conversion of all files, not just the ones that have
changed. Files that already are correct will not be changed. This
can be used to apply filemap changes when converting
incrementally. This is currently only supported for Mercurial and
Subversion.
.sp
The splicemap is a file that allows insertion of synthetic
history, letting you specify the parents of a revision. This is
useful if you want to e.g. give a Subversion merge two parents, or
graft two disconnected series of history together. Each entry
contains a key, followed by a space, followed by one or two
comma\-separated values:
.sp
.nf
.ft C
key parent1, parent2
.ft P
.fi
.sp
The key is the revision ID in the source
revision control system whose parents should be modified (same
format as a key in .hg/shamap). The values are the revision IDs
(in either the source or destination revision control system) that
should be used as the new parents for that node. For example, if
you have merged "release\-1.0" into "trunk", then you should
specify the revision on "trunk" as the first parent and the one on
the "release\-1.0" branch as the second.
.sp
The branchmap is a file that allows you to rename a branch when it is
being brought in from whatever external repository. When used in
conjunction with a splicemap, it allows for a powerful combination
to help fix even the most badly mismanaged repositories and turn them
into nicely structured Mercurial repositories. The branchmap contains
lines of the form:
.sp
.nf
.ft C
original_branch_name new_branch_name
.ft P
.fi
.sp
where "original_branch_name" is the name of the branch in the
source repository, and "new_branch_name" is the name of the branch
is the destination repository. No whitespace is allowed in the new
branch name. This can be used to (for instance) move code in one
repository from "default" to a named branch.
.SS Mercurial Source
.sp
The Mercurial source recognizes the following configuration
options, which you can set on the command line with \fB\-\-config\fP:
.INDENT 0.0
.TP
.B convert.hg.ignoreerrors
.
ignore integrity errors when reading.
Use it to fix Mercurial repositories with missing revlogs, by
converting from and to Mercurial. Default is False.
.TP
.B convert.hg.saverev
.
store original revision ID in changeset
(forces target IDs to change). It takes a boolean argument and
defaults to False.
.TP
.B convert.hg.startrev
.
specify the initial Mercurial revision.
The default is 0.
.TP
.B convert.hg.revs
.
revset specifying the source revisions to convert.
.UNINDENT
.SS Bazaar Source
.sp
The following options can be used with \fB\-\-config\fP:
.INDENT 0.0
.TP
.B convert.bzr.saverev
.
whether to store the original Bazaar commit ID in
the metadata of the destination commit. The default is True.
.UNINDENT
.SS CVS Source
.sp
CVS source will use a sandbox (i.e. a checked\-out copy) from CVS
to indicate the starting point of what will be converted. Direct
access to the repository files is not needed, unless of course the
repository is \fB:local:\fP. The conversion uses the top level
directory in the sandbox to find the CVS repository, and then uses
CVS rlog commands to find files to convert. This means that unless
a filemap is given, all files under the starting directory will be
converted, and that any directory reorganization in the CVS
sandbox is ignored.
.sp
The following options can be used with \fB\-\-config\fP:
.INDENT 0.0
.TP
.B convert.cvsps.cache
.
Set to False to disable remote log caching,
for testing and debugging purposes. Default is True.
.TP
.B convert.cvsps.fuzz
.
Specify the maximum time (in seconds) that is
allowed between commits with identical user and log message in
a single changeset. When very large files were checked in as
part of a changeset then the default may not be long enough.
The default is 60.
.TP
.B convert.cvsps.logencoding
.
Specify encoding name to be used for
transcoding CVS log messages. Multiple encoding names can be
specified as a list (see \%\fBhg help config.Syntax\fP\:), but only
the first acceptable encoding in the list is used per CVS log
entries. This transcoding is executed before cvslog hook below.
.TP
.B convert.cvsps.mergeto
.
Specify a regular expression to which
commit log messages are matched. If a match occurs, then the
conversion process will insert a dummy revision merging the
branch on which this log message occurs to the branch
indicated in the regex. Default is \fB{{mergetobranch
([\-\ew]+)}}\fP
.TP
.B convert.cvsps.mergefrom
.
Specify a regular expression to which
commit log messages are matched. If a match occurs, then the
conversion process will add the most recent revision on the
branch indicated in the regex as the second parent of the
changeset. Default is \fB{{mergefrombranch ([\-\ew]+)}}\fP
.TP
.B convert.localtimezone
.
use local time (as determined by the TZ
environment variable) for changeset date/times. The default
is False (use UTC).
.TP
.B hooks.cvslog
.
Specify a Python function to be called at the end of
gathering the CVS log. The function is passed a list with the
log entries, and can modify the entries in\-place, or add or
delete them.
.TP
.B hooks.cvschangesets
.
Specify a Python function to be called after
the changesets are calculated from the CVS log. The
function is passed a list with the changeset entries, and can
modify the changesets in\-place, or add or delete them.
.UNINDENT
.sp
An additional "debugcvsps" Mercurial command allows the builtin
changeset merging code to be run without doing a conversion. Its
parameters and output are similar to that of cvsps 2.1. Please see
the command help for more details.
.SS Subversion Source
.sp
Subversion source detects classical trunk/branches/tags layouts.
By default, the supplied \fBsvn://repo/path/\fP source URL is
converted as a single branch. If \fBsvn://repo/path/trunk\fP exists
it replaces the default branch. If \fBsvn://repo/path/branches\fP
exists, its subdirectories are listed as possible branches. If
\fBsvn://repo/path/tags\fP exists, it is looked for tags referencing
converted branches. Default \fBtrunk\fP, \fBbranches\fP and \fBtags\fP
values can be overridden with following options. Set them to paths
relative to the source URL, or leave them blank to disable auto
detection.
.sp
The following options can be set with \fB\-\-config\fP:
.INDENT 0.0
.TP
.B convert.svn.branches
.
specify the directory containing branches.
The default is \fBbranches\fP.
.TP
.B convert.svn.tags
.
specify the directory containing tags. The
default is \fBtags\fP.
.TP
.B convert.svn.trunk
.
specify the name of the trunk branch. The
default is \fBtrunk\fP.
.TP
.B convert.localtimezone
.
use local time (as determined by the TZ
environment variable) for changeset date/times. The default
is False (use UTC).
.UNINDENT
.sp
Source history can be retrieved starting at a specific revision,
instead of being integrally converted. Only single branch
conversions are supported.
.INDENT 0.0
.TP
.B convert.svn.startrev
.
specify start Subversion revision number.
The default is 0.
.UNINDENT
.SS Git Source
.sp
The Git importer converts commits from all reachable branches (refs
in refs/heads) and remotes (refs in refs/remotes) to Mercurial.
Branches are converted to bookmarks with the same name, with the
leading \(aqrefs/heads\(aq stripped. Git submodules are converted to Git
subrepos in Mercurial.
.sp
The following options can be set with \fB\-\-config\fP:
.INDENT 0.0
.TP
.B convert.git.similarity
.
specify how similar files modified in a
commit must be to be imported as renames or copies, as a
percentage between \fB0\fP (disabled) and \fB100\fP (files must be
identical). For example, \fB90\fP means that a delete/add pair will
be imported as a rename if more than 90% of the file hasn\(aqt
changed. The default is \fB50\fP.
.TP
.B convert.git.findcopiesharder
.
while detecting copies, look at all
files in the working copy instead of just changed ones. This
is very expensive for large projects, and is only effective when
\fBconvert.git.similarity\fP is greater than 0. The default is False.
.TP
.B convert.git.renamelimit
.
perform rename and copy detection up to this
many changed files in a commit. Increasing this will make rename
and copy detection more accurate but will significantly slow down
computation on large projects. The option is only relevant if
\fBconvert.git.similarity\fP is greater than 0. The default is
\fB400\fP.
.TP
.B convert.git.committeractions
.
list of actions to take when processing
author and committer values.
.sp
Git commits have separate author (who wrote the commit) and committer
(who applied the commit) fields. Not all destinations support separate
author and committer fields (including Mercurial). This config option
controls what to do with these author and committer fields during
conversion.
.sp
A value of \fBmessagedifferent\fP will append a \fBcommitter: ...\fP
line to the commit message if the Git committer is different from the
author. The prefix of that line can be specified using the syntax
\fBmessagedifferent=<prefix>\fP. e.g. \fBmessagedifferent=git\-committer:\fP.
When a prefix is specified, a space will always be inserted between the
prefix and the value.
.sp
\fBmessagealways\fP behaves like \fBmessagedifferent\fP except it will
always result in a \fBcommitter: ...\fP line being appended to the commit
message. This value is mutually exclusive with \fBmessagedifferent\fP.
.sp
\fBdropcommitter\fP will remove references to the committer. Only
references to the author will remain. Actions that add references
to the committer will have no effect when this is set.
.sp
\fBreplaceauthor\fP will replace the value of the author field with
the committer. Other actions that add references to the committer
will still take effect when this is set.
.sp
The default is \fBmessagedifferent\fP.
.TP
.B convert.git.extrakeys
.
list of extra keys from commit metadata to copy to
the destination. Some Git repositories store extra metadata in commits.
By default, this non\-default metadata will be lost during conversion.
Setting this config option can retain that metadata. Some built\-in
keys such as \fBparent\fP and \fBbranch\fP are not allowed to be copied.
.TP
.B convert.git.remoteprefix
.
remote refs are converted as bookmarks with
\fBconvert.git.remoteprefix\fP as a prefix followed by a /. The default
is \(aqremote\(aq.
.TP
.B convert.git.saverev
.
whether to store the original Git commit ID in the
metadata of the destination commit. The default is True.
.TP
.B convert.git.skipsubmodules
.
does not convert root level .gitmodules files
or files with 160000 mode indicating a submodule. Default is False.
.UNINDENT
.SS Perforce Source
.sp
The Perforce (P4) importer can be given a p4 depot path or a
client specification as source. It will convert all files in the
source to a flat Mercurial repository, ignoring labels, branches
and integrations. Note that when a depot path is given you then
usually should specify a target directory, because otherwise the
target may be named \fB...\-hg\fP.
.sp
The following options can be set with \fB\-\-config\fP:
.INDENT 0.0
.TP
.B convert.p4.encoding
.
specify the encoding to use when decoding standard
output of the Perforce command line tool. The default is default system
encoding.
.TP
.B convert.p4.startrev
.
specify initial Perforce revision (a
Perforce changelist number).
.UNINDENT
.SS Mercurial Destination
.sp
The Mercurial destination will recognize Mercurial subrepositories in the
destination directory, and update the .hgsubstate file automatically if the
destination subrepositories contain the <dest>/<sub>/.hg/shamap file.
Converting a repository with subrepositories requires converting a single
repository at a time, from the bottom up.
.sp
An example showing how to convert a repository with subrepositories:
.sp
.nf
.ft C
# so convert knows the type when it sees a non empty destination
$ hg init converted

$ hg convert orig/sub1 converted/sub1
$ hg convert orig/sub2 converted/sub2
$ hg convert orig converted
.ft P
.fi
.sp
The following options are supported:
.INDENT 0.0
.TP
.B convert.hg.clonebranches
.
dispatch source branches in separate
clones. The default is False.
.TP
.B convert.hg.tagsbranch
.
branch name for tag revisions, defaults to
\fBdefault\fP.
.TP
.B convert.hg.usebranchnames
.
preserve branch names. The default is
True.
.TP
.B convert.hg.sourcename
.
records the given string as a \(aqconvert_source\(aq extra
value on each commit made in the target repository. The default is None.
.TP
.B convert.hg.preserve\-hash
.
only works with mercurial sources. Make convert
prevent performance improvement to the list of modified files in commits
when such an improvement would cause the hash of a commit to change.
The default is False.
.UNINDENT
.SS All Destinations
.sp
All destination types accept the following options:
.INDENT 0.0
.TP
.B convert.skiptags
.
does not convert tags from the source repo to the target
repo. The default is False.
.UNINDENT
.SS Subversion Destination
.sp
Original commit dates are not preserved by default.
.INDENT 0.0
.TP
.B convert.svn.dangerous\-set\-commit\-dates
.
preserve original commit dates,
forcefully setting \fBsvn:date\fP revision properties. This option is
DANGEROUS and may break some subversion functionality for the resulting
repository (e.g. filtering revisions with date ranges in \fBsvn log\fP),
as original commit dates are not guaranteed to be monotonically
increasing.
.UNINDENT
.sp
For commit dates setting to work destination repository must have
\fBpre\-revprop\-change\fP hook configured to allow setting of \fBsvn:date\fP
revision properties. See Subversion documentation for more details.
.sp
Options:
.INDENT 0.0
.TP
.BI \-\-authors \ <FILE>
.
username mapping filename (DEPRECATED) (use \-\-authormap instead)
.TP
.BI \-s,  \-\-source\-type \ <TYPE>
.
source repository type
.TP
.BI \-d,  \-\-dest\-type \ <TYPE>
.
destination repository type
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
import up to source revision REV
.TP
.BI \-A,  \-\-authormap \ <FILE>
.
remap usernames using this file
.TP
.BI \-\-filemap \ <FILE>
.
remap file names using contents of file
.TP
.B \-\-full
.
apply filemap changes by converting all files again
.TP
.BI \-\-splicemap \ <FILE>
.
splice synthesized history into place
.TP
.BI \-\-branchmap \ <FILE>
.
change branch names while converting
.TP
.B \-\-branchsort
.
try to sort changesets by branches
.TP
.B \-\-datesort
.
try to sort changesets by date
.TP
.B \-\-sourcesort
.
preserve source changesets order
.TP
.B \-\-closesort
.
try to reorder closed revisions
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS eol
.sp
automatically manage newlines in repository files
.sp
This extension allows you to manage the type of line endings (CRLF or
LF) that are used in the repository and in the local working
directory. That way you can get CRLF line endings on Windows and LF on
Unix/Mac, thereby letting everybody use their OS native line endings.
.sp
The extension reads its configuration from a versioned \fB.hgeol\fP
configuration file found in the root of the working directory. The
\fB.hgeol\fP file use the same syntax as all other Mercurial
configuration files. It uses two sections, \fB[patterns]\fP and
\fB[repository]\fP.
.sp
The \fB[patterns]\fP section specifies how line endings should be
converted between the working directory and the repository. The format is
specified by a file pattern. The first match is used, so put more
specific patterns first. The available line endings are \fBLF\fP,
\fBCRLF\fP, and \fBBIN\fP.
.sp
Files with the declared format of \fBCRLF\fP or \fBLF\fP are always
checked out and stored in the repository in that format and files
declared to be binary (\fBBIN\fP) are left unchanged. Additionally,
\fBnative\fP is an alias for checking out in the platform\(aqs default line
ending: \fBLF\fP on Unix (including Mac OS X) and \fBCRLF\fP on
Windows. Note that \fBBIN\fP (do nothing to line endings) is Mercurial\(aqs
default behavior; it is only needed if you need to override a later,
more general pattern.
.sp
The optional \fB[repository]\fP section specifies the line endings to
use for files stored in the repository. It has a single setting,
\fBnative\fP, which determines the storage line endings for files
declared as \fBnative\fP in the \fB[patterns]\fP section. It can be set to
\fBLF\fP or \fBCRLF\fP. The default is \fBLF\fP. For example, this means
that on Windows, files configured as \fBnative\fP (\fBCRLF\fP by default)
will be converted to \fBLF\fP when stored in the repository. Files
declared as \fBLF\fP, \fBCRLF\fP, or \fBBIN\fP in the \fB[patterns]\fP section
are always stored as\-is in the repository.
.sp
Example versioned \fB.hgeol\fP file:
.sp
.nf
.ft C
[patterns]
**.py = native
**.vcproj = CRLF
**.txt = native
Makefile = LF
**.jpg = BIN

[repository]
native = LF
.ft P
.fi
.IP Note
.
The rules will first apply when files are touched in the working
directory, e.g. by updating to null and back to tip to touch all files.
.RE
.sp
The extension uses an optional \fB[eol]\fP section read from both the
normal Mercurial configuration files and the \fB.hgeol\fP file, with the
latter overriding the former. You can use that section to control the
overall behavior. There are three settings:
.INDENT 0.0
.IP \(bu 2
.
\fBeol.native\fP (default \fBos.linesep\fP) can be set to \fBLF\fP or
\fBCRLF\fP to override the default interpretation of \fBnative\fP for
checkout. This can be used with \%\fBhg archive\fP\: on Unix, say, to
generate an archive where files have line endings for Windows.
.IP \(bu 2
.
\fBeol.only\-consistent\fP (default True) can be set to False to make
the extension convert files with inconsistent EOLs. Inconsistent
means that there is both \fBCRLF\fP and \fBLF\fP present in the file.
Such files are normally not touched under the assumption that they
have mixed EOLs on purpose.
.IP \(bu 2
.
\fBeol.fix\-trailing\-newline\fP (default False) can be set to True to
ensure that converted files end with a EOL character (either \fB\en\fP
or \fB\er\en\fP as per the configured patterns).
.UNINDENT
.sp
The extension provides \fBcleverencode:\fP and \fBcleverdecode:\fP filters
like the deprecated win32text extension does. This means that you can
disable win32text and enable eol and your filters will still work. You
only need to these filters until you have prepared a \fB.hgeol\fP file.
.sp
The \fBwin32text.forbid*\fP hooks provided by the win32text extension
have been unified into a single hook named \fBeol.checkheadshook\fP. The
hook will lookup the expected line endings from the \fB.hgeol\fP file,
which means you must migrate to a \fB.hgeol\fP file first before using
the hook. \fBeol.checkheadshook\fP only checks heads, intermediate
invalid revisions will be pushed. To forbid them completely, use the
\fBeol.checkallhook\fP hook. These hooks are best used as
\fBpretxnchangegroup\fP hooks.
.sp
See \%\fBhg help patterns\fP\: for more information about the glob patterns
used.
.SS extdiff
.sp
command to allow external programs to compare revisions
.sp
The extdiff Mercurial extension allows you to use external programs
to compare revisions, or revision with working directory. The external
diff programs are called with a configurable set of options and two
non\-option arguments: paths to directories containing snapshots of
files to compare.
.sp
If there is more than one file being compared and the "child" revision
is the working directory, any modifications made in the external diff
program will be copied back to the working directory from the temporary
directory.
.sp
The extdiff extension also allows you to configure new diff commands, so
you do not need to type \%\fBhg extdiff \-p kdiff3\fP\: always.
.sp
.nf
.ft C
[extdiff]
# add new command that runs GNU diff(1) in \(aqcontext diff\(aq mode
cdiff = gdiff \-Nprc5
## or the old way:
#cmd.cdiff = gdiff
#opts.cdiff = \-Nprc5

# add new command called meld, runs meld (no need to name twice).  If
# the meld executable is not available, the meld tool in [merge\-tools]
# will be used, if available
meld =

# add new command called vimdiff, runs gvimdiff with DirDiff plugin
# (see http://www.vim.org/scripts/script.php?script_id=102) Non
# English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
# your .vimrc
vimdiff = gvim \-f "+next" \e
          "+execute \(aqDirDiff\(aq fnameescape(argv(0)) fnameescape(argv(1))"
.ft P
.fi
.sp
Tool arguments can include variables that are expanded at runtime:
.sp
.nf
.ft C
$parent1, $plabel1 \- filename, descriptive label of first parent
$child,   $clabel  \- filename, descriptive label of child revision
$parent2, $plabel2 \- filename, descriptive label of second parent
$root              \- repository root
$parent is an alias for $parent1.
.ft P
.fi
.sp
The extdiff extension will look in your [diff\-tools] and [merge\-tools]
sections for diff tool arguments, when none are specified in [extdiff].
.sp
.nf
.ft C
[extdiff]
kdiff3 =

[diff\-tools]
kdiff3.diffargs=\-\-L1 \(aq$plabel1\(aq \-\-L2 \(aq$clabel\(aq $parent $child
.ft P
.fi
.sp
If a program has a graphical interface, it might be interesting to tell
Mercurial about it. It will prevent the program from being mistakenly
used in a terminal\-only environment (such as an SSH terminal session),
and will make \%\fBhg extdiff \-\-per\-file\fP\: open multiple file diffs at once
instead of one by one (if you still want to open file diffs one by one,
you can use the \-\-confirm option).
.sp
Declaring that a tool has a graphical interface can be done with the
\fBgui\fP flag next to where \fBdiffargs\fP are specified:
.sp
.nf
.ft C
[diff\-tools]
kdiff3.diffargs=\-\-L1 \(aq$plabel1\(aq \-\-L2 \(aq$clabel\(aq $parent $child
kdiff3.gui = true
.ft P
.fi
.sp
You can use \-I/\-X and list of file or directory names like normal
\%\fBhg diff\fP\: command. The extdiff extension makes snapshots of only
needed files, so running the external diff program will actually be
pretty fast (at least faster than having to compare the entire tree).
.SS Commands
.SS File content management
.SS extdiff
.sp
use external program to diff repository (or selected files):
.sp
.nf
.ft C
hg extdiff [OPT]... [FILE]...
.ft P
.fi
.sp
Show differences between revisions for the specified files, using
an external program. The default program used is diff, with
default options "\-Npru".
.sp
To select a different program, use the \-p/\-\-program option. The
program will be passed the names of two directories to compare,
unless the \-\-per\-file option is specified (see below). To pass
additional options to the program, use \-o/\-\-option. These will be
passed before the names of the directories or files to compare.
.sp
The \-\-from, \-\-to, and \-\-change options work the same way they do for
\%\fBhg diff\fP\:.
.sp
The \-\-per\-file option runs the external program repeatedly on each
file to diff, instead of once on two directories. By default,
this happens one by one, where the next file diff is open in the
external program only once the previous external program (for the
previous file diff) has exited. If the external program has a
graphical interface, it can open all the file diffs at once instead
of one by one. See \%\fBhg help \-e extdiff\fP\: for information about how
to tell Mercurial that a given program has a graphical interface.
.sp
The \-\-confirm option will prompt the user before each invocation of
the external program. It is ignored if \-\-per\-file isn\(aqt specified.
.sp
Options:
.INDENT 0.0
.TP
.BI \-p,  \-\-program \ <CMD>
.
comparison program to run
.TP
.BI \-o,  \-\-option \ <OPT[+]>
.
pass option to comparison program
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
revision (DEPRECATED)
.TP
.BI \-\-from \ <REV1>
.
revision to diff from
.TP
.BI \-\-to \ <REV2>
.
revision to diff to
.TP
.BI \-c,  \-\-change \ <REV>
.
change made by revision
.TP
.B \-\-per\-file
.
compare each file instead of revision snapshots
.TP
.B \-\-confirm
.
prompt user before each external program invocation
.TP
.B \-\-patch
.
compare patches for two revisions
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS factotum
.sp
http authentication with factotum
.sp
This extension allows the factotum(4) facility on Plan 9 from Bell Labs
platforms to provide authentication information for HTTP access. Configuration
entries specified in the auth section as well as authentication information
provided in the repository URL are fully supported. If no prefix is specified,
a value of "*" will be assumed.
.sp
By default, keys are specified as:
.sp
.nf
.ft C
proto=pass service=hg prefix=<prefix> user=<username> !password=<password>
.ft P
.fi
.sp
If the factotum extension is unable to read the required key, one will be
requested interactively.
.sp
A configuration section is available to customize runtime behavior. By
default, these entries are:
.sp
.nf
.ft C
[factotum]
executable = /bin/auth/factotum
mountpoint = /mnt/factotum
service = hg
.ft P
.fi
.sp
The executable entry defines the full path to the factotum binary. The
mountpoint entry defines the path to the factotum file service. Lastly, the
service entry controls the service name used when reading keys.
.SS fastannotate
.sp
yet another annotate implementation that might be faster (EXPERIMENTAL)
.sp
The fastannotate extension provides a \(aqfastannotate\(aq command that makes
use of the linelog data structure as a cache layer and is expected to
be faster than the vanilla \(aqannotate\(aq if the cache is present.
.sp
In most cases, fastannotate requires a setup that mainbranch is some pointer
that always moves forward, to be most efficient.
.sp
Using fastannotate together with linkrevcache would speed up building the
annotate cache greatly. Run "debugbuildlinkrevcache" before
"debugbuildannotatecache".
.sp
.nf
.ft C
[fastannotate]
# specify the main branch head. the internal linelog will only contain
# the linear (ignoring p2) "mainbranch". since linelog cannot move
# backwards without a rebuild, this should be something that always moves
# forward, usually it is "master" or "@".
mainbranch = master

# fastannotate supports different modes to expose its feature.
# a list of combination:
# \- fastannotate: expose the feature via the "fastannotate" command which
#   deals with everything in a most efficient way, and provides extra
#   features like \-\-deleted etc.
# \- fctx: replace fctx.annotate implementation. note:
#     a. it is less efficient than the "fastannotate" command
#     b. it will make it practically impossible to access the old (disk
#        side\-effect free) annotate implementation
#     c. it implies "hgweb".
# \- hgweb: replace hgweb\(aqs annotate implementation. conflict with "fctx".
# (default: fastannotate)
modes = fastannotate

# default format when no format flags are used (default: number)
defaultformat = changeset, user, date

# serve the annotate cache via wire protocol (default: False)
# tip: the .hg/fastannotate directory is portable \- can be rsynced
server = True

# build annotate cache on demand for every client request (default: True)
# disabling it could make server response faster, useful when there is a
# cronjob building the cache.
serverbuildondemand = True

# update local annotate cache from remote on demand
client = False

# path to use when connecting to the remote server (default: default)
remotepath = default

# minimal length of the history of a file required to fetch linelog from
# the server. (default: 10)
clientfetchthreshold = 10

# for "fctx" mode, always follow renames regardless of command line option.
# this is a BC with the original command but will reduced the space needed
# for annotate cache, and is useful for client\-server setup since the
# server will only provide annotate cache with default options (i.e. with
# follow). do not affect "fastannotate" mode. (default: True)
forcefollow = True

# for "fctx" mode, always treat file as text files, to skip the "isbinary"
# check. this is consistent with the "fastannotate" command and could help
# to avoid a file fetch if remotefilelog is used. (default: True)
forcetext = True

# use unfiltered repo for better performance.
unfilteredrepo = True

# sacrifice correctness in some corner cases for performance. it does not
# affect the correctness of the annotate cache being built. the option
# is experimental and may disappear in the future (default: False)
perfhack = True
.ft P
.fi
.SS Commands
.SS Uncategorized commands
.SS fastexport
.sp
export repositories as git fast\-import stream
.SS Commands
.SS Change import/export
.SS fastexport
.sp
export repository as git fast\-import stream:
.sp
.nf
.ft C
hg fastexport [OPTION]... [REV]...
.ft P
.fi
.sp
This command lets you dump a repository as a human\-readable text stream.
It can be piped into corresponding import routines like "git fast\-import".
Incremental dumps can be created by using marks files.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
revisions to export
.TP
.BI \-i,  \-\-import\-marks \ <FILE>
.
old marks file to read
.TP
.BI \-e,  \-\-export\-marks \ <FILE>
.
new marks file to write
.TP
.BI \-A,  \-\-authormap \ <FILE>
.
remap usernames using this file
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS fetch
.sp
pull, update and merge in one command (DEPRECATED)
.SS Commands
.SS Remote repository management
.SS fetch
.sp
pull changes from a remote repository, merge new changes if needed.:
.sp
.nf
.ft C
hg fetch [SOURCE]
.ft P
.fi
.sp
This finds all changes from the repository at the specified path
or URL and adds them to the local repository.
.sp
If the pulled changes add a new branch head, the head is
automatically merged, and the result of the merge is committed.
Otherwise, the working directory is updated to include the new
changes.
.sp
When a merge is needed, the working directory is first updated to
the newly pulled changes. Local changes are then merged into the
pulled changes. To switch the merge order, use \-\-switch\-parent.
.sp
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
a specific revision you would like to pull
.TP
.B \-\-edit
.
invoke editor on commit messages
.TP
.B \-\-force\-editor
.
edit commit message (DEPRECATED)
.TP
.B \-\-switch\-parent
.
switch parents when merging
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS fix
.sp
rewrite file content in changesets or working copy (EXPERIMENTAL)
.sp
Provides a command that runs configured tools on the contents of modified files,
writing back any fixes to the working copy or replacing changesets.
.sp
Here is an example configuration that causes \%\fBhg fix\fP\: to apply automatic
formatting fixes to modified lines in C++ code:
.sp
.nf
.ft C
[fix]
clang\-format:command=clang\-format \-\-assume\-filename={rootpath}
clang\-format:linerange=\-\-lines={first}:{last}
clang\-format:pattern=set:**.cpp or **.hpp
.ft P
.fi
.sp
The :command suboption forms the first part of the shell command that will be
used to fix a file. The content of the file is passed on standard input, and the
fixed file content is expected on standard output. Any output on standard error
will be displayed as a warning. If the exit status is not zero, the file will
not be affected. A placeholder warning is displayed if there is a non\-zero exit
status but no standard error output. Some values may be substituted into the
command:
.sp
.nf
.ft C
{rootpath}  The path of the file being fixed, relative to the repo root
{basename}  The name of the file being fixed, without the directory path
.ft P
.fi
.sp
If the :linerange suboption is set, the tool will only be run if there are
changed lines in a file. The value of this suboption is appended to the shell
command once for every range of changed lines in the file. Some values may be
substituted into the command:
.sp
.nf
.ft C
{first}   The 1\-based line number of the first line in the modified range
{last}    The 1\-based line number of the last line in the modified range
.ft P
.fi
.sp
Deleted sections of a file will be ignored by :linerange, because there is no
corresponding line range in the version being fixed.
.sp
By default, tools that set :linerange will only be executed if there is at least
one changed line range. This is meant to prevent accidents like running a code
formatter in such a way that it unexpectedly reformats the whole file. If such a
tool needs to operate on unchanged files, it should set the :skipclean suboption
to false.
.sp
The :pattern suboption determines which files will be passed through each
configured tool. See \%\fBhg help patterns\fP\: for possible values. However, all
patterns are relative to the repo root, even if that text says they are relative
to the current working directory. If there are file arguments to \%\fBhg fix\fP\:, the
intersection of these patterns is used.
.sp
There is also a configurable limit for the maximum size of file that will be
processed by \%\fBhg fix\fP\::
.sp
.nf
.ft C
[fix]
maxfilesize = 2MB
.ft P
.fi
.sp
Normally, execution of configured tools will continue after a failure (indicated
by a non\-zero exit status). It can also be configured to abort after the first
such failure, so that no files will be affected if any tool fails. This abort
will also cause \%\fBhg fix\fP\: to exit with a non\-zero status:
.sp
.nf
.ft C
[fix]
failure = abort
.ft P
.fi
.sp
When multiple tools are configured to affect a file, they execute in an order
defined by the :priority suboption. The priority suboption has a default value
of zero for each tool. Tools are executed in order of descending priority. The
execution order of tools with equal priority is unspecified. For example, you
could use the \(aqsort\(aq and \(aqhead\(aq utilities to keep only the 10 smallest numbers
in a text file by ensuring that \(aqsort\(aq runs before \(aqhead\(aq:
.sp
.nf
.ft C
[fix]
sort:command = sort \-n
head:command = head \-n 10
sort:pattern = numbers.txt
head:pattern = numbers.txt
sort:priority = 2
head:priority = 1
.ft P
.fi
.sp
To account for changes made by each tool, the line numbers used for incremental
formatting are recomputed before executing the next tool. So, each tool may see
different values for the arguments added by the :linerange suboption.
.sp
Each fixer tool is allowed to return some metadata in addition to the fixed file
content. The metadata must be placed before the file content on stdout,
separated from the file content by a zero byte. The metadata is parsed as a JSON
value (so, it should be UTF\-8 encoded and contain no zero bytes). A fixer tool
is expected to produce this metadata encoding if and only if the :metadata
suboption is true:
.sp
.nf
.ft C
[fix]
tool:command = tool \-\-prepend\-json\-metadata
tool:metadata = true
.ft P
.fi
.sp
The metadata values are passed to hooks, which can be used to print summaries or
perform other post\-fixing work. The supported hooks are:
.sp
.nf
.ft C
"postfixfile"
  Run once for each file in each revision where any fixer tools made changes
  to the file content. Provides "$HG_REV" and "$HG_PATH" to identify the file,
  and "$HG_METADATA" with a map of fixer names to metadata values from fixer
  tools that affected the file. Fixer tools that didn\(aqt affect the file have a
  value of None. Only fixer tools that executed are present in the metadata.

"postfix"
  Run once after all files and revisions have been handled. Provides
  "$HG_REPLACEMENTS" with information about what revisions were created and
  made obsolete. Provides a boolean "$HG_WDIRWRITTEN" to indicate whether any
  files in the working copy were updated. Provides a list "$HG_METADATA"
  mapping fixer tool names to lists of metadata values returned from
  executions that modified a file. This aggregates the same metadata
  previously passed to the "postfixfile" hook.
.ft P
.fi
.sp
Fixer tools are run in the repository\(aqs root directory. This allows them to read
configuration files from the working copy, or even write to the working copy.
The working copy is not updated to match the revision being fixed. In fact,
several revisions may be fixed in parallel. Writes to the working copy are not
amended into the revision being fixed; fixer tools should always write fixed
file content back to stdout as documented above.
.SS Commands
.SS File content management
.SS fix
.sp
rewrite file content in changesets or working directory:
.sp
.nf
.ft C
hg fix [OPTION]... [FILE]...
.ft P
.fi
.sp
Runs any configured tools to fix the content of files. Only affects files
with changes, unless file arguments are provided. Only affects changed lines
of files, unless the \-\-whole flag is used. Some tools may always affect the
whole file regardless of \-\-whole.
.sp
If \-\-working\-dir is used, files with uncommitted changes in the working copy
will be fixed. Note that no backup are made.
.sp
If revisions are specified with \-\-source, those revisions and their
descendants will be checked, and they may be replaced with new revisions
that have fixed file content. By automatically including the descendants,
no merging, rebasing, or evolution will be required. If an ancestor of the
working copy is included, then the working copy itself will also be fixed,
and the working copy will be updated to the fixed parent.
.sp
When determining what lines of each file to fix at each revision, the whole
set of revisions being fixed is considered, so that fixes to earlier
revisions are not forgotten in later ones. The \-\-base flag can be used to
override this default behavior, though it is not usually desirable to do so.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-all
.
fix all non\-public non\-obsolete revisions
.TP
.BI \-\-base \ <REV[+]>
.
revisions to diff against (overrides automatic selection, and applies to every revision being fixed)
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
revisions to fix (ADVANCED)
.TP
.BI \-s,  \-\-source \ <REV[+]>
.
fix the specified revisions and their descendants
.TP
.B \-w,  \-\-working\-dir
.
fix the working directory
.TP
.B \-\-whole
.
always fix every line of a file
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS fsmonitor
.sp
Faster status operations with the Watchman file monitor (EXPERIMENTAL)
.sp
Integrates the file\-watching program Watchman with Mercurial to produce faster
status results.
.sp
On a particular Linux system, for a real\-world repository with over 400,000
files hosted on ext4, vanilla \fIhg status\fP takes 1.3 seconds. On the same
system, with fsmonitor it takes about 0.3 seconds.
.sp
fsmonitor requires no configuration \-\- it will tell Watchman about your
repository as necessary. You\(aqll need to install Watchman from
\%https://facebook.github.io/watchman/\: and make sure it is in your PATH.
.sp
fsmonitor is incompatible with the largefiles and eol extensions, and
will disable itself if any of those are active.
.sp
The following configuration options exist:
.sp
.nf
.ft C
[fsmonitor]
mode = {off, on, paranoid}
.ft P
.fi
.sp
When \fImode = off\fP, fsmonitor will disable itself (similar to not loading the
extension at all). When \fImode = on\fP, fsmonitor will be enabled (the default).
When \fImode = paranoid\fP, fsmonitor will query both Watchman and the filesystem,
and ensure that the results are consistent.
.sp
.nf
.ft C
[fsmonitor]
timeout = (float)
.ft P
.fi
.sp
A value, in seconds, that determines how long fsmonitor will wait for Watchman
to return results. Defaults to \fI2.0\fP.
.sp
.nf
.ft C
[fsmonitor]
blacklistusers = (list of userids)
.ft P
.fi
.sp
A list of usernames for which fsmonitor will disable itself altogether.
.sp
.nf
.ft C
[fsmonitor]
walk_on_invalidate = (boolean)
.ft P
.fi
.sp
Whether or not to walk the whole repo ourselves when our cached state has been
invalidated, for example when Watchman has been restarted or .hgignore rules
have been changed. Walking the repo in that case can result in competing for
I/O with Watchman. For large repos it is recommended to set this value to
false. You may wish to set this to true if you have a very fast filesystem
that can outpace the IPC overhead of getting the result data for the full repo
from Watchman. Defaults to false.
.sp
.nf
.ft C
[fsmonitor]
warn_when_unused = (boolean)
.ft P
.fi
.sp
Whether to print a warning during certain operations when fsmonitor would be
beneficial to performance but isn\(aqt enabled.
.sp
.nf
.ft C
[fsmonitor]
warn_update_file_count = (integer)
# or when mercurial is built with rust support
warn_update_file_count_rust = (integer)
.ft P
.fi
.sp
If \fBwarn_when_unused\fP is set and fsmonitor isn\(aqt enabled, a warning will
be printed during working directory updates if this many files will be
created.
.SS git
.sp
grant Mercurial the ability to operate on Git repositories. (EXPERIMENTAL)
.sp
This is currently super experimental. It probably will consume your
firstborn a la Rumpelstiltskin, etc.
.SS githelp
.sp
try mapping git commands to Mercurial commands
.sp
Tries to map a given git command to a Mercurial command:
.INDENT 0.0
.INDENT 3.5
.sp
$ hg githelp \-\- git checkout master
hg update master
.UNINDENT
.UNINDENT
.sp
If an unknown command or parameter combination is detected, an error is
produced.
.SS Commands
.SS Help
.SS githelp
.sp
suggests the Mercurial equivalent of the given git command:
.sp
.nf
.ft C
hg githelp
.ft P
.fi
.sp
Usage: hg githelp \-\- <git command>
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: git
.UNINDENT
.UNINDENT
.SS gpg
.sp
commands to sign and verify changesets
.SS Commands
.SS Signing changes (GPG)
.SS sigcheck
.sp
verify all the signatures there may be for a particular revision:
.sp
.nf
.ft C
hg sigcheck REV
.ft P
.fi
.sp
verify all the signatures there may be for a particular revision
.SS sign
.sp
add a signature for the current or given revision:
.sp
.nf
.ft C
hg sign [OPTION]... [REV]...
.ft P
.fi
.sp
If no revision is given, the parent of the working directory is used,
or tip if no revision is checked out.
.sp
The \fBgpg.cmd\fP config setting can be used to specify the command
to run. A default key can be specified with \fBgpg.key\fP.
.sp
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
.sp
Options:
.INDENT 0.0
.TP
.B \-l,  \-\-local
.
make the signature local
.TP
.B \-f,  \-\-force
.
sign even if the sigfile is modified
.TP
.B \-\-no\-commit
.
do not commit the sigfile after signing
.TP
.BI \-k,  \-\-key \ <ID>
.
the key id to sign with
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.UNINDENT
.SS sigs
.sp
list signed changesets:
.sp
.nf
.ft C
hg sigs
.ft P
.fi
.sp
list signed changesets
.SS graphlog
.sp
command to view revision graphs from a shell (DEPRECATED)
.sp
The functionality of this extension has been include in core Mercurial
since version 2.3. Please use \%\fBhg log \-G ...\fP\: instead.
.sp
This extension adds a \-\-graph option to the incoming, outgoing and log
commands. When this options is given, an ASCII representation of the
revision graph is also shown.
.SS Commands
.SS Change navigation
.SS glog
.sp
show revision history alongside an ASCII revision graph:
.sp
.nf
.ft C
hg glog [OPTION]... [FILE]
.ft P
.fi
.sp
Print a revision history alongside a revision graph drawn with
ASCII characters.
.sp
Nodes printed as an @ character are parents of the working
directory.
.sp
This is an alias to \%\fBhg log \-G\fP\:.
.sp
Options:
.INDENT 0.0
.TP
.B \-f,  \-\-follow
.
follow changeset history, or file history across copies and renames
.TP
.B \-\-follow\-first
.
only follow the first parent of merge changesets (DEPRECATED)
.TP
.BI \-d,  \-\-date \ <DATE>
.
show revisions matching date spec
.TP
.B \-C,  \-\-copies
.
show copied files
.TP
.BI \-k,  \-\-keyword \ <TEXT[+]>
.
do case\-insensitive search for a given text
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
show the specified revision or revset
.TP
.B \-\-removed
.
include revisions where files were removed
.TP
.B \-m,  \-\-only\-merges
.
show only merges (DEPRECATED)
.TP
.BI \-u,  \-\-user \ <USER[+]>
.
revisions committed by user
.TP
.BI \-\-only\-branch \ <BRANCH[+]>
.
show only changesets within the given named branch (DEPRECATED)
.TP
.BI \-b,  \-\-branch \ <BRANCH[+]>
.
show changesets within the given named branch
.TP
.BI \-P,  \-\-prune \ <REV[+]>
.
do not display revision or any of its ancestors
.TP
.B \-p,  \-\-patch
.
show patch
.TP
.B \-g,  \-\-git
.
use git extended diff format
.TP
.BI \-l,  \-\-limit \ <NUM>
.
limit number of changes displayed
.TP
.B \-M,  \-\-no\-merges
.
do not show merges
.TP
.B \-\-stat
.
output diffstat\-style summary of changes
.TP
.B \-G,  \-\-graph
.
show the revision DAG
.TP
.BI \-\-style \ <STYLE>
.
display using template map file (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS hgk
.sp
browse the repository in a graphical way
.sp
The hgk extension allows browsing the history of a repository in a
graphical way. It requires Tcl/Tk version 8.4 or later. (Tcl/Tk is not
distributed with Mercurial.)
.sp
hgk consists of two parts: a Tcl script that does the displaying and
querying of information, and an extension to Mercurial named hgk.py,
which provides hooks for hgk to get information. hgk can be found in
the contrib directory, and the extension is shipped in the hgext
repository, and needs to be enabled.
.sp
The \%\fBhg view\fP\: command will launch the hgk Tcl script. For this command
to work, hgk must be in your search path. Alternately, you can specify
the path to hgk in your configuration file:
.sp
.nf
.ft C
[hgk]
path = /location/of/hgk
.ft P
.fi
.sp
hgk can make use of the extdiff extension to visualize revisions.
Assuming you had already configured extdiff vdiff command, just add:
.sp
.nf
.ft C
[hgk]
vdiff=vdiff
.ft P
.fi
.sp
Revisions context menu will now display additional entries to fire
vdiff on hovered and selected revisions.
.SS Commands
.SS Change navigation
.SS view
.sp
start interactive history viewer:
.sp
.nf
.ft C
hg view [\-l LIMIT] [REVRANGE]
.ft P
.fi
.sp
start interactive history viewer
.sp
Options:
.INDENT 0.0
.TP
.BI \-l,  \-\-limit \ <NUM>
.
limit number of changes displayed
.UNINDENT
.SS Uncategorized commands
.SS highlight
.sp
syntax highlighting for hgweb (requires Pygments)
.sp
It depends on the Pygments syntax highlighting library:
\%http://pygments.org/\:
.sp
There are the following configuration options:
.sp
.nf
.ft C
[web]
pygments_style = <style> (default: colorful)
highlightfiles = <fileset> (default: size(\(aq<5M\(aq))
highlightonlymatchfilename = <bool> (default False)
.ft P
.fi
.sp
\fBhighlightonlymatchfilename\fP will only highlight files if their type could
be identified by their filename. When this is not enabled (the default),
Pygments will try very hard to identify the file type from content and any
match (even matches with a low confidence score) will be used.
.SS histedit
.sp
interactive history editing
.sp
With this extension installed, Mercurial gains one new command: histedit. Usage
is as follows, assuming the following history:
.sp
.nf
.ft C
@  3[tip]   7c2fd3b9020c   2009\-04\-27 18:04 \-0500   durin42
|    Add delta
|
o  2   030b686bedc4   2009\-04\-27 18:04 \-0500   durin42
|    Add gamma
|
o  1   c561b4e977df   2009\-04\-27 18:04 \-0500   durin42
|    Add beta
|
o  0   d8d2fcd0e319   2009\-04\-27 18:04 \-0500   durin42
     Add alpha
.ft P
.fi
.sp
If you were to run \fBhg histedit c561b4e977df\fP, you would see the following
file open in your editor:
.sp
.nf
.ft C
pick c561b4e977df Add beta
pick 030b686bedc4 Add gamma
pick 7c2fd3b9020c Add delta

# Edit history between c561b4e977df and 7c2fd3b9020c
#
# Commits are listed from least to most recent
#
# Commands:
#  p, pick = use commit
#  e, edit = use commit, but allow edits before making new commit
#  f, fold = use commit, but combine it with the one above
#  r, roll = like fold, but discard this commit\(aqs description and date
#  d, drop = remove commit from history
#  m, mess = edit commit message without changing commit content
#  b, base = checkout changeset and apply further changesets from there
#
.ft P
.fi
.sp
In this file, lines beginning with \fB#\fP are ignored. You must specify a rule
for each revision in your history. For example, if you had meant to add gamma
before beta, and then wanted to add delta in the same revision as beta, you
would reorganize the file to look like this:
.sp
.nf
.ft C
pick 030b686bedc4 Add gamma
pick c561b4e977df Add beta
fold 7c2fd3b9020c Add delta

# Edit history between c561b4e977df and 7c2fd3b9020c
#
# Commits are listed from least to most recent
#
# Commands:
#  p, pick = use commit
#  e, edit = use commit, but allow edits before making new commit
#  f, fold = use commit, but combine it with the one above
#  r, roll = like fold, but discard this commit\(aqs description and date
#  d, drop = remove commit from history
#  m, mess = edit commit message without changing commit content
#  b, base = checkout changeset and apply further changesets from there
#
.ft P
.fi
.sp
At which point you close the editor and \fBhistedit\fP starts working. When you
specify a \fBfold\fP operation, \fBhistedit\fP will open an editor when it folds
those revisions together, offering you a chance to clean up the commit message:
.sp
.nf
.ft C
Add beta
***
Add delta
.ft P
.fi
.sp
Edit the commit message to your liking, then close the editor. The date used
for the commit will be the later of the two commits\(aq dates. For this example,
let\(aqs assume that the commit message was changed to \fBAdd beta and delta.\fP
After histedit has run and had a chance to remove any old or temporary
revisions it needed, the history looks like this:
.sp
.nf
.ft C
@  2[tip]   989b4d060121   2009\-04\-27 18:04 \-0500   durin42
|    Add beta and delta.
|
o  1   081603921c3f   2009\-04\-27 18:04 \-0500   durin42
|    Add gamma
|
o  0   d8d2fcd0e319   2009\-04\-27 18:04 \-0500   durin42
     Add alpha
.ft P
.fi
.sp
Note that \fBhistedit\fP does \fInot\fP remove any revisions (even its own temporary
ones) until after it has completed all the editing operations, so it will
probably perform several strip operations when it\(aqs done. For the above example,
it had to run strip twice. Strip can be slow depending on a variety of factors,
so you might need to be a little patient. You can choose to keep the original
revisions by passing the \fB\-\-keep\fP flag.
.sp
The \fBedit\fP operation will drop you back to a command prompt,
allowing you to edit files freely, or even use \fBhg record\fP to commit
some changes as a separate commit. When you\(aqre done, any remaining
uncommitted changes will be committed as well. When done, run \fBhg
histedit \-\-continue\fP to finish this step. If there are uncommitted
changes, you\(aqll be prompted for a new commit message, but the default
commit message will be the original message for the \fBedit\fP ed
revision, and the date of the original commit will be preserved.
.sp
The \fBmessage\fP operation will give you a chance to revise a commit
message without changing the contents. It\(aqs a shortcut for doing
\fBedit\fP immediately followed by \fIhg histedit \-\-continue\(ga\fP.
.sp
If \fBhistedit\fP encounters a conflict when moving a revision (while
handling \fBpick\fP or \fBfold\fP), it\(aqll stop in a similar manner to
\fBedit\fP with the difference that it won\(aqt prompt you for a commit
message when done. If you decide at this point that you don\(aqt like how
much work it will be to rearrange history, or that you made a mistake,
you can use \fBhg histedit \-\-abort\fP to abandon the new changes you
have made and return to the state before you attempted to edit your
history.
.sp
If we clone the histedit\-ed example repository above and add four more
changes, such that we have the following history:
.sp
.nf
.ft C
@  6[tip]   038383181893   2009\-04\-27 18:04 \-0500   stefan
|    Add theta
|
o  5   140988835471   2009\-04\-27 18:04 \-0500   stefan
|    Add eta
|
o  4   122930637314   2009\-04\-27 18:04 \-0500   stefan
|    Add zeta
|
o  3   836302820282   2009\-04\-27 18:04 \-0500   stefan
|    Add epsilon
|
o  2   989b4d060121   2009\-04\-27 18:04 \-0500   durin42
|    Add beta and delta.
|
o  1   081603921c3f   2009\-04\-27 18:04 \-0500   durin42
|    Add gamma
|
o  0   d8d2fcd0e319   2009\-04\-27 18:04 \-0500   durin42
     Add alpha
.ft P
.fi
.sp
If you run \fBhg histedit \-\-outgoing\fP on the clone then it is the same
as running \fBhg histedit 836302820282\fP. If you need plan to push to a
repository that Mercurial does not detect to be related to the source
repo, you can add a \fB\-\-force\fP option.
.SS Config
.sp
Histedit rule lines are truncated to 80 characters by default. You
can customize this behavior by setting a different length in your
configuration file:
.sp
.nf
.ft C
[histedit]
linelen = 120      # truncate rule lines at 120 characters
.ft P
.fi
.sp
The summary of a change can be customized as well:
.sp
.nf
.ft C
[histedit]
summary\-template = \(aq{rev} {bookmarks} {desc|firstline}\(aq
.ft P
.fi
.sp
The customized summary should be kept short enough that rule lines
will fit in the configured line length. See above if that requires
customization.
.sp
\fBhg histedit\fP attempts to automatically choose an appropriate base
revision to use. To change which base revision is used, define a
revset in your configuration file:
.sp
.nf
.ft C
[histedit]
defaultrev = only(.) & draft()
.ft P
.fi
.sp
By default each edited revision needs to be present in histedit commands.
To remove revision you need to use \fBdrop\fP operation. You can configure
the drop to be implicit for missing commits by adding:
.sp
.nf
.ft C
[histedit]
dropmissing = True
.ft P
.fi
.sp
By default, histedit will close the transaction after each action. For
performance purposes, you can configure histedit to use a single transaction
across the entire histedit. WARNING: This setting introduces a significant risk
of losing the work you\(aqve done in a histedit if the histedit aborts
unexpectedly:
.sp
.nf
.ft C
[histedit]
singletransaction = True
.ft P
.fi
.SS Commands
.SS Change manipulation
.SS histedit
.sp
interactively edit changeset history:
.sp
.nf
.ft C
hg histedit [OPTIONS] ([ANCESTOR] | \-\-outgoing [URL])
.ft P
.fi
.sp
This command lets you edit a linear series of changesets (up to
and including the working directory, which should be clean).
You can:
.INDENT 0.0
.IP \(bu 2
.
\fIpick\fP to [re]order a changeset
.IP \(bu 2
.
\fIdrop\fP to omit changeset
.IP \(bu 2
.
\fImess\fP to reword the changeset commit message
.IP \(bu 2
.
\fIfold\fP to combine it with the preceding changeset (using the later date)
.IP \(bu 2
.
\fIroll\fP like fold, but discarding this commit\(aqs description and date
.IP \(bu 2
.
\fIedit\fP to edit this changeset (preserving date)
.IP \(bu 2
.
\fIbase\fP to checkout changeset and apply further changesets from there
.UNINDENT
.sp
There are a number of ways to select the root changeset:
.INDENT 0.0
.IP \(bu 2
.
Specify ANCESTOR directly
.IP \(bu 2
.
Use \-\-outgoing \-\- it will be the first linear changeset not
included in destination. (See \%\fBhg help config.paths.default\-push\fP\:)
.IP \(bu 2
.
Otherwise, the value from the "histedit.defaultrev" config option
is used as a revset to select the base revision when ANCESTOR is not
specified. The first revision returned by the revset is used. By
default, this selects the editable history that is unique to the
ancestry of the working directory.
.UNINDENT
.sp
If you use \-\-outgoing, this command will abort if there are ambiguous
outgoing revisions. For example, if there are multiple branches
containing outgoing revisions.
.sp
Use "min(outgoing() and ::.)" or similar revset specification
instead of \-\-outgoing to specify edit target revision exactly in
such ambiguous situation. See \%\fBhg help revsets\fP\: for detail about
selecting revisions.
.sp
Examples:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
.
A number of changes have been made.
Revision 3 is no longer needed.
.sp
Start history editing from revision 3:
.sp
.nf
.ft C
hg histedit \-r 3
.ft P
.fi
.sp
An editor opens, containing the list of revisions,
with specific actions specified:
.sp
.nf
.ft C
pick 5339bf82f0ca 3 Zworgle the foobar
pick 8ef592ce7cc4 4 Bedazzle the zerlog
pick 0a9639fcda9d 5 Morgify the cromulancy
.ft P
.fi
.sp
Additional information about the possible actions
to take appears below the list of revisions.
.sp
To remove revision 3 from the history,
its action (at the beginning of the relevant line)
is changed to \(aqdrop\(aq:
.sp
.nf
.ft C
drop 5339bf82f0ca 3 Zworgle the foobar
pick 8ef592ce7cc4 4 Bedazzle the zerlog
pick 0a9639fcda9d 5 Morgify the cromulancy
.ft P
.fi
.IP \(bu 2
.
A number of changes have been made.
Revision 2 and 4 need to be swapped.
.sp
Start history editing from revision 2:
.sp
.nf
.ft C
hg histedit \-r 2
.ft P
.fi
.sp
An editor opens, containing the list of revisions,
with specific actions specified:
.sp
.nf
.ft C
pick 252a1af424ad 2 Blorb a morgwazzle
pick 5339bf82f0ca 3 Zworgle the foobar
pick 8ef592ce7cc4 4 Bedazzle the zerlog
.ft P
.fi
.sp
To swap revision 2 and 4, its lines are swapped
in the editor:
.sp
.nf
.ft C
pick 8ef592ce7cc4 4 Bedazzle the zerlog
pick 5339bf82f0ca 3 Zworgle the foobar
pick 252a1af424ad 2 Blorb a morgwazzle
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.sp
Returns 0 on success, 1 if user intervention is required (not only
for intentional "edit" command, but also for resolving unexpected
conflicts).
.sp
Options:
.INDENT 0.0
.TP
.BI \-\-commands \ <FILE>
.
read history edits from the specified file
.TP
.B \-c,  \-\-continue
.
continue an edit already in progress
.TP
.B \-\-edit\-plan
.
edit remaining actions list
.TP
.B \-k,  \-\-keep
.
don\(aqt strip old nodes after edit is complete
.TP
.B \-\-abort
.
abort an edit in progress
.TP
.B \-o,  \-\-outgoing
.
changesets not found in destination
.TP
.B \-f,  \-\-force
.
force outgoing even for unrelated repositories
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
first revision to be edited
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS hooklib
.sp
collection of simple hooks for common tasks (EXPERIMENTAL)
.sp
This extension provides a number of simple hooks to handle issues
commonly found in repositories with many contributors:
\- email notification when changesets move from draft to public phase
\- email notification when changesets are obsoleted
\- enforcement of draft phase for all incoming changesets
\- enforcement of a no\-branch\-merge policy
\- enforcement of a no\-multiple\-heads policy
.sp
The implementation of the hooks is subject to change, e.g. whether to
implement them as individual hooks or merge them into the notify
extension as option. The functionality itself is planned to be supported
long\-term.
.SS infinitepush
.INDENT 0.0
.INDENT 3.5
.sp
store some pushes in a remote blob store on the server (EXPERIMENTAL)
.UNINDENT
.UNINDENT
.sp
IMPORTANT: if you use this extension, please contact
\%mercurial\-devel@mercurial\-scm.org\: ASAP. This extension is believed to
be unused and barring learning of users of this functionality, we will
delete this code at the end of 2020.
.INDENT 0.0
.INDENT 3.5
.sp
[infinitepush]
# Server\-side and client\-side option. Pattern of the infinitepush bookmark
branchpattern = PATTERN
.sp
# Server or client
server = False
.sp
# Server\-side option. Possible values: \(aqdisk\(aq or \(aqsql\(aq. Fails if not set
indextype = disk
.sp
# Server\-side option. Used only if indextype=sql.
# Format: \(aqIP:PORT:DB_NAME:USER:PASSWORD\(aq
sqlhost = IP:PORT:DB_NAME:USER:PASSWORD
.sp
# Server\-side option. Used only if indextype=disk.
# Filesystem path to the index store
indexpath = PATH
.sp
# Server\-side option. Possible values: \(aqdisk\(aq or \(aqexternal\(aq
# Fails if not set
storetype = disk
.sp
# Server\-side option.
# Path to the binary that will save bundle to the bundlestore
# Formatted cmd line will be passed to it (see \fIput_args\fP)
put_binary = put
.sp
# Serser\-side option. Used only if storetype=external.
# Format cmd\-line string for put binary. Placeholder: {filename}
put_args = {filename}
.sp
# Server\-side option.
# Path to the binary that get bundle from the bundlestore.
# Formatted cmd line will be passed to it (see \fIget_args\fP)
get_binary = get
.sp
# Serser\-side option. Used only if storetype=external.
# Format cmd\-line string for get binary. Placeholders: {filename} {handle}
get_args = {filename} {handle}
.sp
# Server\-side option
logfile = FIlE
.sp
# Server\-side option
loglevel = DEBUG
.sp
# Server\-side option. Used only if indextype=sql.
# Sets mysql wait_timeout option.
waittimeout = 300
.sp
# Server\-side option. Used only if indextype=sql.
# Sets mysql innodb_lock_wait_timeout option.
locktimeout = 120
.sp
# Server\-side option. Used only if indextype=sql.
# Name of the repository
reponame = \(aq\(aq
.sp
# Client\-side option. Used by \-\-list\-remote option. List of remote scratch
# patterns to list if no patterns are specified.
defaultremotepatterns = [\(aq*\(aq]
.sp
# Instructs infinitepush to forward all received bundle2 parts to the
# bundle for storage. Defaults to False.
storeallparts = True
.sp
# routes each incoming push to the bundlestore. defaults to False
pushtobundlestore = True
.sp
[remotenames]
# Client\-side option
# This option should be set only if remotenames extension is enabled.
# Whether remote bookmarks are tracked by remotenames extension.
bookmarks = True
.UNINDENT
.UNINDENT
.SS journal
.sp
track previous positions of bookmarks (EXPERIMENTAL)
.sp
This extension adds a new command: \fIhg journal\fP, which shows you where
bookmarks were previously located.
.SS Commands
.SS Change organization
.SS journal
.sp
show the previous position of bookmarks and the working copy:
.sp
.nf
.ft C
hg journal [OPTION]... [BOOKMARKNAME]
.ft P
.fi
.sp
The journal is used to see the previous commits that bookmarks and the
working copy pointed to. By default the previous locations for the working
copy.  Passing a bookmark name will show all the previous positions of
that bookmark. Use the \-\-all switch to show previous locations for all
bookmarks and the working copy; each line will then include the bookmark
name, or \(aq.\(aq for the working copy, as well.
.sp
If \fIname\fP starts with \fIre:\fP, the remainder of the name is treated as
a regular expression. To match a name that actually starts with \fIre:\fP,
use the prefix \fIliteral:\fP.
.sp
By default hg journal only shows the commit hash and the command that was
running at that time. \-v/\-\-verbose will show the prior hash, the user, and
the time at which it happened.
.sp
Use \-c/\-\-commits to output log information on each commit hash; at this
point you can use the usual \fI\-\-patch\fP, \fI\-\-git\fP, \fI\-\-stat\fP and \fI\-\-template\fP
switches to alter the log output for these.
.sp
\fIhg journal \-T json\fP can be used to produce machine readable output.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-all
.
show history for all names
.TP
.B \-c,  \-\-commits
.
show commit metadata
.TP
.B \-p,  \-\-patch
.
show patch
.TP
.B \-g,  \-\-git
.
use git extended diff format
.TP
.BI \-l,  \-\-limit \ <NUM>
.
limit number of changes displayed
.TP
.B \-\-stat
.
output diffstat\-style summary of changes
.TP
.BI \-\-style \ <STYLE>
.
display using template map file (DEPRECATED)
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS keyword
.sp
expand keywords in tracked files
.sp
This extension expands RCS/CVS\-like or self\-customized $Keywords$ in
tracked text files selected by your configuration.
.sp
Keywords are only expanded in local repositories and not stored in the
change history. The mechanism can be regarded as a convenience for the
current user or for archive distribution.
.sp
Keywords expand to the changeset data pertaining to the latest change
relative to the working directory parent of each file.
.sp
Configuration is done in the [keyword], [keywordset] and [keywordmaps]
sections of hgrc files.
.sp
Example:
.sp
.nf
.ft C
[keyword]
# expand keywords in every python file except those matching "x*"
**.py =
x*    = ignore

[keywordset]
# prefer svn\- over cvs\-like default keywordmaps
svn = True
.ft P
.fi
.IP Note
.
The more specific you are in your filename patterns the less you
lose speed in huge repositories.
.RE
.sp
For [keywordmaps] template mapping and expansion demonstration and
control run \%\fBhg kwdemo\fP\:. See \%\fBhg help templates\fP\: for a list of
available templates and filters.
.sp
Three additional date template filters are provided:
.INDENT 0.0
.TP
.B \fButcdate\fP
.sp
"2006/09/18 15:13:13"
.TP
.B \fBsvnutcdate\fP
.sp
"2006\-09\-18 15:13:13Z"
.TP
.B \fBsvnisodate\fP
.sp
"2006\-09\-18 08:13:13 \-700 (Mon, 18 Sep 2006)"
.UNINDENT
.sp
The default template mappings (view with \%\fBhg kwdemo \-d\fP\:) can be
replaced with customized keywords and templates. Again, run
\%\fBhg kwdemo\fP\: to control the results of your configuration changes.
.sp
Before changing/disabling active keywords, you must run \%\fBhg kwshrink\fP\:
to avoid storing expanded keywords in the change history.
.sp
To force expansion after enabling it, or a configuration change, run
\%\fBhg kwexpand\fP\:.
.sp
Expansions spanning more than one line and incremental expansions,
like CVS\(aq $Log$, are not supported. A keyword template map "Log =
{desc}" expands to the first line of the changeset description.
.SS Commands
.SS Uncategorized commands
.SS kwdemo
.sp
print [keywordmaps] configuration and an expansion example:
.sp
.nf
.ft C
hg kwdemo [\-d] [\-f RCFILE] [TEMPLATEMAP]...
.ft P
.fi
.sp
Show current, custom, or default keyword template maps and their
expansions.
.sp
Extend the current configuration by specifying maps as arguments
and using \-f/\-\-rcfile to source an external hgrc file.
.sp
Use \-d/\-\-default to disable current configuration.
.sp
See \%\fBhg help templates\fP\: for information on templates and filters.
.sp
Options:
.INDENT 0.0
.TP
.B \-d,  \-\-default
.
show default keyword template maps
.TP
.BI \-f,  \-\-rcfile \ <FILE>
.
read maps from rcfile
.UNINDENT
.SS kwexpand
.sp
expand keywords in the working directory:
.sp
.nf
.ft C
hg kwexpand [OPTION]... [FILE]...
.ft P
.fi
.sp
Run after (re)enabling keyword expansion.
.sp
kwexpand refuses to run if given files contain local changes.
.sp
Options:
.INDENT 0.0
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS kwfiles
.sp
show files configured for keyword expansion:
.sp
.nf
.ft C
hg kwfiles [OPTION]... [FILE]...
.ft P
.fi
.sp
List which files in the working directory are matched by the
[keyword] configuration patterns.
.sp
Useful to prevent inadvertent keyword expansion and to speed up
execution by including only files that are actual candidates for
expansion.
.sp
See \%\fBhg help keyword\fP\: on how to construct patterns both for
inclusion and exclusion of files.
.sp
With \-A/\-\-all and \-v/\-\-verbose the codes used to show the status
of files are:
.sp
.nf
.ft C
K = keyword expansion candidate
k = keyword expansion candidate (not tracked)
I = ignored
i = ignored (not tracked)
.ft P
.fi
.sp
Options:
.INDENT 0.0
.TP
.B \-A,  \-\-all
.
show keyword status flags of all files
.TP
.B \-i,  \-\-ignore
.
show files excluded from expansion
.TP
.B \-u,  \-\-unknown
.
only show unknown (not tracked) files
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS kwshrink
.sp
revert expanded keywords in the working directory:
.sp
.nf
.ft C
hg kwshrink [OPTION]... [FILE]...
.ft P
.fi
.sp
Must be run before changing/disabling active keywords.
.sp
kwshrink refuses to run if given files contain local changes.
.sp
Options:
.INDENT 0.0
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS largefiles
.sp
track large binary files
.sp
Large binary files tend to be not very compressible, not very
diffable, and not at all mergeable. Such files are not handled
efficiently by Mercurial\(aqs storage format (revlog), which is based on
compressed binary deltas; storing large binary files as regular
Mercurial files wastes bandwidth and disk space and increases
Mercurial\(aqs memory usage. The largefiles extension addresses these
problems by adding a centralized client\-server layer on top of
Mercurial: largefiles live in a \fIcentral store\fP out on the network
somewhere, and you only fetch the revisions that you need when you
need them.
.sp
largefiles works by maintaining a "standin file" in .hglf/ for each
largefile. The standins are small (41 bytes: an SHA\-1 hash plus
newline) and are tracked by Mercurial. Largefile revisions are
identified by the SHA\-1 hash of their contents, which is written to
the standin. largefiles uses that revision ID to get/put largefile
revisions from/to the central store. This saves both disk space and
bandwidth, since you don\(aqt need to retrieve all historical revisions
of large files when you clone or pull.
.sp
To start a new repository or add new large binary files, just add
\-\-large to your \%\fBhg add\fP\: command. For example:
.sp
.nf
.ft C
$ dd if=/dev/urandom of=randomdata count=2000
$ hg add \-\-large randomdata
$ hg commit \-m "add randomdata as a largefile"
.ft P
.fi
.sp
When you push a changeset that adds/modifies largefiles to a remote
repository, its largefile revisions will be uploaded along with it.
Note that the remote Mercurial must also have the largefiles extension
enabled for this to work.
.sp
When you pull a changeset that affects largefiles from a remote
repository, the largefiles for the changeset will by default not be
pulled down. However, when you update to such a revision, any
largefiles needed by that revision are downloaded and cached (if
they have never been downloaded before). One way to pull largefiles
when pulling is thus to use \-\-update, which will update your working
copy to the latest pulled revision (and thereby downloading any new
largefiles).
.sp
If you want to pull largefiles you don\(aqt need for update yet, then
you can use pull with the \fI\-\-lfrev\fP option or the \%\fBhg lfpull\fP\: command.
.sp
If you know you are pulling from a non\-default location and want to
download all the largefiles that correspond to the new changesets at
the same time, then you can pull with \fI\-\-lfrev "pulled()"\fP.
.sp
If you just want to ensure that you will have the largefiles needed to
merge or rebase with new heads that you are pulling, then you can pull
with \fI\-\-lfrev "head(pulled())"\fP flag to pre\-emptively download any largefiles
that are new in the heads you are pulling.
.sp
Keep in mind that network access may now be required to update to
changesets that you have not previously updated to. The nature of the
largefiles extension means that updating is no longer guaranteed to
be a local\-only operation.
.sp
If you already have large files tracked by Mercurial without the
largefiles extension, you will need to convert your repository in
order to benefit from largefiles. This is done with the
\%\fBhg lfconvert\fP\: command:
.sp
.nf
.ft C
$ hg lfconvert \-\-size 10 oldrepo newrepo
.ft P
.fi
.sp
In repositories that already have largefiles in them, any new file
over 10MB will automatically be added as a largefile. To change this
threshold, set \fBlargefiles.minsize\fP in your Mercurial config file
to the minimum size in megabytes to track as a largefile, or use the
\-\-lfsize option to the add command (also in megabytes):
.sp
.nf
.ft C
[largefiles]
minsize = 2

$ hg add \-\-lfsize 2
.ft P
.fi
.sp
The \fBlargefiles.patterns\fP config option allows you to specify a list
of filename patterns (see \%\fBhg help patterns\fP\:) that should always be
tracked as largefiles:
.sp
.nf
.ft C
[largefiles]
patterns =
  *.jpg
  re:.*\e.(png|bmp)$
  library.zip
  content/audio/*
.ft P
.fi
.sp
Files that match one of these patterns will be added as largefiles
regardless of their size.
.sp
The \fBlargefiles.minsize\fP and \fBlargefiles.patterns\fP config options
will be ignored for any repositories not already containing a
largefile. To add the first largefile to a repository, you must
explicitly do so with the \-\-large flag passed to the \%\fBhg add\fP\:
command.
.SS Commands
.SS Uncategorized commands
.SS lfconvert
.sp
convert a normal repository to a largefiles repository:
.sp
.nf
.ft C
hg lfconvert SOURCE DEST [FILE ...]
.ft P
.fi
.sp
Convert repository SOURCE to a new repository DEST, identical to
SOURCE except that certain files will be converted as largefiles:
specifically, any file that matches any PATTERN \fIor\fP whose size is
above the minimum size threshold is converted as a largefile. The
size used to determine whether or not to track a file as a
largefile is the size of the first version of the file. The
minimum size can be specified either with \-\-size or in
configuration as \fBlargefiles.size\fP.
.sp
After running this command you will need to make sure that
largefiles is enabled anywhere you intend to push the new
repository.
.sp
Use \-\-to\-normal to convert largefiles back to normal files; after
this, the DEST repository can be used without largefiles at all.
.sp
Options:
.INDENT 0.0
.TP
.BI \-s,  \-\-size \ <SIZE>
.
minimum size (MB) for files to be converted as largefiles
.TP
.B \-\-to\-normal
.
convert from a largefiles repo to a normal repo
.UNINDENT
.SS lfpull
.sp
pull largefiles for the specified revisions from the specified source:
.sp
.nf
.ft C
hg lfpull \-r REV... [\-e CMD] [\-\-remotecmd CMD] [SOURCE]
.ft P
.fi
.sp
Pull largefiles that are referenced from local changesets but missing
locally, pulling from a remote repository to the local cache.
.sp
If SOURCE is omitted, the \(aqdefault\(aq path will be used.
See \%\fBhg help urls\fP\: for more information.
.sp
Some examples:
.INDENT 0.0
.IP \(bu 2
.
pull largefiles for all branch heads:
.sp
.nf
.ft C
hg lfpull \-r "head() and not closed()"
.ft P
.fi
.IP \(bu 2
.
pull largefiles on the default branch:
.sp
.nf
.ft C
hg lfpull \-r "branch(default)"
.ft P
.fi
.UNINDENT
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <VALUE[+]>
.
pull largefiles for these revisions
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS lfs
.sp
lfs \- large file support (EXPERIMENTAL)
.sp
This extension allows large files to be tracked outside of the normal
repository storage and stored on a centralized server, similar to the
\fBlargefiles\fP extension.  The \fBgit\-lfs\fP protocol is used when
communicating with the server, so existing git infrastructure can be
harnessed.  Even though the files are stored outside of the repository,
they are still integrity checked in the same manner as normal files.
.sp
The files stored outside of the repository are downloaded on demand,
which reduces the time to clone, and possibly the local disk usage.
This changes fundamental workflows in a DVCS, so careful thought
should be given before deploying it.  \%\fBhg convert\fP\: can be used to
convert LFS repositories to normal repositories that no longer
require this extension, and do so without changing the commit hashes.
This allows the extension to be disabled if the centralized workflow
becomes burdensome.  However, the pre and post convert clones will
not be able to communicate with each other unless the extension is
enabled on both.
.sp
To start a new repository, or to add LFS files to an existing one, just
create an \fB.hglfs\fP file as described below in the root directory of
the repository.  Typically, this file should be put under version
control, so that the settings will propagate to other repositories with
push and pull.  During any commit, Mercurial will consult this file to
determine if an added or modified file should be stored externally.  The
type of storage depends on the characteristics of the file at each
commit.  A file that is near a size threshold may switch back and forth
between LFS and normal storage, as needed.
.sp
Alternately, both normal repositories and largefile controlled
repositories can be converted to LFS by using \%\fBhg convert\fP\: and the
\fBlfs.track\fP config option described below.  The \fB.hglfs\fP file
should then be created and added, to control subsequent LFS selection.
The hashes are also unchanged in this case.  The LFS and non\-LFS
repositories can be distinguished because the LFS repository will
abort any command if this extension is disabled.
.sp
Committed LFS files are held locally, until the repository is pushed.
Prior to pushing the normal repository data, the LFS files that are
tracked by the outgoing commits are automatically uploaded to the
configured central server.  No LFS files are transferred on
\%\fBhg pull\fP\: or \%\fBhg clone\fP\:.  Instead, the files are downloaded on
demand as they need to be read, if a cached copy cannot be found
locally.  Both committing and downloading an LFS file will link the
file to a usercache, to speed up future access.  See the \fIusercache\fP
config setting described below.
.sp
The extension reads its configuration from a versioned \fB.hglfs\fP
configuration file found in the root of the working directory. The
\fB.hglfs\fP file uses the same syntax as all other Mercurial
configuration files. It uses a single section, \fB[track]\fP.
.sp
The \fB[track]\fP section specifies which files are stored as LFS (or
not). Each line is keyed by a file pattern, with a predicate value.
The first file pattern match is used, so put more specific patterns
first.  The available predicates are \fBall()\fP, \fBnone()\fP, and
\fBsize()\fP. See "hg help filesets.size" for the latter.
.sp
Example versioned \fB.hglfs\fP file:
.sp
.nf
.ft C
[track]
# No Makefile or python file, anywhere, will be LFS
**Makefile = none()
**.py = none()

**.zip = all()
**.exe = size(">1MB")

# Catchall for everything not matched above
** = size(">10MB")
.ft P
.fi
.sp
Configs:
.sp
.nf
.ft C
[lfs]
# Remote endpoint. Multiple protocols are supported:
# \- http(s)://user:pass@example.com/path
#   git\-lfs endpoint
# \- file:///tmp/path
#   local filesystem, usually for testing
# if unset, lfs will assume the remote repository also handles blob storage
# for http(s) URLs.  Otherwise, lfs will prompt to set this when it must
# use this value.
# (default: unset)
url = https://example.com/repo.git/info/lfs

# Which files to track in LFS.  Path tests are "**.extname" for file
# extensions, and "path:under/some/directory" for path prefix.  Both
# are relative to the repository root.
# File size can be tested with the "size()" fileset, and tests can be
# joined with fileset operators.  (See "hg help filesets.operators".)
#
# Some examples:
# \- all()                       # everything
# \- none()                      # nothing
# \- size(">20MB")               # larger than 20MB
# \- !**.txt                     # anything not a *.txt file
# \- **.zip | **.tar.gz | **.7z  # some types of compressed files
# \- path:bin                    # files under "bin" in the project root
# \- (**.php & size(">2MB")) | (**.js & size(">5MB")) | **.tar.gz
#     | (path:bin & !path:/bin/README) | size(">1GB")
# (default: none())
#
# This is ignored if there is a tracked \(aq.hglfs\(aq file, and this setting
# will eventually be deprecated and removed.
track = size(">10M")

# how many times to retry before giving up on transferring an object
retry = 5

# the local directory to store lfs files for sharing across local clones.
# If not set, the cache is located in an OS specific cache location.
usercache = /path/to/global/cache
.ft P
.fi
.SS Commands
.SS Uncategorized commands
.SS logtoprocess
.sp
send ui.log() data to a subprocess (EXPERIMENTAL)
.sp
This extension lets you specify a shell command per ui.log() event,
sending all remaining arguments to as environment variables to that command.
.sp
Positional arguments construct a log message, which is passed in the \fIMSG1\fP
environment variables. Each keyword argument is set as a \fIOPT_UPPERCASE_KEY\fP
variable (so the key is uppercased, and prefixed with \fIOPT_\fP). The original
event name is passed in the \fIEVENT\fP environment variable, and the process ID
of mercurial is given in \fIHGPID\fP.
.sp
So given a call \fIui.log(\(aqfoo\(aq, \(aqbar %s
\(aq, \(aqbaz\(aq, spam=\(aqeggs\(aq), a script
configured for the \(gafoo\fP event can expect an environment with \fIMSG1=bar baz\fP,
and \fIOPT_SPAM=eggs\fP.
.sp
Scripts are configured in the \fI[logtoprocess]\fP section, each key an event name.
For example:
.sp
.nf
.ft C
[logtoprocess]
commandexception = echo "$MSG1" > /var/log/mercurial_exceptions.log
.ft P
.fi
.sp
would log the warning message and traceback of any failed command dispatch.
.sp
Scripts are run asynchronously as detached daemon processes; mercurial will
not ensure that they exit cleanly.
.SS mq
.sp
manage a stack of patches
.sp
This extension lets you work with a stack of patches in a Mercurial
repository. It manages two stacks of patches \- all known patches, and
applied patches (subset of known patches).
.sp
Known patches are represented as patch files in the .hg/patches
directory. Applied patches are both patch files and changesets.
.sp
Common tasks (use \%\fBhg help COMMAND\fP\: for more details):
.sp
.nf
.ft C
create new patch                          qnew
import existing patch                     qimport

print patch series                        qseries
print applied patches                     qapplied

add known patch to applied stack          qpush
remove patch from applied stack           qpop
refresh contents of top applied patch     qrefresh
.ft P
.fi
.sp
By default, mq will automatically use git patches when required to
avoid losing file mode changes, copy records, binary files or empty
files creations or deletions. This behavior can be configured with:
.sp
.nf
.ft C
[mq]
git = auto/keep/yes/no
.ft P
.fi
.sp
If set to \(aqkeep\(aq, mq will obey the [diff] section configuration while
preserving existing git patches upon qrefresh. If set to \(aqyes\(aq or
\(aqno\(aq, mq will override the [diff] section and always generate git or
regular patches, possibly losing data in the second case.
.sp
It may be desirable for mq changesets to be kept in the secret phase (see
\%\fBhg help phases\fP\:), which can be enabled with the following setting:
.sp
.nf
.ft C
[mq]
secret = True
.ft P
.fi
.sp
You will by default be managing a patch queue named "patches". You can
create other, independent patch queues with the \%\fBhg qqueue\fP\: command.
.sp
If the working directory contains uncommitted files, qpush, qpop and
qgoto abort immediately. If \-f/\-\-force is used, the changes are
discarded. Setting:
.sp
.nf
.ft C
[mq]
keepchanges = True
.ft P
.fi
.sp
make them behave as if \-\-keep\-changes were passed, and non\-conflicting
local changes will be tolerated and preserved. If incompatible options
such as \-f/\-\-force or \-\-exact are passed, this setting is ignored.
.sp
This extension used to provide a strip command. This command now lives
in the strip extension.
.SS Commands
.SS Repository creation
.SS qclone
.sp
clone main and patch repository at same time:
.sp
.nf
.ft C
hg qclone [OPTION]... SOURCE [DEST]
.ft P
.fi
.sp
If source is local, destination will have no patches applied. If
source is remote, this command can not check if patches are
applied in source, so cannot guarantee that patches are not
applied in destination. If you clone remote repository, be sure
before that it has no patches applied.
.sp
Source patch repository is looked for in <src>/.hg/patches by
default. Use \-p <url> to change.
.sp
The patch directory must be a nested Mercurial repository, as
would be created by \%\fBhg init \-\-mq\fP\:.
.sp
Return 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-pull
.
use pull protocol to copy metadata
.TP
.B \-U,  \-\-noupdate
.
do not update the new working directories
.TP
.B \-\-uncompressed
.
use uncompressed transfer (fast over LAN)
.TP
.BI \-p,  \-\-patches \ <REPO>
.
location of source patch repository
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.UNINDENT
.SS qinit
.sp
init a new queue repository (DEPRECATED):
.sp
.nf
.ft C
hg qinit [\-c]
.ft P
.fi
.sp
The queue repository is unversioned by default. If
\-c/\-\-create\-repo is specified, qinit will create a separate nested
repository for patches (qinit \-c may also be run later to convert
an unversioned patch repository into a versioned one). You can use
qcommit to commit changes to this queue repository.
.sp
This command is deprecated. Without \-c, it\(aqs implied by other relevant
commands. With \-c, use \%\fBhg init \-\-mq\fP\: instead.
.sp
Options:
.INDENT 0.0
.TP
.B \-c,  \-\-create\-repo
.
create queue repository
.UNINDENT
.SS Change creation
.SS qcommit
.sp
commit changes in the queue repository (DEPRECATED):
.sp
.nf
.ft C
hg qcommit [OPTION]... [FILE]...
.ft P
.fi
.sp
This command is deprecated; use \%\fBhg commit \-\-mq\fP\: instead.
.sp
Options:
.INDENT 0.0
.TP
.B \-A,  \-\-addremove
.
mark new/missing files as added/removed before committing
.TP
.B \-\-close\-branch
.
mark a branch head as closed
.TP
.B \-\-amend
.
amend the parent of the working directory
.TP
.B \-s,  \-\-secret
.
use the secret phase for committing
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-\-force\-close\-branch
.
forcibly close branch from a non\-head changeset (ADVANCED)
.TP
.B \-i,  \-\-interactive
.
use interactive mode
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: qci
.UNINDENT
.UNINDENT
.SS qnew
.sp
create a new patch:
.sp
.nf
.ft C
hg qnew [\-e] [\-m TEXT] [\-l FILE] PATCH [FILE]...
.ft P
.fi
.sp
qnew creates a new patch on top of the currently\-applied patch (if
any). The patch will be initialized with any outstanding changes
in the working directory. You may also use \-I/\-\-include,
\-X/\-\-exclude, and/or a list of files after the patch name to add
only changes to matching files to the new patch, leaving the rest
as uncommitted modifications.
.sp
\-u/\-\-user and \-d/\-\-date can be used to set the (given) user and
date, respectively. \-U/\-\-currentuser and \-D/\-\-currentdate set user
to current user and date to current date.
.sp
\-e/\-\-edit, \-m/\-\-message or \-l/\-\-logfile set the patch header as
well as the commit message. If none is specified, the header is
empty and the commit message is \(aq[mq]: PATCH\(aq.
.sp
Use the \-g/\-\-git option to keep the patch in the git extended diff
format. Read the diffs help topic for more information on why this
is important for preserving permission changes and copy/rename
information.
.sp
Returns 0 on successful creation of a new patch.
.sp
Options:
.INDENT 0.0
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-f,  \-\-force
.
import uncommitted changes (DEPRECATED)
.TP
.B \-g,  \-\-git
.
use git extended diff format
.TP
.B \-U,  \-\-currentuser
.
add "From: <current user>" to patch
.TP
.BI \-u,  \-\-user \ <USER>
.
add "From: <USER>" to patch
.TP
.B \-D,  \-\-currentdate
.
add "Date: <current date>" to patch
.TP
.BI \-d,  \-\-date \ <DATE>
.
add "Date: <DATE>" to patch
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS qrefresh
.sp
update the current patch:
.sp
.nf
.ft C
hg qrefresh [\-I] [\-X] [\-e] [\-m TEXT] [\-l FILE] [\-s] [FILE]...
.ft P
.fi
.sp
If any file patterns are provided, the refreshed patch will
contain only the modifications that match those patterns; the
remaining modifications will remain in the working directory.
.sp
If \-s/\-\-short is specified, files currently included in the patch
will be refreshed just like matched files and remain in the patch.
.sp
If \-e/\-\-edit is specified, Mercurial will start your configured editor for
you to enter a message. In case qrefresh fails, you will find a backup of
your message in \fB.hg/last\-message.txt\fP.
.sp
hg add/remove/copy/rename work as usual, though you might want to
use git\-style patches (\-g/\-\-git or [diff] git=1) to track copies
and renames. See the diffs help topic for more information on the
git diff format.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-g,  \-\-git
.
use git extended diff format
.TP
.B \-s,  \-\-short
.
refresh only files already in the patch and specified files
.TP
.B \-U,  \-\-currentuser
.
add/update author field in patch with current user
.TP
.BI \-u,  \-\-user \ <USER>
.
add/update author field in patch with given user
.TP
.B \-D,  \-\-currentdate
.
add/update date field in patch with current date
.TP
.BI \-d,  \-\-date \ <DATE>
.
add/update date field in patch with given date
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS Change manipulation
.SS qfold
.sp
fold the named patches into the current patch:
.sp
.nf
.ft C
hg qfold [\-e] [\-k] [\-m TEXT] [\-l FILE] PATCH...
.ft P
.fi
.sp
Patches must not yet be applied. Each patch will be successively
applied to the current patch in the order given. If all the
patches apply successfully, the current patch will be refreshed
with the new cumulative patch, and the folded patches will be
deleted. With \-k/\-\-keep, the folded patch files will not be
removed afterwards.
.sp
The header for each folded patch will be concatenated with the
current patch header, separated by a line of \fB* * *\fP.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-k,  \-\-keep
.
keep folded patch files
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.UNINDENT
.SS Change organization
.SS qapplied
.sp
print the patches already applied:
.sp
.nf
.ft C
hg qapplied [\-1] [\-s] [PATCH]
.ft P
.fi
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-1,  \-\-last
.
show only the preceding applied patch
.TP
.B \-s,  \-\-summary
.
print first line of patch header
.UNINDENT
.SS qdelete
.sp
remove patches from queue:
.sp
.nf
.ft C
hg qdelete [\-k] [PATCH]...
.ft P
.fi
.sp
The patches must not be applied, and at least one patch is required. Exact
patch identifiers must be given. With \-k/\-\-keep, the patch files are
preserved in the patch directory.
.sp
To stop managing a patch and move it into permanent history,
use the \%\fBhg qfinish\fP\: command.
.sp
Options:
.INDENT 0.0
.TP
.B \-k,  \-\-keep
.
keep patch file
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
stop managing a revision (DEPRECATED)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: qremove qrm
.UNINDENT
.UNINDENT
.SS qfinish
.sp
move applied patches into repository history:
.sp
.nf
.ft C
hg qfinish [\-a] [REV]...
.ft P
.fi
.sp
Finishes the specified revisions (corresponding to applied
patches) by moving them out of mq control into regular repository
history.
.sp
Accepts a revision range or the \-a/\-\-applied option. If \-\-applied
is specified, all applied mq revisions are removed from mq
control. Otherwise, the given revisions must be at the base of the
stack of applied patches.
.sp
This can be especially useful if your changes have been applied to
an upstream repository, or if you are about to push your changes
to upstream.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-a,  \-\-applied
.
finish all applied changesets
.UNINDENT
.SS qgoto
.sp
push or pop patches until named patch is at top of stack:
.sp
.nf
.ft C
hg qgoto [OPTION]... PATCH
.ft P
.fi
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-keep\-changes
.
tolerate non\-conflicting local changes
.TP
.B \-f,  \-\-force
.
overwrite any local changes
.TP
.B \-\-no\-backup
.
do not save backup copies of files
.UNINDENT
.SS qguard
.sp
set or print guards for a patch:
.sp
.nf
.ft C
hg qguard [\-l] [\-n] [PATCH] [\-\- [+GUARD]... [\-GUARD]...]
.ft P
.fi
.sp
Guards control whether a patch can be pushed. A patch with no
guards is always pushed. A patch with a positive guard ("+foo") is
pushed only if the \%\fBhg qselect\fP\: command has activated it. A patch with
a negative guard ("\-foo") is never pushed if the \%\fBhg qselect\fP\: command
has activated it.
.sp
With no arguments, print the currently active guards.
With arguments, set guards for the named patch.
.IP Note
.
Specifying negative guards now requires \(aq\-\-\(aq.
.RE
.sp
To set guards on another patch:
.sp
.nf
.ft C
hg qguard other.patch \-\- +2.6.17 \-stable
.ft P
.fi
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-l,  \-\-list
.
list all patches and guards
.TP
.B \-n,  \-\-none
.
drop all guards
.UNINDENT
.SS qheader
.sp
print the header of the topmost or specified patch:
.sp
.nf
.ft C
hg qheader [PATCH]
.ft P
.fi
.sp
Returns 0 on success.
.SS qnext
.sp
print the name of the next pushable patch:
.sp
.nf
.ft C
hg qnext [\-s]
.ft P
.fi
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-s,  \-\-summary
.
print first line of patch header
.UNINDENT
.SS qpop
.sp
pop the current patch off the stack:
.sp
.nf
.ft C
hg qpop [\-a] [\-f] [PATCH | INDEX]
.ft P
.fi
.sp
Without argument, pops off the top of the patch stack. If given a
patch name, keeps popping off patches until the named patch is at
the top of the stack.
.sp
By default, abort if the working directory contains uncommitted
changes. With \-\-keep\-changes, abort only if the uncommitted files
overlap with patched files. With \-f/\-\-force, backup and discard
changes made to such files.
.sp
Return 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-a,  \-\-all
.
pop all patches
.TP
.BI \-n,  \-\-name \ <NAME>
.
queue name to pop (DEPRECATED)
.TP
.B \-\-keep\-changes
.
tolerate non\-conflicting local changes
.TP
.B \-f,  \-\-force
.
forget any local changes to patched files
.TP
.B \-\-no\-backup
.
do not save backup copies of files
.UNINDENT
.SS qprev
.sp
print the name of the preceding applied patch:
.sp
.nf
.ft C
hg qprev [\-s]
.ft P
.fi
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-s,  \-\-summary
.
print first line of patch header
.UNINDENT
.SS qpush
.sp
push the next patch onto the stack:
.sp
.nf
.ft C
hg qpush [\-f] [\-l] [\-a] [\-\-move] [PATCH | INDEX]
.ft P
.fi
.sp
By default, abort if the working directory contains uncommitted
changes. With \-\-keep\-changes, abort only if the uncommitted files
overlap with patched files. With \-f/\-\-force, backup and patch over
uncommitted changes.
.sp
Return 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-keep\-changes
.
tolerate non\-conflicting local changes
.TP
.B \-f,  \-\-force
.
apply on top of local changes
.TP
.B \-e,  \-\-exact
.
apply the target patch to its recorded parent
.TP
.B \-l,  \-\-list
.
list patch name in commit text
.TP
.B \-a,  \-\-all
.
apply all patches
.TP
.B \-m,  \-\-merge
.
merge from another queue (DEPRECATED)
.TP
.BI \-n,  \-\-name \ <NAME>
.
merge queue name (DEPRECATED)
.TP
.B \-\-move
.
reorder patch series and apply only the patch
.TP
.B \-\-no\-backup
.
do not save backup copies of files
.UNINDENT
.SS qqueue
.sp
manage multiple patch queues:
.sp
.nf
.ft C
hg qqueue [OPTION] [QUEUE]
.ft P
.fi
.sp
Supports switching between different patch queues, as well as creating
new patch queues and deleting existing ones.
.sp
Omitting a queue name or specifying \-l/\-\-list will show you the registered
queues \- by default the "normal" patches queue is registered. The currently
active queue will be marked with "(active)". Specifying \-\-active will print
only the name of the active queue.
.sp
To create a new queue, use \-c/\-\-create. The queue is automatically made
active, except in the case where there are applied patches from the
currently active queue in the repository. Then the queue will only be
created and switching will fail.
.sp
To delete an existing queue, use \-\-delete. You cannot delete the currently
active queue.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-l,  \-\-list
.
list all available queues
.TP
.B \-\-active
.
print name of active queue
.TP
.B \-c,  \-\-create
.
create new queue
.TP
.B \-\-rename
.
rename active queue
.TP
.B \-\-delete
.
delete reference to queue
.TP
.B \-\-purge
.
delete queue, and remove patch dir
.UNINDENT
.SS qrename
.sp
rename a patch:
.sp
.nf
.ft C
hg qrename PATCH1 [PATCH2]
.ft P
.fi
.sp
With one argument, renames the current patch to PATCH1.
With two arguments, renames PATCH1 to PATCH2.
.sp
Returns 0 on success.
.\" 
.
.INDENT 0.0
.INDENT 3.5
.sp
aliases: qmv
.UNINDENT
.UNINDENT
.SS qrestore
.sp
restore the queue state saved by a revision (DEPRECATED):
.sp
.nf
.ft C
hg qrestore [\-d] [\-u] REV
.ft P
.fi
.sp
This command is deprecated, use \%\fBhg rebase\fP\: instead.
.sp
Options:
.INDENT 0.0
.TP
.B \-d,  \-\-delete
.
delete save entry
.TP
.B \-u,  \-\-update
.
update queue working directory
.UNINDENT
.SS qsave
.sp
save current queue state (DEPRECATED):
.sp
.nf
.ft C
hg qsave [\-m TEXT] [\-l FILE] [\-c] [\-n NAME] [\-e] [\-f]
.ft P
.fi
.sp
This command is deprecated, use \%\fBhg rebase\fP\: instead.
.sp
Options:
.INDENT 0.0
.TP
.B \-c,  \-\-copy
.
copy patch directory
.TP
.BI \-n,  \-\-name \ <NAME>
.
copy directory name
.TP
.B \-e,  \-\-empty
.
clear queue status file
.TP
.B \-f,  \-\-force
.
force copy
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.UNINDENT
.SS qselect
.sp
set or print guarded patches to push:
.sp
.nf
.ft C
hg qselect [OPTION]... [GUARD]...
.ft P
.fi
.sp
Use the \%\fBhg qguard\fP\: command to set or print guards on patch, then use
qselect to tell mq which guards to use. A patch will be pushed if
it has no guards or any positive guards match the currently
selected guard, but will not be pushed if any negative guards
match the current guard. For example:
.sp
.nf
.ft C
qguard foo.patch \-\- \-stable    (negative guard)
qguard bar.patch    +stable    (positive guard)
qselect stable
.ft P
.fi
.sp
This activates the "stable" guard. mq will skip foo.patch (because
it has a negative match) but push bar.patch (because it has a
positive match).
.sp
With no arguments, prints the currently active guards.
With one argument, sets the active guard.
.sp
Use \-n/\-\-none to deactivate guards (no other arguments needed).
When no guards are active, patches with positive guards are
skipped and patches with negative guards are pushed.
.sp
qselect can change the guards on applied patches. It does not pop
guarded patches by default. Use \-\-pop to pop back to the last
applied patch that is not guarded. Use \-\-reapply (which implies
\-\-pop) to push back to the current patch afterwards, but skip
guarded patches.
.sp
Use \-s/\-\-series to print a list of all guards in the series file
(no other arguments needed). Use \-v for more information.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-n,  \-\-none
.
disable all guards
.TP
.B \-s,  \-\-series
.
list all guards in series file
.TP
.B \-\-pop
.
pop to before first guarded applied patch
.TP
.B \-\-reapply
.
pop, then reapply patches
.UNINDENT
.SS qseries
.sp
print the entire series file:
.sp
.nf
.ft C
hg qseries [\-ms]
.ft P
.fi
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-m,  \-\-missing
.
print patches not in series
.TP
.B \-s,  \-\-summary
.
print first line of patch header
.UNINDENT
.SS qtop
.sp
print the name of the current patch:
.sp
.nf
.ft C
hg qtop [\-s]
.ft P
.fi
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-s,  \-\-summary
.
print first line of patch header
.UNINDENT
.SS qunapplied
.sp
print the patches not yet applied:
.sp
.nf
.ft C
hg qunapplied [\-1] [\-s] [PATCH]
.ft P
.fi
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-1,  \-\-first
.
show only the first patch
.TP
.B \-s,  \-\-summary
.
print first line of patch header
.UNINDENT
.SS File content management
.SS qdiff
.sp
diff of the current patch and subsequent modifications:
.sp
.nf
.ft C
hg qdiff [OPTION]... [FILE]...
.ft P
.fi
.sp
Shows a diff which includes the current patch as well as any
changes which have been made in the working directory since the
last refresh (thus showing what the current patch would become
after a qrefresh).
.sp
Use \%\fBhg diff\fP\: if you only want to see the changes made since the
last qrefresh, or \%\fBhg export qtip\fP\: if you want to see changes
made by the current patch without including changes made since the
qrefresh.
.sp
Returns 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.B \-a,  \-\-text
.
treat all files as text
.TP
.B \-g,  \-\-git
.
use git extended diff format (DEFAULT: diff.git)
.TP
.B \-\-binary
.
generate binary diffs in git mode (default)
.TP
.B \-\-nodates
.
omit dates from diff headers
.TP
.B \-\-noprefix
.
omit a/ and b/ prefixes from filenames
.TP
.B \-p,  \-\-show\-function
.
show which function each change is in (DEFAULT: diff.showfunc)
.TP
.B \-\-reverse
.
produce a diff that undoes the changes
.TP
.B \-w,  \-\-ignore\-all\-space
.
ignore white space when comparing lines
.TP
.B \-b,  \-\-ignore\-space\-change
.
ignore changes in the amount of white space
.TP
.B \-B,  \-\-ignore\-blank\-lines
.
ignore changes whose lines are all blank
.TP
.B \-Z,  \-\-ignore\-space\-at\-eol
.
ignore changes in whitespace at EOL
.TP
.BI \-U,  \-\-unified \ <NUM>
.
number of lines of context to show
.TP
.B \-\-stat
.
output diffstat\-style summary of changes
.TP
.BI \-\-root \ <DIR>
.
produce diffs relative to subdirectory
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS Change import/export
.SS qimport
.sp
import a patch or existing changeset:
.sp
.nf
.ft C
hg qimport [\-e] [\-n NAME] [\-f] [\-g] [\-P] [\-r REV]... [FILE]...
.ft P
.fi
.sp
The patch is inserted into the series after the last applied
patch. If no patches have been applied, qimport prepends the patch
to the series.
.sp
The patch will have the same name as its source file unless you
give it a new one with \-n/\-\-name.
.sp
You can register an existing patch inside the patch directory with
the \-e/\-\-existing flag.
.sp
With \-f/\-\-force, an existing patch of the same name will be
overwritten.
.sp
An existing changeset may be placed under mq control with \-r/\-\-rev
(e.g. qimport \-\-rev . \-n patch will place the current revision
under mq control). With \-g/\-\-git, patches imported with \-\-rev will
use the git diff format. See the diffs help topic for information
on why this is important for preserving rename/copy information
and permission changes. Use \%\fBhg qfinish\fP\: to remove changesets
from mq control.
.sp
To import a patch from standard input, pass \- as the patch file.
When importing from standard input, a patch name must be specified
using the \-\-name flag.
.sp
To import an existing patch while renaming it:
.sp
.nf
.ft C
hg qimport \-e existing\-patch \-n new\-name
.ft P
.fi
.sp
Returns 0 if import succeeded.
.sp
Options:
.INDENT 0.0
.TP
.B \-e,  \-\-existing
.
import file in patch directory
.TP
.BI \-n,  \-\-name \ <NAME>
.
name of patch file
.TP
.B \-f,  \-\-force
.
overwrite existing files
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
place existing revisions under mq control
.TP
.B \-g,  \-\-git
.
use git extended diff format
.TP
.B \-P,  \-\-push
.
qpush after importing
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS narrow
.sp
create clones which fetch history data for subset of files (EXPERIMENTAL)
.SS Commands
.SS Repository maintenance
.SS tracked
.sp
show or change the current narrowspec:
.sp
.nf
.ft C
hg tracked [OPTIONS]... [REMOTE]
.ft P
.fi
.sp
With no argument, shows the current narrowspec entries, one per line. Each
line will be prefixed with \(aqI\(aq or \(aqX\(aq for included or excluded patterns,
respectively.
.sp
The narrowspec is comprised of expressions to match remote files and/or
directories that should be pulled into your client.
The narrowspec has \fIinclude\fP and \fIexclude\fP expressions, with excludes always
trumping includes: that is, if a file matches an exclude expression, it will
be excluded even if it also matches an include expression.
Excluding files that were never included has no effect.
.sp
Each included or excluded entry is in the format described by
\(aqhg help patterns\(aq.
.sp
The options allow you to add or remove included and excluded expressions.
.sp
If \-\-clear is specified, then all previous includes and excludes are DROPPED
and replaced by the new ones specified to \-\-addinclude and \-\-addexclude.
If \-\-clear is specified without any further options, the narrowspec will be
empty and will not match any files.
.sp
If \-\-auto\-remove\-includes is specified, then those includes that don\(aqt match
any files modified by currently visible local commits (those not shared by
the remote) will be added to the set of explicitly specified includes to
remove.
.sp
\-\-import\-rules accepts a path to a file containing rules, allowing you to
add \-\-addinclude, \-\-addexclude rules in bulk. Like the other include and
exclude switches, the changes are applied immediately.
.sp
Options:
.INDENT 0.0
.TP
.BI \-\-addinclude \ <VALUE[+]>
.
new paths to include
.TP
.BI \-\-removeinclude \ <VALUE[+]>
.
old paths to no longer include
.TP
.B \-\-auto\-remove\-includes
.
automatically choose unused includes to remove
.TP
.BI \-\-addexclude \ <VALUE[+]>
.
new paths to exclude
.TP
.BI \-\-import\-rules \ <VALUE>
.
import narrowspecs from a file
.TP
.BI \-\-removeexclude \ <VALUE[+]>
.
old paths to no longer exclude
.TP
.B \-\-clear
.
whether to replace the existing narrowspec
.TP
.B \-\-force\-delete\-local\-changes
.
forces deletion of local changes when narrowing
.TP
.B \-\-backup
.
back up local changes when narrowing (default: True)
.TP
.B \-\-update\-working\-copy
.
update working copy when the store has changed
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS notify
.sp
hooks for sending email push notifications
.sp
This extension implements hooks to send email notifications when
changesets are sent from or received by the local repository.
.sp
First, enable the extension as explained in \%\fBhg help extensions\fP\:, and
register the hook you want to run. \fBincoming\fP and \fBchangegroup\fP hooks
are run when changesets are received, while \fBoutgoing\fP hooks are for
changesets sent to another repository:
.sp
.nf
.ft C
[hooks]
# one email for each incoming changeset
incoming.notify = python:hgext.notify.hook
# one email for all incoming changesets
changegroup.notify = python:hgext.notify.hook

# one email for all outgoing changesets
outgoing.notify = python:hgext.notify.hook
.ft P
.fi
.sp
This registers the hooks. To enable notification, subscribers must
be assigned to repositories. The \fB[usersubs]\fP section maps multiple
repositories to a given recipient. The \fB[reposubs]\fP section maps
multiple recipients to a single repository:
.sp
.nf
.ft C
[usersubs]
# key is subscriber email, value is a comma\-separated list of repo patterns
user@host = pattern

[reposubs]
# key is repo pattern, value is a comma\-separated list of subscriber emails
pattern = user@host
.ft P
.fi
.sp
A \fBpattern\fP is a \fBglob\fP matching the absolute path to a repository,
optionally combined with a revset expression. A revset expression, if
present, is separated from the glob by a hash. Example:
.sp
.nf
.ft C
[reposubs]
*/widgets#branch(release) = qa\-team@example.com
.ft P
.fi
.sp
This sends to \fBqa\-team@example.com\fP whenever a changeset on the \fBrelease\fP
branch triggers a notification in any repository ending in \fBwidgets\fP.
.sp
In order to place them under direct user management, \fB[usersubs]\fP and
\fB[reposubs]\fP sections may be placed in a separate \fBhgrc\fP file and
incorporated by reference:
.sp
.nf
.ft C
[notify]
config = /path/to/subscriptionsfile
.ft P
.fi
.sp
Notifications will not be sent until the \fBnotify.test\fP value is set
to \fBFalse\fP; see below.
.sp
Notifications content can be tweaked with the following configuration entries:
.INDENT 0.0
.TP
.B notify.test
.
If \fBTrue\fP, print messages to stdout instead of sending them. Default: True.
.TP
.B notify.sources
.
Space\-separated list of change sources. Notifications are activated only
when a changeset\(aqs source is in this list. Sources may be:
.INDENT 7.0
.TP
.B \fBserve\fP
.sp
changesets received via http or ssh
.TP
.B \fBpull\fP
.sp
changesets received via \fBhg pull\fP
.TP
.B \fBunbundle\fP
.sp
changesets received via \fBhg unbundle\fP
.TP
.B \fBpush\fP
.sp
changesets sent or received via \fBhg push\fP
.TP
.B \fBbundle\fP
.sp
changesets sent via \fBhg unbundle\fP
.UNINDENT
.sp
Default: serve.
.TP
.B notify.strip
.
Number of leading slashes to strip from url paths. By default, notifications
reference repositories with their absolute path. \fBnotify.strip\fP lets you
turn them into relative paths. For example, \fBnotify.strip=3\fP will change
\fB/long/path/repository\fP into \fBrepository\fP. Default: 0.
.TP
.B notify.domain
.
Default email domain for sender or recipients with no explicit domain.
It is also used for the domain part of the \fBMessage\-Id\fP when using
\fBnotify.messageidseed\fP.
.TP
.B notify.messageidseed
.
Create deterministic \fBMessage\-Id\fP headers for the mails based on the seed
and the revision identifier of the first commit in the changeset.
.TP
.B notify.style
.
Style file to use when formatting emails.
.TP
.B notify.template
.
Template to use when formatting emails.
.TP
.B notify.incoming
.
Template to use when run as an incoming hook, overriding \fBnotify.template\fP.
.TP
.B notify.outgoing
.
Template to use when run as an outgoing hook, overriding \fBnotify.template\fP.
.TP
.B notify.changegroup
.
Template to use when running as a changegroup hook, overriding
\fBnotify.template\fP.
.TP
.B notify.maxdiff
.
Maximum number of diff lines to include in notification email. Set to 0
to disable the diff, or \-1 to include all of it. Default: 300.
.TP
.B notify.maxdiffstat
.
Maximum number of diffstat lines to include in notification email. Set to \-1
to include all of it. Default: \-1.
.TP
.B notify.maxsubject
.
Maximum number of characters in email\(aqs subject line. Default: 67.
.TP
.B notify.diffstat
.
Set to True to include a diffstat before diff content. Default: True.
.TP
.B notify.showfunc
.
If set, override \fBdiff.showfunc\fP for the diff content. Default: None.
.TP
.B notify.merge
.
If True, send notifications for merge changesets. Default: True.
.TP
.B notify.mbox
.
If set, append mails to this mbox file instead of sending. Default: None.
.TP
.B notify.fromauthor
.
If set, use the committer of the first changeset in a changegroup for
the "From" field of the notification mail. If not set, take the user
from the pushing repo.  Default: False.
.TP
.B notify.reply\-to\-predecessor (EXPERIMENTAL)
.
If set and the changeset has a predecessor in the repository, try to thread
the notification mail with the predecessor. This adds the "In\-Reply\-To" header
to the notification mail with a reference to the predecessor with the smallest
revision number. Mail threads can still be torn, especially when changesets
are folded.
.sp
This option must  be used in combination with \fBnotify.messageidseed\fP.
.UNINDENT
.sp
If set, the following entries will also be used to customize the
notifications:
.INDENT 0.0
.TP
.B email.from
.
Email \fBFrom\fP address to use if none can be found in the generated
email content.
.TP
.B web.baseurl
.
Root repository URL to combine with repository paths when making
references. See also \fBnotify.strip\fP.
.UNINDENT
.SS pager
.sp
browse command output with an external pager (DEPRECATED)
.sp
Forcibly enable paging for individual commands that don\(aqt typically
request pagination with the attend\-<command> option. This setting
takes precedence over ignore options and defaults:
.sp
.nf
.ft C
[pager]
attend\-cat = false
.ft P
.fi
.SS patchbomb
.sp
command to send changesets as (a series of) patch emails
.sp
The series is started off with a "[PATCH 0 of N]" introduction, which
describes the series as a whole.
.sp
Each patch email has a Subject line of "[PATCH M of N] ...", using the
first line of the changeset description as the subject text. The
message contains two or three body parts:
.INDENT 0.0
.IP \(bu 2
.
The changeset description.
.IP \(bu 2
.
[Optional] The result of running diffstat on the patch.
.IP \(bu 2
.
The patch itself, as generated by \%\fBhg export\fP\:.
.UNINDENT
.sp
Each message refers to the first in the series using the In\-Reply\-To
and References headers, so they will show up as a sequence in threaded
mail and news readers, and in mail archives.
.sp
To configure other defaults, add a section like this to your
configuration file:
.sp
.nf
.ft C
[email]
from = My Name <my@email>
to = recipient1, recipient2, ...
cc = cc1, cc2, ...
bcc = bcc1, bcc2, ...
reply\-to = address1, address2, ...
.ft P
.fi
.sp
Use \fB[patchbomb]\fP as configuration section name if you need to
override global \fB[email]\fP address settings.
.sp
Then you can use the \%\fBhg email\fP\: command to mail a series of
changesets as a patchbomb.
.sp
You can also either configure the method option in the email section
to be a sendmail compatible mailer or fill out the [smtp] section so
that the patchbomb extension can automatically send patchbombs
directly from the commandline. See the [email] and [smtp] sections in
hgrc(5) for details.
.sp
By default, \%\fBhg email\fP\: will prompt for a \fBTo\fP or \fBCC\fP header if
you do not supply one via configuration or the command line.  You can
override this to never prompt by configuring an empty value:
.sp
.nf
.ft C
[email]
cc =
.ft P
.fi
.sp
You can control the default inclusion of an introduction message with the
\fBpatchbomb.intro\fP configuration option. The configuration is always
overwritten by command line flags like \-\-intro and \-\-desc:
.sp
.nf
.ft C
[patchbomb]
intro=auto   # include introduction message if more than 1 patch (default)
intro=never  # never include an introduction message
intro=always # always include an introduction message
.ft P
.fi
.sp
You can specify a template for flags to be added in subject prefixes. Flags
specified by \-\-flag option are exported as \fB{flags}\fP keyword:
.sp
.nf
.ft C
[patchbomb]
flagtemplate = "{separate(\(aq \(aq,
                          ifeq(branch, \(aqdefault\(aq, \(aq\(aq, branch|upper),
                          flags)}"
.ft P
.fi
.sp
You can set patchbomb to always ask for confirmation by setting
\fBpatchbomb.confirm\fP to true.
.SS Commands
.SS Change import/export
.SS email
.sp
send changesets by email:
.sp
.nf
.ft C
hg email [OPTION]... [DEST]...
.ft P
.fi
.sp
By default, diffs are sent in the format generated by
\%\fBhg export\fP\:, one per message. The series starts with a "[PATCH 0
of N]" introduction, which describes the series as a whole.
.sp
Each patch email has a Subject line of "[PATCH M of N] ...", using
the first line of the changeset description as the subject text.
The message contains two or three parts. First, the changeset
description.
.sp
With the \-d/\-\-diffstat option, if the diffstat program is
installed, the result of running diffstat on the patch is inserted.
.sp
Finally, the patch itself, as generated by \%\fBhg export\fP\:.
.sp
With the \-d/\-\-diffstat or \-\-confirm options, you will be presented
with a final summary of all messages and asked for confirmation before
the messages are sent.
.sp
By default the patch is included as text in the email body for
easy reviewing. Using the \-a/\-\-attach option will instead create
an attachment for the patch. With \-i/\-\-inline an inline attachment
will be created. You can include a patch both as text in the email
body and as a regular or an inline attachment by combining the
\-a/\-\-attach or \-i/\-\-inline with the \-\-body option.
.sp
With \-B/\-\-bookmark changesets reachable by the given bookmark are
selected.
.sp
With \-o/\-\-outgoing, emails will be generated for patches not found
in the destination repository (or only those which are ancestors
of the specified revisions if any are provided)
.sp
With \-b/\-\-bundle, changesets are selected as for \-\-outgoing, but a
single email containing a binary Mercurial bundle as an attachment
will be sent. Use the \fBpatchbomb.bundletype\fP config option to
control the bundle type as with \%\fBhg bundle \-\-type\fP\:.
.sp
With \-m/\-\-mbox, instead of previewing each patchbomb message in a
pager or sending the messages directly, it will create a UNIX
mailbox file with the patch emails. This mailbox file can be
previewed with any mail user agent which supports UNIX mbox
files.
.sp
With \-n/\-\-test, all steps will run, but mail will not be sent.
You will be prompted for an email recipient address, a subject and
an introductory message describing the patches of your patchbomb.
Then when all is done, patchbomb messages are displayed.
.sp
In case email sending fails, you will find a backup of your series
introductory message in \fB.hg/last\-email.txt\fP.
.sp
The default behavior of this command can be customized through
configuration. (See \%\fBhg help patchbomb\fP\: for details)
.sp
Examples:
.sp
.nf
.ft C
hg email \-r 3000          # send patch 3000 only
hg email \-r 3000 \-r 3001  # send patches 3000 and 3001
hg email \-r 3000:3005     # send patches 3000 through 3005
hg email 3000             # send patch 3000 (deprecated)

hg email \-o               # send all patches not in default
hg email \-o DEST          # send all patches not in DEST
hg email \-o \-r 3000       # send all ancestors of 3000 not in default
hg email \-o \-r 3000 DEST  # send all ancestors of 3000 not in DEST

hg email \-B feature       # send all ancestors of feature bookmark

hg email \-b               # send bundle of all patches not in default
hg email \-b DEST          # send bundle of all patches not in DEST
hg email \-b \-r 3000       # bundle of all ancestors of 3000 not in default
hg email \-b \-r 3000 DEST  # bundle of all ancestors of 3000 not in DEST

hg email \-o \-m mbox &&    # generate an mbox file...
  mutt \-R \-f mbox         # ... and view it with mutt
hg email \-o \-m mbox &&    # generate an mbox file ...
  formail \-s sendmail \e   # ... and use formail to send from the mbox
    \-bm \-t < mbox         # ... using sendmail
.ft P
.fi
.sp
Before using this command, you will need to enable email in your
hgrc. See the [email] section in hgrc(5) for details.
.sp
Options:
.INDENT 0.0
.TP
.B \-g,  \-\-git
.
use git extended diff format
.TP
.B \-\-plain
.
omit hg patch header
.TP
.B \-o,  \-\-outgoing
.
send changes not found in the target repository
.TP
.B \-b,  \-\-bundle
.
send changes not in target as a binary bundle
.TP
.BI \-B,  \-\-bookmark \ <BOOKMARK>
.
send changes only reachable by given bookmark
.TP
.BI \-\-bundlename \ <NAME>
.
name of the bundle attachment file (default: bundle)
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
a revision to send
.TP
.B \-\-force
.
run even when remote repository is unrelated (with \-b/\-\-bundle)
.TP
.BI \-\-base \ <REV[+]>
.
a base changeset to specify instead of a destination (with \-b/\-\-bundle)
.TP
.B \-\-intro
.
send an introduction email for a single patch
.TP
.B \-\-body
.
send patches as inline message text (default)
.TP
.B \-a,  \-\-attach
.
send patches as attachments
.TP
.B \-i,  \-\-inline
.
send patches as inline attachments
.TP
.BI \-\-bcc \ <EMAIL[+]>
.
email addresses of blind carbon copy recipients
.TP
.BI \-c,  \-\-cc \ <EMAIL[+]>
.
email addresses of copy recipients
.TP
.B \-\-confirm
.
ask for confirmation before sending
.TP
.B \-d,  \-\-diffstat
.
add diffstat output to messages
.TP
.BI \-\-date \ <DATE>
.
use the given date as the sending date
.TP
.BI \-\-desc \ <FILE>
.
use the given file as the series description
.TP
.BI \-f,  \-\-from \ <EMAIL>
.
email address of sender
.TP
.B \-n,  \-\-test
.
print messages that would be sent
.TP
.BI \-m,  \-\-mbox \ <FILE>
.
write messages to mbox file instead of sending them
.TP
.BI \-\-reply\-to \ <EMAIL[+]>
.
email addresses replies should be sent to
.TP
.BI \-s,  \-\-subject \ <TEXT>
.
subject of first message (intro or single patch)
.TP
.BI \-\-in\-reply\-to \ <MSGID>
.
message identifier to reply to
.TP
.BI \-\-flag \ <FLAG[+]>
.
flags to add in subject prefixes
.TP
.BI \-t,  \-\-to \ <EMAIL[+]>
.
email addresses of recipients
.TP
.BI \-e,  \-\-ssh \ <CMD>
.
specify ssh command to use
.TP
.BI \-\-remotecmd \ <CMD>
.
specify hg command to run on the remote side
.TP
.B \-\-insecure
.
do not verify server certificate (ignoring web.cacerts config)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS phabricator
.sp
simple Phabricator integration (EXPERIMENTAL)
.sp
This extension provides a \fBphabsend\fP command which sends a stack of
changesets to Phabricator, and a \fBphabread\fP command which prints a stack of
revisions in a format suitable for \%\fBhg import\fP\:, and a \fBphabupdate\fP command
to update statuses in batch.
.sp
A "phabstatus" view for \%\fBhg show\fP\: is also provided; it displays status
information of Phabricator differentials associated with unfinished
changesets.
.sp
By default, Phabricator requires \fBTest Plan\fP which might prevent some
changeset from being sent. The requirement could be disabled by changing
\fBdifferential.require\-test\-plan\-field\fP config server side.
.sp
Config:
.sp
.nf
.ft C
[phabricator]
# Phabricator URL
url = https://phab.example.com/

# Repo callsign. If a repo has a URL https://$HOST/diffusion/FOO, then its
# callsign is "FOO".
callsign = FOO

# curl command to use. If not set (default), use builtin HTTP library to
# communicate. If set, use the specified curl command. This could be useful
# if you need to specify advanced options that is not easily supported by
# the internal library.
curlcmd = curl \-\-connect\-timeout 2 \-\-retry 3 \-\-silent

# retry failed command N time (default 0). Useful when using the extension
# over flakly connection.
#
# We wait \(garetry.interval\(ga between each retry, in seconds.
# (default 1 second).
retry = 3
retry.interval = 10

# the retry option can combine well with the http.timeout one.
#
# For example to give up on http request after 20 seconds:
[http]
timeout=20

[auth]
example.schemes = https
example.prefix = phab.example.com

# API token. Get it from https://$HOST/conduit/login/
example.phabtoken = cli\-xxxxxxxxxxxxxxxxxxxxxxxxxxxx
.ft P
.fi
.SS Commands
.SS Change import/export
.SS phabimport
.sp
import patches from Phabricator for the specified Differential Revisions:
.sp
.nf
.ft C
hg phabimport DREVSPEC... [OPTIONS]
.ft P
.fi
.sp
The patches are read and applied starting at the parent of the working
directory.
.sp
See \fBhg help phabread\fP for how to specify DREVSPEC.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-stack
.
import dependencies as well
.TP
.BI \-\-test\-vcr \ <VALUE>
.
Path to a vcr file. If nonexistent, will record a new vcr transcript, otherwise will mock all http requests using the specified vcr file. (ADVANCED)
.UNINDENT
.SS phabread
.sp
print patches from Phabricator suitable for importing:
.sp
.nf
.ft C
hg phabread DREVSPEC... [OPTIONS]
.ft P
.fi
.sp
DREVSPEC could be a Differential Revision identity, like \fBD123\fP, or just
the number \fB123\fP. It could also have common operators like \fB+\fP, \fB\-\fP,
\fB&\fP, \fB(\fP, \fB)\fP for complex queries. Prefix \fB:\fP could be used to
select a stack.  If multiple DREVSPEC values are given, the result is the
union of each individually evaluated value.  No attempt is currently made
to reorder the values to run from parent to child.
.sp
\fBabandoned\fP, \fBaccepted\fP, \fBclosed\fP, \fBneedsreview\fP, \fBneedsrevision\fP
could be used to filter patches by status. For performance reason, they
only represent a subset of non\-status selections and cannot be used alone.
.sp
For example, \fB:D6+8\-(2+D4)\fP selects a stack up to D6, plus D8 and exclude
D2 and D4. \fB:D9 & needsreview\fP selects "Needs Review" revisions in a
stack up to D9.
.sp
If \-\-stack is given, follow dependencies information and read all patches.
It is equivalent to the \fB:\fP operator.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-stack
.
read dependencies
.TP
.BI \-\-test\-vcr \ <VALUE>
.
Path to a vcr file. If nonexistent, will record a new vcr transcript, otherwise will mock all http requests using the specified vcr file. (ADVANCED)
.UNINDENT
.SS phabsend
.sp
upload changesets to Phabricator:
.sp
.nf
.ft C
hg phabsend REV [OPTIONS]
.ft P
.fi
.sp
If there are multiple revisions specified, they will be send as a stack
with a linear dependencies relationship using the order specified by the
revset.
.sp
For the first time uploading changesets, local tags will be created to
maintain the association. After the first time, phabsend will check
obsstore and tags information so it can figure out whether to update an
existing Differential Revision, or create a new one.
.sp
If \-\-amend is set, update commit messages so they have the
\fBDifferential Revision\fP URL, remove related tags. This is similar to what
arcanist will do, and is more desired in author\-push workflows. Otherwise,
use local tags to record the \fBDifferential Revision\fP association.
.sp
The \-\-confirm option lets you confirm changesets before sending them. You
can also add following to your configuration file to make it default
behaviour:
.sp
.nf
.ft C
[phabsend]
confirm = true
.ft P
.fi
.sp
By default, a separate review will be created for each commit that is
selected, and will have the same parent/child relationship in Phabricator.
If \fB\-\-fold\fP is set, multiple commits are rolled up into a single review
as if diffed from the parent of the first revision to the last.  The commit
messages are concatenated in the summary field on Phabricator.
.sp
phabsend will check obsstore and the above association to decide whether to
update an existing Differential Revision, or create a new one.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
revisions to send
.TP
.B \-\-amend
.
update commit messages (default: True)
.TP
.BI \-\-reviewer \ <VALUE[+]>
.
specify reviewers
.TP
.BI \-\-blocker \ <VALUE[+]>
.
specify blocking reviewers
.TP
.BI \-m,  \-\-comment \ <VALUE>
.
add a comment to Revisions with new/updated Diffs
.TP
.B \-\-confirm
.
ask for confirmation before sending
.TP
.B \-\-fold
.
combine the revisions into one review
.TP
.BI \-\-test\-vcr \ <VALUE>
.
Path to a vcr file. If nonexistent, will record a new vcr transcript, otherwise will mock all http requests using the specified vcr file. (ADVANCED)
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS phabupdate
.sp
update Differential Revision in batch:
.sp
.nf
.ft C
hg phabupdate [DREVSPEC...| \-r REV...] [OPTIONS]
.ft P
.fi
.sp
DREVSPEC selects revisions. See \%\fBhg help phabread\fP\: for its usage.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-accept
.
accept revisions
.TP
.B \-\-reject
.
reject revisions
.TP
.B \-\-request\-review
.
request review on revisions
.TP
.B \-\-abandon
.
abandon revisions
.TP
.B \-\-reclaim
.
reclaim revisions
.TP
.B \-\-close
.
close revisions
.TP
.B \-\-reopen
.
reopen revisions
.TP
.B \-\-plan\-changes
.
plan changes for revisions
.TP
.B \-\-resign
.
resign as a reviewer from revisions
.TP
.B \-\-commandeer
.
commandeer revisions
.TP
.BI \-m,  \-\-comment \ <VALUE>
.
comment on the last revision
.TP
.BI \-r,  \-\-rev \ <REV>
.
local revision to update
.TP
.BI \-\-test\-vcr \ <VALUE>
.
Path to a vcr file. If nonexistent, will record a new vcr transcript, otherwise will mock all http requests using the specified vcr file. (ADVANCED)
.UNINDENT
.SS Uncategorized commands
.SS purge
.sp
command to delete untracked files from the working directory (DEPRECATED)
.sp
The functionality of this extension has been included in core Mercurial since
version 5.7. Please use \%\fBhg purge ...\fP\: instead. \%\fBhg purge \-\-confirm\fP\: is now
the default, unless the extension is enabled for backward compatibility.
.SS rebase
.sp
command to move sets of revisions to a different ancestor
.sp
This extension lets you rebase changesets in an existing Mercurial
repository.
.sp
For more information:
\%https://mercurial\-scm.org/wiki/RebaseExtension\:
.SS Commands
.SS Change manipulation
.SS rebase
.sp
move changeset (and descendants) to a different branch:
.sp
.nf
.ft C
hg rebase [[\-s REV]... | [\-b REV]... | [\-r REV]...] [\-d REV] [OPTION]...
.ft P
.fi
.sp
Rebase uses repeated merging to graft changesets from one part of
history (the source) onto another (the destination). This can be
useful for linearizing \fIlocal\fP changes relative to a master
development tree.
.sp
Published commits cannot be rebased (see \%\fBhg help phases\fP\:).
To copy commits, see \%\fBhg help graft\fP\:.
.sp
If you don\(aqt specify a destination changeset (\fB\-d/\-\-dest\fP), rebase
will use the same logic as \%\fBhg merge\fP\: to pick a destination.  if
the current branch contains exactly one other head, the other head
is merged with by default.  Otherwise, an explicit revision with
which to merge with must be provided.  (destination changeset is not
modified by rebasing, but new changesets are added as its
descendants.)
.sp
Here are the ways to select changesets:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP 1. 3
.
Explicitly select them using \fB\-\-rev\fP.
.IP 2. 3
.
Use \fB\-\-source\fP to select a root changeset and include all of its
descendants.
.IP 3. 3
.
Use \fB\-\-base\fP to select a changeset; rebase will find ancestors
and their descendants which are not also ancestors of the destination.
.IP 4. 3
.
If you do not specify any of \fB\-\-rev\fP, \fB\-\-source\fP, or \fB\-\-base\fP,
rebase will use \fB\-\-base .\fP as above.
.UNINDENT
.UNINDENT
.UNINDENT
.sp
If \fB\-\-source\fP or \fB\-\-rev\fP is used, special names \fBSRC\fP and \fBALLSRC\fP
can be used in \fB\-\-dest\fP. Destination would be calculated per source
revision with \fBSRC\fP substituted by that single source revision and
\fBALLSRC\fP substituted by all source revisions.
.sp
Rebase will destroy original changesets unless you use \fB\-\-keep\fP.
It will also move your bookmarks (even if you do).
.sp
Some changesets may be dropped if they do not contribute changes
(e.g. merges from the destination branch).
.sp
Unlike \fBmerge\fP, rebase will do nothing if you are at the branch tip of
a named branch with two heads. You will need to explicitly specify source
and/or destination.
.sp
If you need to use a tool to automate merge/conflict decisions, you
can specify one with \fB\-\-tool\fP, see \%\fBhg help merge\-tools\fP\:.
As a caveat: the tool will not be used to mediate when a file was
deleted, there is no hook presently available for this.
.sp
If a rebase is interrupted to manually resolve a conflict, it can be
continued with \-\-continue/\-c, aborted with \-\-abort/\-a, or stopped with
\-\-stop.
.sp
Examples:
.INDENT 0.0
.IP \(bu 2
.
move "local changes" (current commit back to branching point)
to the current branch tip after a pull:
.sp
.nf
.ft C
hg rebase
.ft P
.fi
.IP \(bu 2
.
move a single changeset to the stable branch:
.sp
.nf
.ft C
hg rebase \-r 5f493448 \-d stable
.ft P
.fi
.IP \(bu 2
.
splice a commit and all its descendants onto another part of history:
.sp
.nf
.ft C
hg rebase \-\-source c0c3 \-\-dest 4cf9
.ft P
.fi
.IP \(bu 2
.
rebase everything on a branch marked by a bookmark onto the
default branch:
.sp
.nf
.ft C
hg rebase \-\-base myfeature \-\-dest default
.ft P
.fi
.IP \(bu 2
.
collapse a sequence of changes into a single commit:
.sp
.nf
.ft C
hg rebase \-\-collapse \-r 1520:1525 \-d .
.ft P
.fi
.IP \(bu 2
.
move a named branch while preserving its name:
.sp
.nf
.ft C
hg rebase \-r "branch(featureX)" \-d 1.3 \-\-keepbranches
.ft P
.fi
.IP \(bu 2
.
stabilize orphaned changesets so history looks linear:
.sp
.nf
.ft C
hg rebase \-r \(aqorphan()\-obsolete()\(aq \-d \(aqfirst(max((successors(max(roots(ALLSRC) & ::SRC)^)\-obsolete())::) + max(::((roots(ALLSRC) & ::SRC)^)\-obsolete()))\(aq
.ft P
.fi
.UNINDENT
.sp
Configuration Options:
.sp
You can make rebase require a destination if you set the following config
option:
.sp
.nf
.ft C
[commands]
rebase.requiredest = True
.ft P
.fi
.sp
By default, rebase will close the transaction after each commit. For
performance purposes, you can configure rebase to use a single transaction
across the entire rebase. WARNING: This setting introduces a significant
risk of losing the work you\(aqve done in a rebase if the rebase aborts
unexpectedly:
.sp
.nf
.ft C
[rebase]
singletransaction = True
.ft P
.fi
.sp
By default, rebase writes to the working copy, but you can configure it to
run in\-memory for better performance. When the rebase is not moving the
parent(s) of the working copy (AKA the "currently checked out changesets"),
this may also allow it to run even if the working copy is dirty:
.sp
.nf
.ft C
[rebase]
experimental.inmemory = True
.ft P
.fi
.sp
Return Values:
.sp
Returns 0 on success, 1 if nothing to rebase or there are
unresolved conflicts.
.sp
Options:
.INDENT 0.0
.TP
.BI \-s,  \-\-source \ <REV[+]>
.
rebase the specified changesets and their descendants
.TP
.BI \-b,  \-\-base \ <REV[+]>
.
rebase everything from branching point of specified changeset
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
rebase these revisions
.TP
.BI \-d,  \-\-dest \ <REV>
.
rebase onto the specified changeset
.TP
.B \-\-collapse
.
collapse the rebased changesets
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as collapse commit message
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read collapse commit message from file
.TP
.B \-k,  \-\-keep
.
keep original changesets
.TP
.B \-\-keepbranches
.
keep original branch names
.TP
.B \-D,  \-\-detach
.
(DEPRECATED)
.TP
.B \-i,  \-\-interactive
.
(DEPRECATED)
.TP
.BI \-t,  \-\-tool \ <VALUE>
.
specify merge tool
.TP
.B \-\-stop
.
stop interrupted rebase
.TP
.B \-c,  \-\-continue
.
continue an interrupted rebase
.TP
.B \-a,  \-\-abort
.
abort an interrupted rebase
.TP
.BI \-\-auto\-orphans \ <VALUE>
.
automatically rebase orphan revisions in the specified revset (EXPERIMENTAL)
.TP
.B \-n,  \-\-dry\-run
.
do not perform actions, just print output
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.TP
.B \-\-confirm
.
ask before applying actions
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS record
.sp
commands to interactively select changes for commit/qrefresh (DEPRECATED)
.sp
The feature provided by this extension has been moved into core Mercurial as
\%\fBhg commit \-\-interactive\fP\:.
.SS Commands
.SS Change creation
.SS qrecord
.sp
interactively record a new patch:
.sp
.nf
.ft C
hg qrecord [OPTION]... PATCH [FILE]...
.ft P
.fi
.sp
See \%\fBhg help qnew\fP\: & \%\fBhg help record\fP\: for more information and
usage.
.SS record
.sp
interactively select changes to commit:
.sp
.nf
.ft C
hg record [OPTION]... [FILE]...
.ft P
.fi
.sp
If a list of files is omitted, all changes reported by \%\fBhg status\fP\:
will be candidates for recording.
.sp
See \%\fBhg help dates\fP\: for a list of formats valid for \-d/\-\-date.
.sp
If using the text interface (see \%\fBhg help config\fP\:),
you will be prompted for whether to record changes to each
modified file, and for files with multiple changes, for each
change to use. For each query, the following responses are
possible:
.sp
.nf
.ft C
y \- record this change
n \- skip this change
e \- edit this change manually

s \- skip remaining changes to this file
f \- record remaining changes to this file

d \- done, skip remaining changes and files
a \- record all changes to all remaining files
q \- quit, recording no changes

? \- display help
.ft P
.fi
.sp
This command is not available when committing a merge.
.sp
Options:
.INDENT 0.0
.TP
.B \-A,  \-\-addremove
.
mark new/missing files as added/removed before committing
.TP
.B \-\-close\-branch
.
mark a branch head as closed
.TP
.B \-\-amend
.
amend the parent of the working directory
.TP
.B \-s,  \-\-secret
.
use the secret phase for committing
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-\-force\-close\-branch
.
forcibly close branch from a non\-head changeset (ADVANCED)
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.TP
.B \-S,  \-\-subrepos
.
recurse into subrepositories
.TP
.B \-w,  \-\-ignore\-all\-space
.
ignore white space when comparing lines
.TP
.B \-b,  \-\-ignore\-space\-change
.
ignore changes in the amount of white space
.TP
.B \-B,  \-\-ignore\-blank\-lines
.
ignore changes whose lines are all blank
.TP
.B \-Z,  \-\-ignore\-space\-at\-eol
.
ignore changes in whitespace at EOL
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS releasenotes
.sp
generate release notes from commit messages (EXPERIMENTAL)
.sp
It is common to maintain files detailing changes in a project between
releases. Maintaining these files can be difficult and time consuming.
The \%\fBhg releasenotes\fP\: command provided by this extension makes the
process simpler by automating it.
.SS Commands
.SS Change navigation
.SS releasenotes
.sp
parse release notes from commit messages into an output file:
.sp
.nf
.ft C
hg releasenotes [\-r REV] [\-c] FILE
.ft P
.fi
.sp
Given an output file and set of revisions, this command will parse commit
messages for release notes then add them to the output file.
.sp
Release notes are defined in commit messages as ReStructuredText
directives. These have the form:
.sp
.nf
.ft C
\&.. directive:: title

   content
.ft P
.fi
.sp
Each \fBdirective\fP maps to an output section in a generated release notes
file, which itself is ReStructuredText. For example, the \fB.. feature::\fP
directive would map to a \fBNew Features\fP section.
.sp
Release note directives can be either short\-form or long\-form. In short\-
form, \fBtitle\fP is omitted and the release note is rendered as a bullet
list. In long form, a sub\-section with the title \fBtitle\fP is added to the
section.
.sp
The \fBFILE\fP argument controls the output file to write gathered release
notes to. The format of the file is:
.sp
.nf
.ft C
Section 1
=========

\&...

Section 2
=========

\&...
.ft P
.fi
.sp
Only sections with defined release notes are emitted.
.sp
If a section only has short\-form notes, it will consist of bullet list:
.sp
.nf
.ft C
Section
=======

* Release note 1
* Release note 2
.ft P
.fi
.sp
If a section has long\-form notes, sub\-sections will be emitted:
.sp
.nf
.ft C
Section
=======

Note 1 Title
\-\-\-\-\-\-\-\-\-\-\-\-

Description of the first long\-form note.

Note 2 Title
\-\-\-\-\-\-\-\-\-\-\-\-

Description of the second long\-form note.
.ft P
.fi
.sp
If the \fBFILE\fP argument points to an existing file, that file will be
parsed for release notes having the format that would be generated by this
command. The notes from the processed commit messages will be \fImerged\fP
into this parsed set.
.sp
During release notes merging:
.INDENT 0.0
.IP \(bu 2
.
Duplicate items are automatically ignored
.IP \(bu 2
.
Items that are different are automatically ignored if the similarity is
greater than a threshold.
.UNINDENT
.sp
This means that the release notes file can be updated independently from
this command and changes should not be lost when running this command on
that file. A particular use case for this is to tweak the wording of a
release note after it has been added to the release notes file.
.sp
The \-c/\-\-check option checks the commit message for invalid admonitions.
.sp
The \-l/\-\-list option, presents the user with a list of existing available
admonitions along with their title. This also includes the custom
admonitions (if any).
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV>
.
revisions to process for release notes
.TP
.B \-c,  \-\-check
.
checks for validity of admonitions (if any)
.TP
.B \-l,  \-\-list
.
list the available admonitions with their title
.UNINDENT
.SS Uncategorized commands
.SS relink
.sp
recreates hardlinks between repository clones
.SS Commands
.SS Repository maintenance
.SS relink
.sp
recreate hardlinks between two repositories:
.sp
.nf
.ft C
hg relink [ORIGIN]
.ft P
.fi
.sp
When repositories are cloned locally, their data files will be
hardlinked so that they only use the space of a single repository.
.sp
Unfortunately, subsequent pulls into either repository will break
hardlinks for any files touched by the new changesets, even if
both repositories end up pulling the same changes.
.sp
Similarly, passing \-\-rev to "hg clone" will fail to use any
hardlinks, falling back to a complete copy of the source
repository.
.sp
This command lets you recreate those hardlinks and reclaim that
wasted space.
.sp
This repository will be relinked to share space with ORIGIN, which
must be on the same local disk. If ORIGIN is omitted, looks for
"default\-relink", then "default", in [paths].
.sp
Do not attempt any read operations on this repository while the
command is running. (Both repositories will be locked against
writes.)
.SS remotefilelog
.sp
remotefilelog causes Mercurial to lazilly fetch file contents (EXPERIMENTAL)
.sp
This extension is HIGHLY EXPERIMENTAL. There are NO BACKWARDS COMPATIBILITY
GUARANTEES. This means that repositories created with this extension may
only be usable with the exact version of this extension/Mercurial that was
used. The extension attempts to enforce this in order to prevent repository
corruption.
.sp
remotefilelog works by fetching file contents lazily and storing them
in a cache on the client rather than in revlogs. This allows enormous
histories to be transferred only partially, making them easier to
operate on.
.sp
Configs:
.INDENT 0.0
.INDENT 3.5
.sp
\fBpacks.maxchainlen\fP specifies the maximum delta chain length in pack files
.sp
\fBpacks.maxpacksize\fP specifies the maximum pack file size
.INDENT 0.0
.TP
.B \fBpacks.maxpackfilecount\fP specifies the maximum number of packs in the
.sp
shared cache (trees only for now)
.UNINDENT
.sp
\fBremotefilelog.backgroundprefetch\fP runs prefetch in background when True
.INDENT 0.0
.TP
.B \fBremotefilelog.bgprefetchrevs\fP specifies revisions to fetch on commit and
.sp
update, and on other commands that use them. Different from pullprefetch.
.UNINDENT
.sp
\fBremotefilelog.gcrepack\fP does garbage collection during repack when True
.INDENT 0.0
.TP
.B \fBremotefilelog.nodettl\fP specifies maximum TTL of a node in seconds before
.sp
it is garbage collected
.UNINDENT
.sp
\fBremotefilelog.repackonhggc\fP runs repack on hg gc when True
.INDENT 0.0
.TP
.B \fBremotefilelog.prefetchdays\fP specifies the maximum age of a commit in
.sp
days after which it is no longer prefetched.
.TP
.B \fBremotefilelog.prefetchdelay\fP specifies delay between background
.sp
prefetches in seconds after operations that change the working copy parent
.TP
.B \fBremotefilelog.data.gencountlimit\fP constraints the minimum number of data
.sp
pack files required to be considered part of a generation. In particular,
minimum number of packs files > gencountlimit.
.TP
.B \fBremotefilelog.data.generations\fP list for specifying the lower bound of
.sp
each generation of the data pack files. For example, list [\(aq100MB\(aq,\(aq1MB\(aq]
or [\(aq1MB\(aq, \(aq100MB\(aq] will lead to three generations: [0, 1MB), [
1MB, 100MB) and [100MB, infinity).
.TP
.B \fBremotefilelog.data.maxrepackpacks\fP the maximum number of pack files to
.sp
include in an incremental data repack.
.TP
.B \fBremotefilelog.data.repackmaxpacksize\fP the maximum size of a pack file for
.sp
it to be considered for an incremental data repack.
.TP
.B \fBremotefilelog.data.repacksizelimit\fP the maximum total size of pack files
.sp
to include in an incremental data repack.
.TP
.B \fBremotefilelog.history.gencountlimit\fP constraints the minimum number of
.sp
history pack files required to be considered part of a generation. In
particular, minimum number of packs files > gencountlimit.
.TP
.B \fBremotefilelog.history.generations\fP list for specifying the lower bound of
.sp
each generation of the history pack files. For example, list [
\(aq100MB\(aq, \(aq1MB\(aq] or [\(aq1MB\(aq, \(aq100MB\(aq] will lead to three generations: [
0, 1MB), [1MB, 100MB) and [100MB, infinity).
.TP
.B \fBremotefilelog.history.maxrepackpacks\fP the maximum number of pack files to
.sp
include in an incremental history repack.
.TP
.B \fBremotefilelog.history.repackmaxpacksize\fP the maximum size of a pack file
.sp
for it to be considered for an incremental history repack.
.TP
.B \fBremotefilelog.history.repacksizelimit\fP the maximum total size of pack
.sp
files to include in an incremental history repack.
.TP
.B \fBremotefilelog.backgroundrepack\fP automatically consolidate packs in the
.sp
background
.UNINDENT
.sp
\fBremotefilelog.cachepath\fP path to cache
.INDENT 0.0
.TP
.B \fBremotefilelog.cachegroup\fP if set, make cache directory sgid to this
.sp
group
.UNINDENT
.sp
\fBremotefilelog.cacheprocess\fP binary to invoke for fetching file data
.sp
\fBremotefilelog.debug\fP turn on remotefilelog\-specific debug output
.sp
\fBremotefilelog.excludepattern\fP pattern of files to exclude from pulls
.sp
\fBremotefilelog.includepattern\fP pattern of files to include in pulls
.INDENT 0.0
.TP
.B \fBremotefilelog.fetchwarning\fP: message to print when too many
.sp
single\-file fetches occur
.UNINDENT
.sp
\fBremotefilelog.getfilesstep\fP number of files to request in a single RPC
.INDENT 0.0
.TP
.B \fBremotefilelog.getfilestype\fP if set to \(aqthreaded\(aq use threads to fetch
.sp
files, otherwise use optimistic fetching
.TP
.B \fBremotefilelog.pullprefetch\fP revset for selecting files that should be
.sp
eagerly downloaded rather than lazily
.TP
.B \fBremotefilelog.reponame\fP name of the repo. If set, used to partition
.sp
data from other repos in a shared store.
.UNINDENT
.sp
\fBremotefilelog.server\fP if true, enable server\-side functionality
.sp
\fBremotefilelog.servercachepath\fP path for caching blobs on the server
.INDENT 0.0
.TP
.B \fBremotefilelog.serverexpiration\fP number of days to keep cached server
.sp
blobs
.TP
.B \fBremotefilelog.validatecache\fP if set, check cache entries for corruption
.sp
before returning blobs
.TP
.B \fBremotefilelog.validatecachelog\fP if set, check cache entries for
.sp
corruption before returning metadata
.UNINDENT
.UNINDENT
.UNINDENT
.SS Commands
.SS Repository maintenance
.SS prefetch
.sp
prefetch file revisions from the server:
.sp
.nf
.ft C
hg prefetch [OPTIONS] [FILE...]
.ft P
.fi
.sp
Prefetchs file revisions for the specified revs and stores them in the
local remotefilelog cache.  If no rev is specified, the default rev is
used which is the union of dot, draft, pullprefetch and bgprefetchrev.
File names or patterns can be used to limit which files are downloaded.
.sp
Return 0 on success.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV[+]>
.
prefetch the specified revisions
.TP
.B \-\-repack
.
run repack after prefetch
.TP
.BI \-b,  \-\-base \ <VALUE>
.
rev that is assumed to already be local
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS Uncategorized commands
.SS gc
.sp
garbage collect the client and server filelog caches:
.sp
.nf
.ft C
hg gc [REPO...]
.ft P
.fi
.sp
garbage collect the client and server filelog caches
.SS repack
.sp
.nf
.ft C
hg repack [OPTIONS]
.ft P
.fi
.sp
Options:
.INDENT 0.0
.TP
.B \-\-background
.
run in a background process
.TP
.B \-\-incremental
.
do an incremental repack
.TP
.B \-\-packsonly
.
only repack packs (skip loose objects)
.UNINDENT
.SS verifyremotefilelog
.sp
.nf
.ft C
hg verifyremotefilelogs <directory>
.ft P
.fi
.sp
Options:
.INDENT 0.0
.TP
.B \-d,  \-\-decompress
.
decompress the filelogs first
.UNINDENT
.SS remotenames
.INDENT 0.0
.INDENT 3.5
.sp
showing remotebookmarks and remotebranches in UI (EXPERIMENTAL)
.UNINDENT
.UNINDENT
.sp
By default both remotebookmarks and remotebranches are turned on. Config knob to
control the individually are as follows.
.sp
Config options to tweak the default behaviour:
.INDENT 0.0
.TP
.B remotenames.bookmarks
.
Boolean value to enable or disable showing of remotebookmarks (default: True)
.TP
.B remotenames.branches
.
Boolean value to enable or disable showing of remotebranches (default: True)
.TP
.B remotenames.hoistedpeer
.
Name of the peer whose remotebookmarks should be hoisted into the top\-level
namespace (default: \(aqdefault\(aq)
.UNINDENT
.SS schemes
.sp
extend schemes with shortcuts to repository swarms
.sp
This extension allows you to specify shortcuts for parent URLs with a
lot of repositories to act like a scheme, for example:
.sp
.nf
.ft C
[schemes]
py = http://code.python.org/hg/
.ft P
.fi
.sp
After that you can use it like:
.sp
.nf
.ft C
hg clone py://trunk/
.ft P
.fi
.sp
Additionally there is support for some more complex schemas, for
example used by Google Code:
.sp
.nf
.ft C
[schemes]
gcode = http://{1}.googlecode.com/hg/
.ft P
.fi
.sp
The syntax is taken from Mercurial templates, and you have unlimited
number of variables, starting with \fB{1}\fP and continuing with
\fB{2}\fP, \fB{3}\fP and so on. This variables will receive parts of URL
supplied, split by \fB/\fP. Anything not specified as \fB{part}\fP will be
just appended to an URL.
.sp
For convenience, the extension adds these schemes by default:
.sp
.nf
.ft C
[schemes]
py = http://hg.python.org/
bb = https://bitbucket.org/
bb+ssh = ssh://hg@bitbucket.org/
gcode = https://{1}.googlecode.com/hg/
kiln = https://{1}.kilnhg.com/Repo/
.ft P
.fi
.sp
You can override a predefined scheme by defining a new scheme with the
same name.
.SS Commands
.SS Uncategorized commands
.SS share
.sp
share a common history between several working directories
.sp
The share extension introduces a new command \%\fBhg share\fP\: to create a new
working directory. This is similar to \%\fBhg clone\fP\:, but doesn\(aqt involve
copying or linking the storage of the repository. This allows working on
different branches or changes in parallel without the associated cost in
terms of disk space.
.sp
Note: destructive operations or extensions like \%\fBhg rollback\fP\: should be
used with care as they can result in confusing problems.
.SS Automatic Pooled Storage for Clones
.sp
When this extension is active, \%\fBhg clone\fP\: can be configured to
automatically share/pool storage across multiple clones. This
mode effectively converts \%\fBhg clone\fP\: to \%\fBhg clone\fP\: + \%\fBhg share\fP\:.
The benefit of using this mode is the automatic management of
store paths and intelligent pooling of related repositories.
.sp
The following \fBshare.\fP config options influence this feature:
.INDENT 0.0
.TP
.B \fBshare.pool\fP
.sp
Filesystem path where shared repository data will be stored. When
defined, \%\fBhg clone\fP\: will automatically use shared repository
storage instead of creating a store inside each clone.
.TP
.B \fBshare.poolnaming\fP
.sp
How directory names in \fBshare.pool\fP are constructed.
.sp
"identity" means the name is derived from the first changeset in the
repository. In this mode, different remotes share storage if their
root/initial changeset is identical. In this mode, the local shared
repository is an aggregate of all encountered remote repositories.
.sp
"remote" means the name is derived from the source repository\(aqs
path or URL. In this mode, storage is only shared if the path or URL
requested in the \%\fBhg clone\fP\: command matches exactly to a repository
that was cloned before.
.sp
The default naming mode is "identity".
.UNINDENT
.sp
Sharing requirements and configs of source repository with shares:
.sp
By default creating a shared repository only enables sharing a common
history and does not share requirements and configs between them. This
may lead to problems in some cases, for example when you upgrade the
storage format from one repository but does not set related configs
in the shares.
.sp
Setting \fIformat.exp\-share\-safe = True\fP enables sharing configs and
requirements. This only applies to shares which are done after enabling
the config option.
.sp
For enabling this in existing shares, enable the config option and reshare.
.sp
For resharing existing shares, make sure your working directory is clean
and there are no untracked files, delete that share and create a new share.
.SS Commands
.SS Repository creation
.SS share
.sp
create a new shared repository:
.sp
.nf
.ft C
hg share [\-U] [\-B] SOURCE [DEST]
.ft P
.fi
.sp
Initialize a new repository and working directory that shares its
history (and optionally bookmarks) with another repository.
.IP Note
.
using rollback or extensions that destroy/modify history (mq,
rebase, etc.) can cause considerable confusion with shared
clones. In particular, if two shared clones are both updated to
the same changeset, and one of them destroys that changeset
with rollback, the other clone will suddenly stop working: all
operations will fail with "abort: working directory has unknown
parent". The only known workaround is to use debugsetparents on
the broken clone to reset it to a changeset that still exists.
.RE
.sp
Options:
.INDENT 0.0
.TP
.B \-U,  \-\-noupdate
.
do not create a working directory
.TP
.B \-B,  \-\-bookmarks
.
also share bookmarks
.TP
.B \-\-relative
.
point to source using a relative path
.UNINDENT
.SS Repository maintenance
.SS unshare
.sp
convert a shared repository to a normal one:
.sp
.nf
.ft C
hg unshare
.ft P
.fi
.sp
Copy the store data to the repo and remove the sharedpath data.
.SS show
.sp
unified command to show various repository information (EXPERIMENTAL)
.sp
This extension provides the \%\fBhg show\fP\: command, which provides a central
command for displaying commonly\-accessed repository data and views of that
data.
.sp
The following config options can influence operation.
.SS \fBcommands\fP
.INDENT 0.0
.TP
.B \fBshow.aliasprefix\fP
.sp
List of strings that will register aliases for views. e.g. \fBs\fP will
effectively set config options \fBalias.s<view> = show <view>\fP for all
views. i.e. \fIhg swork\fP would execute \fIhg show work\fP.
.sp
Aliases that would conflict with existing registrations will not be
performed.
.UNINDENT
.SS Commands
.SS Change navigation
.SS show
.sp
show various repository information:
.sp
.nf
.ft C
hg show VIEW
.ft P
.fi
.sp
A requested view of repository data is displayed.
.sp
If no view is requested, the list of available views is shown and the
command aborts.
.IP Note
.
There are no backwards compatibility guarantees for the output of this
command. Output may change in any future Mercurial release.
.sp
Consumers wanting stable command output should specify a template via
\fB\-T/\-\-template\fP.
.RE
.sp
List of available views:
.sp
bookmarks   bookmarks and their associated changeset
.sp
stack       current line of work
.sp
work        changesets that aren\(aqt finished
.sp
Options:
.INDENT 0.0
.TP
.BI \-T,  \-\-template \ <TEMPLATE>
.
display with template
.UNINDENT
.SS sparse
.sp
allow sparse checkouts of the working directory (EXPERIMENTAL)
.sp
(This extension is not yet protected by backwards compatibility
guarantees. Any aspect may break in future releases until this
notice is removed.)
.sp
This extension allows the working directory to only consist of a
subset of files for the revision. This allows specific files or
directories to be explicitly included or excluded. Many repository
operations have performance proportional to the number of files in
the working directory. So only realizing a subset of files in the
working directory can improve performance.
.SS Sparse Config Files
.sp
The set of files that are part of a sparse checkout are defined by
a sparse config file. The file defines 3 things: includes (files to
include in the sparse checkout), excludes (files to exclude from the
sparse checkout), and profiles (links to other config files).
.sp
The file format is newline delimited. Empty lines and lines beginning
with \fB#\fP are ignored.
.sp
Lines beginning with \fB%include \(ga\(ga denote another sparse config file
to include. e.g. \(ga\(ga%include tests.sparse\fP. The filename is relative
to the repository root.
.sp
The special lines \fB[include]\fP and \fB[exclude]\fP denote the section
for includes and excludes that follow, respectively. It is illegal to
have \fB[include]\fP after \fB[exclude]\fP.
.sp
Non\-special lines resemble file patterns to be added to either includes
or excludes. The syntax of these lines is documented by \%\fBhg help patterns\fP\:.
Patterns are interpreted as \fBglob:\fP by default and match against the
root of the repository.
.sp
Exclusion patterns take precedence over inclusion patterns. So even
if a file is explicitly included, an \fB[exclude]\fP entry can remove it.
.sp
For example, say you have a repository with 3 directories, \fBfrontend/\fP,
\fBbackend/\fP, and \fBtools/\fP. \fBfrontend/\fP and \fBbackend/\fP correspond
to different projects and it is uncommon for someone working on one
to need the files for the other. But \fBtools/\fP contains files shared
between both projects. Your sparse config files may resemble:
.sp
.nf
.ft C
# frontend.sparse
frontend/**
tools/**

# backend.sparse
backend/**
tools/**
.ft P
.fi
.sp
Say the backend grows in size. Or there\(aqs a directory with thousands
of files you wish to exclude. You can modify the profile to exclude
certain files:
.sp
.nf
.ft C
[include]
backend/**
tools/**

[exclude]
tools/tests/**
.ft P
.fi
.SS Commands
.SS Uncategorized commands
.SS split
.sp
command to split a changeset into smaller ones (EXPERIMENTAL)
.SS Commands
.SS Change manipulation
.SS split
.sp
split a changeset into smaller ones:
.sp
.nf
.ft C
hg split [\-\-no\-rebase] [[\-r] REV]
.ft P
.fi
.sp
Repeatedly prompt changes and commit message for new changesets until there
is nothing left in the original changeset.
.sp
If \-\-rev was not given, split the working directory parent.
.sp
By default, rebase connected non\-obsoleted descendants onto the new
changeset. Use \-\-no\-rebase to avoid the rebase.
.sp
Options:
.INDENT 0.0
.TP
.BI \-r,  \-\-rev \ <REV>
.
revision to split
.TP
.B \-\-rebase
.
rebase descendants after split (default: True)
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.UNINDENT
.SS sqlitestore
.sp
store repository data in SQLite (EXPERIMENTAL)
.sp
The sqlitestore extension enables the storage of repository data in SQLite.
.sp
This extension is HIGHLY EXPERIMENTAL. There are NO BACKWARDS COMPATIBILITY
GUARANTEES. This means that repositories created with this extension may
only be usable with the exact version of this extension/Mercurial that was
used. The extension attempts to enforce this in order to prevent repository
corruption.
.sp
In addition, several features are not yet supported or have known bugs:
.INDENT 0.0
.IP \(bu 2
.
Only some data is stored in SQLite. Changeset, manifest, and other repository
data is not yet stored in SQLite.
.IP \(bu 2
.
Transactions are not robust. If the process is aborted at the right time
during transaction close/rollback, the repository could be in an inconsistent
state. This problem will diminish once all repository data is tracked by
SQLite.
.IP \(bu 2
.
Bundle repositories do not work (the ability to use e.g.
\fIhg \-R <bundle\-file> log\fP to automatically overlay a bundle on top of the
existing repository).
.IP \(bu 2
.
Various other features don\(aqt work.
.UNINDENT
.sp
This extension should work for basic clone/pull, update, and commit workflows.
Some history rewriting operations may fail due to lack of support for bundle
repositories.
.sp
To use, activate the extension and set the \fBstorage.new\-repo\-backend\fP config
option to \fBsqlite\fP to enable new repositories to use SQLite for storage.
.SS strip
.sp
strip changesets and their descendants from history (DEPRECATED)
.sp
The functionality of this extension has been included in core Mercurial
since version 5.7. Please use \%\fBhg debugstrip ...\fP\: instead.
.sp
This extension allows you to strip changesets and all their descendants from the
repository. See the command help for details.
.SS transplant
.sp
command to transplant changesets from another branch
.sp
This extension allows you to transplant changes to another parent revision,
possibly in another repository. The transplant is done using \(aqdiff\(aq patches.
.sp
Transplanted patches are recorded in .hg/transplant/transplants, as a
map from a changeset hash to its hash in the source repository.
.SS Commands
.SS Change manipulation
.SS transplant
.sp
transplant changesets from another branch:
.sp
.nf
.ft C
hg transplant [\-s REPO] [\-b BRANCH [\-a]] [\-p REV] [\-m REV] [REV]...
.ft P
.fi
.sp
Selected changesets will be applied on top of the current working
directory with the log of the original changeset. The changesets
are copied and will thus appear twice in the history with different
identities.
.sp
Consider using the graft command if everything is inside the same
repository \- it will use merges and will usually give a better result.
Use the rebase extension if the changesets are unpublished and you want
to move them instead of copying them.
.sp
If \-\-log is specified, log messages will have a comment appended
of the form:
.sp
.nf
.ft C
(transplanted from CHANGESETHASH)
.ft P
.fi
.sp
You can rewrite the changelog message with the \-\-filter option.
Its argument will be invoked with the current changelog message as
$1 and the patch as $2.
.sp
\-\-source/\-s specifies another repository to use for selecting changesets,
just as if it temporarily had been pulled.
If \-\-branch/\-b is specified, these revisions will be used as
heads when deciding which changesets to transplant, just as if only
these revisions had been pulled.
If \-\-all/\-a is specified, all the revisions up to the heads specified
with \-\-branch will be transplanted.
.sp
Example:
.INDENT 0.0
.IP \(bu 2
.
transplant all changes up to REV on top of your current revision:
.sp
.nf
.ft C
hg transplant \-\-branch REV \-\-all
.ft P
.fi
.UNINDENT
.sp
You can optionally mark selected transplanted changesets as merge
changesets. You will not be prompted to transplant any ancestors
of a merged transplant, and you can merge descendants of them
normally instead of transplanting them.
.sp
Merge changesets may be transplanted directly by specifying the
proper parent changeset by calling \%\fBhg transplant \-\-parent\fP\:.
.sp
If no merges or revisions are provided, \%\fBhg transplant\fP\: will
start an interactive changeset browser.
.sp
If a changeset application fails, you can fix the merge by hand
and then resume where you left off by calling \%\fBhg transplant
\-\-continue/\-c\fP\:.
.sp
Options:
.INDENT 0.0
.TP
.BI \-s,  \-\-source \ <REPO>
.
transplant changesets from REPO
.TP
.BI \-b,  \-\-branch \ <REV[+]>
.
use this source changeset as head
.TP
.B \-a,  \-\-all
.
pull all changesets up to the \-\-branch revisions
.TP
.BI \-p,  \-\-prune \ <REV[+]>
.
skip over REV
.TP
.BI \-m,  \-\-merge \ <REV[+]>
.
merge at REV
.TP
.BI \-\-parent \ <REV>
.
parent to choose when transplanting merge
.TP
.B \-e,  \-\-edit
.
invoke editor on commit messages
.TP
.B \-\-log
.
append transplant info to log message
.TP
.B \-\-stop
.
stop interrupted transplant
.TP
.B \-c,  \-\-continue
.
continue last transplant session after fixing conflicts
.TP
.BI \-\-filter \ <CMD>
.
filter changesets through command
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS uncommit
.sp
uncommit part or all of a local changeset (EXPERIMENTAL)
.sp
This command undoes the effect of a local commit, returning the affected
files to their uncommitted state. This means that files modified, added or
removed in the changeset will be left unchanged, and so will remain modified,
added and removed in the working directory.
.SS Commands
.SS Change manipulation
.SS unamend
.sp
undo the most recent amend operation on a current changeset:
.sp
.nf
.ft C
hg unamend
.ft P
.fi
.sp
This command will roll back to the previous version of a changeset,
leaving working directory in state in which it was before running
\fIhg amend\fP (e.g. files modified as part of an amend will be
marked as modified \fIhg status\fP)
.SS uncommit
.sp
uncommit part or all of a local changeset:
.sp
.nf
.ft C
hg uncommit [OPTION]... [FILE]...
.ft P
.fi
.sp
This command undoes the effect of a local commit, returning the affected
files to their uncommitted state. This means that files modified or
deleted in the changeset will be left unchanged, and so will remain
modified in the working directory.
.sp
If no files are specified, the commit will be pruned, unless \-\-keep is
given.
.sp
Options:
.INDENT 0.0
.TP
.B \-\-keep
.
allow an empty commit after uncommitting
.TP
.B \-\-allow\-dirty\-working\-copy
.
allow uncommit with outstanding changes
.TP
.BI \-n,  \-\-note \ <TEXT>
.
store a note on uncommit
.TP
.BI \-I,  \-\-include \ <PATTERN[+]>
.
include names matching the given patterns
.TP
.BI \-X,  \-\-exclude \ <PATTERN[+]>
.
exclude names matching the given patterns
.TP
.BI \-m,  \-\-message \ <TEXT>
.
use text as commit message
.TP
.BI \-l,  \-\-logfile \ <FILE>
.
read commit message from file
.TP
.BI \-d,  \-\-date \ <DATE>
.
record the specified date as commit date
.TP
.BI \-u,  \-\-user \ <USER>
.
record the specified user as committer
.TP
.B \-D,  \-\-currentdate
.
record the current date as commit date
.TP
.B \-U,  \-\-currentuser
.
record the current user as committer
.UNINDENT
.sp
[+] marked option can be specified multiple times
.SS win32mbcs
.sp
allow the use of MBCS paths with problematic encodings
.sp
Some MBCS encodings are not good for some path operations (i.e.
splitting path, case conversion, etc.) with its encoded bytes. We call
such a encoding (i.e. shift_jis and big5) as "problematic encoding".
This extension can be used to fix the issue with those encodings by
wrapping some functions to convert to Unicode string before path
operation.
.sp
This extension is useful for:
.INDENT 0.0
.IP \(bu 2
.
Japanese Windows users using shift_jis encoding.
.IP \(bu 2
.
Chinese Windows users using big5 encoding.
.IP \(bu 2
.
All users who use a repository with one of problematic encodings on
case\-insensitive file system.
.UNINDENT
.sp
This extension is not needed for:
.INDENT 0.0
.IP \(bu 2
.
Any user who use only ASCII chars in path.
.IP \(bu 2
.
Any user who do not use any of problematic encodings.
.UNINDENT
.sp
Note that there are some limitations on using this extension:
.INDENT 0.0
.IP \(bu 2
.
You should use single encoding in one repository.
.IP \(bu 2
.
If the repository path ends with 0x5c, .hg/hgrc cannot be read.
.IP \(bu 2
.
win32mbcs is not compatible with fixutf8 extension.
.UNINDENT
.sp
By default, win32mbcs uses encoding.encoding decided by Mercurial.
You can specify the encoding by config option:
.sp
.nf
.ft C
[win32mbcs]
encoding = sjis
.ft P
.fi
.sp
It is useful for the users who want to commit with UTF\-8 log message.
.SS win32text
.sp
perform automatic newline conversion (DEPRECATED)
.INDENT 0.0
.INDENT 3.5
.sp
Deprecation: The win32text extension requires each user to configure
the extension again and again for each clone since the configuration
is not copied when cloning.
.sp
We have therefore made the \fBeol\fP as an alternative. The \fBeol\fP
uses a version controlled file for its configuration and each clone
will therefore use the right settings from the start.
.UNINDENT
.UNINDENT
.sp
To perform automatic newline conversion, use:
.sp
.nf
.ft C
[extensions]
win32text =
[encode]
** = cleverencode:
# or ** = macencode:

[decode]
** = cleverdecode:
# or ** = macdecode:
.ft P
.fi
.sp
If not doing conversion, to make sure you do not commit CRLF/CR by accident:
.sp
.nf
.ft C
[hooks]
pretxncommit.crlf = python:hgext.win32text.forbidcrlf
# or pretxncommit.cr = python:hgext.win32text.forbidcr
.ft P
.fi
.sp
To do the same check on a server to prevent CRLF/CR from being
pushed or pulled:
.sp
.nf
.ft C
[hooks]
pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
# or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
.ft P
.fi
.SS zeroconf
.sp
discover and advertise repositories on the local network
.sp
The zeroconf extension will advertise \%\fBhg serve\fP\: instances over
DNS\-SD so that they can be discovered using the \%\fBhg paths\fP\: command
without knowing the server\(aqs IP address.
.sp
To allow other people to discover your repository using run
\%\fBhg serve\fP\: in your repository:
.sp
.nf
.ft C
$ cd test
$ hg serve
.ft P
.fi
.sp
You can discover Zeroconf\-enabled repositories by running
\%\fBhg paths\fP\::
.sp
.nf
.ft C
$ hg paths
zc\-test = http://example.com:8000/test
.ft P
.fi
.SH FILES
.INDENT 0.0
.TP
.B \fB/etc/mercurial/hgrc\fP, \fB$HOME/.hgrc\fP, \fB.hg/hgrc\fP
.sp
This file contains defaults and configuration. Values in
\fB.hg/hgrc\fP override those in \fB$HOME/.hgrc\fP, and these override
settings made in the global \fB/etc/mercurial/hgrc\fP configuration.
See \%\fBhgrc\fP(5)\: for details of the contents and format of these
files.
.TP
.B \fB.hgignore\fP
.sp
This file contains regular expressions (one per line) that
describe file names that should be ignored by \fBhg\fP. For details,
see \%\fBhgignore\fP(5)\:.
.TP
.B \fB.hgsub\fP
.sp
This file defines the locations of all subrepositories, and
tells where the subrepository checkouts came from. For details, see
\%\fBhg help subrepos\fP\:.
.TP
.B \fB.hgsubstate\fP
.sp
This file is where Mercurial stores all nested repository states. \fINB: This
file should not be edited manually.\fP
.TP
.B \fB.hgtags\fP
.sp
This file contains changeset hash values and text tag names (one
of each separated by spaces) that correspond to tagged versions of
the repository contents. The file content is encoded using UTF\-8.
.TP
.B \fB.hg/last\-message.txt\fP
.sp
This file is used by \%\fBhg commit\fP\: to store a backup of the commit message
in case the commit fails.
.TP
.B \fB.hg/localtags\fP
.sp
This file can be used to define local tags which are not shared among
repositories. The file format is the same as for \fB.hgtags\fP, but it is
encoded using the local system encoding.
.UNINDENT
.sp
Some commands (e.g. revert) produce backup files ending in \fB.orig\fP,
if the \fB.orig\fP file already exists and is not tracked by Mercurial,
it will be overwritten.
.SH BUGS
.sp
Probably lots, please post them to the mailing list (see \%Resources\:
below) when you find them.
.SH SEE ALSO
.sp
\%\fBhgignore\fP(5)\:, \%\fBhgrc\fP(5)\:
.SH AUTHOR
.sp
Written by Olivia Mackall <\%olivia@selenic.com\:>
.SH RESOURCES
.sp
Main Web Site: \%https://mercurial\-scm.org/\:
.sp
Source code repository: \%https://www.mercurial\-scm.org/repo/hg\:
.sp
Mailing list: \%https://www.mercurial\-scm.org/mailman/listinfo/mercurial/\:
.SH COPYING
.sp
Copyright (C) 2005\-2023 Olivia Mackall.
Free use of this software is granted under the terms of the GNU General
Public License version 2 or any later version.
.\" Common link and substitution definitions.
.
.SH AUTHOR
Olivia Mackall <olivia@selenic.com>

Organization: Mercurial
.\" Generated by docutils manpage writer.
.\" 
.