1 | <% |
---|
2 | packages = [line.strip() for line in open('package-list')] |
---|
3 | packages.append('packages/xvm-console-devconfig') |
---|
4 | repos = packages |
---|
5 | packages = [package[len('packages/'):] for package in packages] |
---|
6 | |
---|
7 | doubled_packages = { |
---|
8 | 'sipb-xen-guest-installer': (310, 310), |
---|
9 | 'sipb-xen-base': (314, 315), |
---|
10 | 'sipb-xen-database': (311, 313), |
---|
11 | 'sipb-xen-dev': (314, 315), |
---|
12 | 'sipb-xen-dom0': (314, 315), |
---|
13 | 'sipb-xen-remctl-auto': (314, 315), |
---|
14 | } |
---|
15 | |
---|
16 | punt = { |
---|
17 | 'xvm-console-devconfig': 700, |
---|
18 | 'sipb-xen-guest-installer': 742, |
---|
19 | 'sipb-xen-remote-server': 1176, |
---|
20 | 'sipb-xen-dns': 1184, |
---|
21 | 'sipb-xen-console-server': 1187, |
---|
22 | 'sipb-xen-console': 1201, |
---|
23 | 'sipb-xen-base': 1350, |
---|
24 | 'sipb-xen-chrony-config': 1351, |
---|
25 | 'sipb-xen-database': 1352, |
---|
26 | 'sipb-xen-dev': 1353, |
---|
27 | 'sipb-xen-dom0': 1354, |
---|
28 | 'sipb-xen-host-master': 1355, |
---|
29 | 'sipb-xen-iptables': 1356, |
---|
30 | 'sipb-xen-python-pydhcplib': 1357, |
---|
31 | 'sipb-xen-remctl-auto': 1358, |
---|
32 | 'sipb-xen-vnc-client': 1359, |
---|
33 | 'sipb-xen-www': 1360, |
---|
34 | 'sipb-xen-vnc-server': 1387, |
---|
35 | 'sipb-xen-dhcp': 1436, |
---|
36 | 'sipb-xen-autoinstaller': 1569, |
---|
37 | 'sipb-xen-clvm-config': 1569, |
---|
38 | 'invirt-console-host': 1816, |
---|
39 | 'invirt-console-server': 1816, |
---|
40 | 'invirt-remote-host': 1822, |
---|
41 | 'invirt-remote-server': 1822, |
---|
42 | } |
---|
43 | |
---|
44 | merges = [] |
---|
45 | for line in open('merges'): |
---|
46 | line = line.strip() |
---|
47 | if line == '' or line[0] == '#': |
---|
48 | continue |
---|
49 | |
---|
50 | merges.append(line.split()) |
---|
51 | |
---|
52 | merge_map = {} |
---|
53 | merge_count = {} |
---|
54 | merge_n = {} |
---|
55 | for merge in merges: |
---|
56 | repos.remove('packages/%s' % merge[0]) |
---|
57 | merge_map[merge[0]] = merge[1] |
---|
58 | if int(merge[2]) == 0: |
---|
59 | merge_count[merge[1]] = merge_count.get(merge[1], 0) + 1 |
---|
60 | else: |
---|
61 | merge_n[merge[0]] = int(merge[2]) |
---|
62 | |
---|
63 | def get_repo(package): |
---|
64 | if package in merge_map: |
---|
65 | return get_repo(merge_map[package]) |
---|
66 | return 'packages/%s.git' % package |
---|
67 | |
---|
68 | def get_branch(package): |
---|
69 | if package in merge_map: |
---|
70 | if package in merge_n or merge_count[merge_map[package]] > 1: |
---|
71 | return package |
---|
72 | return get_branch(merge_map[package]) |
---|
73 | return 'master' |
---|
74 | |
---|
75 | def get_tag_prefix(package): |
---|
76 | if package in merge_map: |
---|
77 | return '%s/' % package |
---|
78 | return '' |
---|
79 | %> |
---|
80 | |
---|
81 | % for repo in repos: |
---|
82 | create repository ${repo}.git |
---|
83 | end repository |
---|
84 | |
---|
85 | % endfor |
---|
86 | |
---|
87 | match /package_tags/sipb-xen-dev/sipb-xen-dev(/|$) |
---|
88 | end match |
---|
89 | |
---|
90 | match /package_tags/sipb-xen-console/2(/|$) |
---|
91 | min revision 347 |
---|
92 | max revision 349 |
---|
93 | end match |
---|
94 | |
---|
95 | match /package_tags/sipb-xen-console/7.1/sipb-xen-console(/|$) |
---|
96 | min revision 401 |
---|
97 | max revision 401 |
---|
98 | end match |
---|
99 | |
---|
100 | match /package_tags/sipb-xen-guest-installer/1.0/sipb-xen-guest-installer(/|$) |
---|
101 | min revision 452 |
---|
102 | max revision 452 |
---|
103 | end match |
---|
104 | |
---|
105 | match /package_tags/sipb-xen-dev/14/sipb-xen-dev(/|$) |
---|
106 | min revision 462 |
---|
107 | max revision 463 |
---|
108 | end match |
---|
109 | |
---|
110 | match /trunk/packages/sipb-xen-autoinstaller(/|$) |
---|
111 | min revision 742 |
---|
112 | max revision 742 |
---|
113 | end match |
---|
114 | |
---|
115 | % for package in packages: |
---|
116 | |
---|
117 | % if package == 'sipb-xen-database': |
---|
118 | match /trunk/packages/${package}/${package}-0(/|$) |
---|
119 | repository ${get_repo(package)} |
---|
120 | branch ${get_branch(package)} |
---|
121 | max revision 8 |
---|
122 | end match |
---|
123 | % endif |
---|
124 | |
---|
125 | % if package in doubled_packages: |
---|
126 | match /trunk/packages/${package}/${package}(/|$) |
---|
127 | repository ${get_repo(package)} |
---|
128 | branch ${get_branch(package)} |
---|
129 | max revision ${doubled_packages[package][0] - 1} |
---|
130 | end match |
---|
131 | |
---|
132 | match /package_tags/${package}/([^/~]+)/${package}(/|$) |
---|
133 | repository ${get_repo(package)} |
---|
134 | branch tags/${get_tag_prefix(package)}\1 |
---|
135 | max revision ${doubled_packages[package][0] - 1} |
---|
136 | end match |
---|
137 | |
---|
138 | match /trunk/packages/tmp/${package}(/|$) |
---|
139 | min revision ${doubled_packages[package][0]} |
---|
140 | max revision ${doubled_packages[package][0]} |
---|
141 | end match |
---|
142 | |
---|
143 | match /trunk/packages/${package}(/|$) |
---|
144 | min revision ${doubled_packages[package][1]} |
---|
145 | max revision ${doubled_packages[package][1]} |
---|
146 | end match |
---|
147 | % endif |
---|
148 | |
---|
149 | match /trunk/packages/${package}(/|$) |
---|
150 | repository ${get_repo(package)} |
---|
151 | branch ${get_branch(package)} |
---|
152 | % if package in doubled_packages: |
---|
153 | min revision ${doubled_packages[package][1] + 1} |
---|
154 | % endif |
---|
155 | % if package in punt: |
---|
156 | max revision ${punt[package] - 1} |
---|
157 | % endif |
---|
158 | end match |
---|
159 | |
---|
160 | match /package_tags/${package}/([^/~]+)(/|$) |
---|
161 | repository ${get_repo(package)} |
---|
162 | branch tags/${get_tag_prefix(package)}\1 |
---|
163 | % if package in doubled_packages: |
---|
164 | min revision ${doubled_packages[package][1]} |
---|
165 | % endif |
---|
166 | end match |
---|
167 | |
---|
168 | match /package_tags/${package}/([^/~]+)~([^/~]+)(/|$) |
---|
169 | repository ${get_repo(package)} |
---|
170 | branch tags/${get_tag_prefix(package)}\1_\2 |
---|
171 | % if package in doubled_packages: |
---|
172 | min revision ${doubled_packages[package][1]} |
---|
173 | % endif |
---|
174 | end match |
---|
175 | |
---|
176 | % endfor |
---|
177 | |
---|
178 | match /trunk/packages/(xen-common|xen-3.1)(/|$) |
---|
179 | end match |
---|
180 | |
---|
181 | match /package_tags/(xen-common|xen-3.1)(/|$) |
---|
182 | end match |
---|
183 | |
---|
184 | match /trunk/dhcp(/|$) |
---|
185 | repository ${get_repo('sipb-xen-dhcp')} |
---|
186 | branch ${get_branch('sipb-xen-dhcp')} |
---|
187 | max revision 281 |
---|
188 | end match |
---|
189 | |
---|
190 | match /trunk/web(/|$) |
---|
191 | repository ${get_repo('sipb-xen-www')} |
---|
192 | branch ${get_branch('sipb-xen-www')} |
---|
193 | max revision 303 |
---|
194 | end match |
---|
195 | |
---|
196 | match /trunk/vnc/tightvnc-1.3.9_javasrc.zip |
---|
197 | end match |
---|
198 | |
---|
199 | match /trunk/vnc/vnc_javasrc(/|$) |
---|
200 | repository ${get_repo('sipb-xen-vnc-client')} |
---|
201 | branch ${get_branch('sipb-xen-vnc-client')} |
---|
202 | max revision 304 |
---|
203 | end match |
---|
204 | |
---|
205 | match /trunk/vnc/vnc_server(/|$) |
---|
206 | repository ${get_repo('sipb-xen-vnc-server')} |
---|
207 | branch ${get_branch('sipb-xen-vnc-server')} |
---|
208 | max revision 286 |
---|
209 | end match |
---|
210 | |
---|
211 | match /trunk/(dns|scripts|vmctl)(/|$) |
---|
212 | end match |
---|
213 | |
---|
214 | match /trunk/(COPYING|xvm-host-setup-notes) |
---|
215 | end match |
---|
216 | |
---|
217 | match /branches/wsgi(/|$) |
---|
218 | end match |
---|