First run at cleaning this up; still some sections to go
[ikiwiki.git] / docs / howtos / HowToMercurial.mdwn
1 # Mercurial 
2
3
4
5 This explains how to stay up to date with your sources using mercurial ([hg](http://www.selenic.com/mercurial/)).
6
7
8
9 (!) Unlike previous Mercurial mirrors the one in anoncvs.estpak.ee have branches support. Branches support in Mercurial is still work in progress and might be buggy. HEAD is OK to use. Following assumes that at least 
10
11 Mercurial 0.9.4 is used.
12
13
14
15 Install mercurial
16
17      
18
19     cd /usr/pkgsrc/devel/mercurial && bmake install
20
21
22
23
24
25 #### Using one source tree from stable branch in /usr/src 
26
27
28
29      
30
31     cd /usr
32
33     hg clone -r HEAD http://anoncvs.estpak.ee/hg/dragonfly-src src
34
35
36
37
38
39 Later you update with 
40
41
42
43     
44
45     cd /usr/src && hg pull && hg up HEAD
46
47
48
49
50
51 #### More than one checkout 
52
53
54
55 If you need more than one checkout, maybe for development, the idea is to keep "master" tree in /home/dsrc.hg and to make local clones/checkouts from there. For example keep the latest stable in /usr/src and latest development branch in /home/user/src.
56
57
58
59     
60
61     hg clone -U http://anoncvs.estpak.ee/hg/dragonfly-src /home/dsrc.hg
62
63     hg clone -r DragonFly_RELEASE_1_8 /home/dsrc.hg /usr/src
64
65     hg clone -r HEAD /home/dsrc.hg /home/user/src
66
67
68
69
70
71 Later you update your local master repo with 
72
73
74
75     
76
77     cd /home/dsrc.hg
78
79     hg pull
80
81
82
83
84
85 Then your slave trees 
86
87
88
89     
90
91     cd /usr/src
92
93     hg pull && hg up DragonFly_RELEASE_1_8
94
95     cd /home/user/src
96
97     hg pull && hg up HEAD
98
99
100