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 | punt = { |
---|
8 | 'sipb-xen-base': 1350, |
---|
9 | 'sipb-xen-chrony-config': 1351, |
---|
10 | 'sipb-xen-database': 1352, |
---|
11 | 'sipb-xen-dev': 1353, |
---|
12 | 'sipb-xen-dom0': 1354, |
---|
13 | 'sipb-xen-host-master': 1355, |
---|
14 | 'sipb-xen-iptables': 1356, |
---|
15 | 'sipb-xen-python-pydhcplib': 1357, |
---|
16 | 'sipb-xen-remctl-auto': 1358, |
---|
17 | 'sipb-xen-vnc-client': 1359, |
---|
18 | 'sipb-xen-www': 1360, |
---|
19 | 'sipb-xen-vnc-server': 1387, |
---|
20 | 'sipb-xen-dhcp': 1436, |
---|
21 | 'sipb-xen-autoinstaller': 1569, |
---|
22 | 'sipb-xen-clvm-config': 1569, |
---|
23 | 'invirt-console-host': 1816, |
---|
24 | 'invirt-console-server': 1816, |
---|
25 | } |
---|
26 | |
---|
27 | merges = [] |
---|
28 | for line in open('merges'): |
---|
29 | line = line.strip() |
---|
30 | if line == '' or line[0] == '#': |
---|
31 | continue |
---|
32 | |
---|
33 | merges.append(line.split()) |
---|
34 | |
---|
35 | merge_map = {} |
---|
36 | merge_count = {} |
---|
37 | merge_n = {} |
---|
38 | for merge in merges: |
---|
39 | repos.remove('packages/%s' % merge[0]) |
---|
40 | merge_map[merge[0]] = merge[1] |
---|
41 | if int(merge[2]) == 0: |
---|
42 | merge_count[merge[1]] = merge_count.get(merge[1], 0) + 1 |
---|
43 | else: |
---|
44 | merge_n[merge[0]] = int(merge[2]) |
---|
45 | |
---|
46 | def get_repo(package): |
---|
47 | if package in merge_map: |
---|
48 | return get_repo(merge_map[package]) |
---|
49 | return 'packages/%s.git' % package |
---|
50 | |
---|
51 | def get_branch(package): |
---|
52 | if package in merge_map: |
---|
53 | if package in merge_n or merge_count[merge_map[package]] > 1: |
---|
54 | return package |
---|
55 | return get_branch(merge_map[package]) |
---|
56 | return 'master' |
---|
57 | |
---|
58 | def get_tag_prefix(package): |
---|
59 | if package in merge_map: |
---|
60 | return '%s/' % package |
---|
61 | return '' |
---|
62 | %> |
---|
63 | |
---|
64 | % for repo in repos: |
---|
65 | create repository ${repo}.git |
---|
66 | end repository |
---|
67 | |
---|
68 | % endfor |
---|
69 | |
---|
70 | match /package_tags/sipb-xen-dev/sipb-xen-dev(/|$) |
---|
71 | end match |
---|
72 | |
---|
73 | % for package in packages: |
---|
74 | match /trunk/packages/${package}/${package}(/|$) |
---|
75 | repository ${get_repo(package)} |
---|
76 | branch ${get_branch(package)} |
---|
77 | max revision 317 |
---|
78 | end match |
---|
79 | |
---|
80 | match /package_tags/${package}/([^/~]+)/${package}(/|$) |
---|
81 | repository ${get_repo(package)} |
---|
82 | branch tags/${get_tag_prefix(package)}\1 |
---|
83 | end match |
---|
84 | |
---|
85 | match /trunk/packages/${package}(/|$) |
---|
86 | repository ${get_repo(package)} |
---|
87 | branch ${get_branch(package)} |
---|
88 | % if package in punt: |
---|
89 | max revision ${punt[package] - 1} |
---|
90 | % endif |
---|
91 | end match |
---|
92 | |
---|
93 | match /package_tags/${package}/([^/~]+)(/|$) |
---|
94 | repository ${get_repo(package)} |
---|
95 | branch tags/${get_tag_prefix(package)}\1 |
---|
96 | end match |
---|
97 | |
---|
98 | match /package_tags/${package}/([^/~]+)~([^/~]+)(/|$) |
---|
99 | repository ${get_repo(package)} |
---|
100 | branch tags/${get_tag_prefix(package)}\1_\2 |
---|
101 | end match |
---|
102 | |
---|
103 | % endfor |
---|
104 | |
---|
105 | match /trunk/packages/(xen-common|xen-3.1)(/|$) |
---|
106 | end match |
---|
107 | |
---|
108 | match /package_tags/(xen-common|xen-3.1)(/|$) |
---|
109 | end match |
---|
110 | |
---|
111 | match /trunk/packages/tmp(/|$) |
---|
112 | repository ${get_repo('sipb-xen-database')} |
---|
113 | branch ${get_branch('sipb-xen-database')} |
---|
114 | end match |
---|
115 | |
---|
116 | match /trunk/dhcp(/|$) |
---|
117 | repository ${get_repo('sipb-xen-dhcp')} |
---|
118 | branch ${get_branch('sipb-xen-dhcp')} |
---|
119 | max revision 281 |
---|
120 | end match |
---|
121 | |
---|
122 | match /trunk/web(/|$) |
---|
123 | repository ${get_repo('sipb-xen-www')} |
---|
124 | branch ${get_branch('sipb-xen-www')} |
---|
125 | end match |
---|
126 | |
---|
127 | match /trunk/vnc/tightvnc-1.3.9_javasrc.zip |
---|
128 | end match |
---|
129 | |
---|
130 | match /trunk/vnc/vnc_javasrc(/|$) |
---|
131 | repository ${get_repo('sipb-xen-vnc-client')} |
---|
132 | branch ${get_branch('sipb-xen-vnc-client')} |
---|
133 | end match |
---|
134 | |
---|
135 | match /trunk/vnc/vnc_server(/|$) |
---|
136 | repository ${get_repo('sipb-xen-vnc-server')} |
---|
137 | branch ${get_branch('sipb-xen-vnc-server')} |
---|
138 | end match |
---|
139 | |
---|
140 | match /trunk/(dns|scripts|vmctl)(/|$) |
---|
141 | end match |
---|
142 | |
---|
143 | match /trunk/(COPYING|xvm-host-setup-notes) |
---|
144 | end match |
---|
145 | |
---|
146 | match /branches/wsgi(/|$) |
---|
147 | end match |
---|