1 | <% |
---|
2 | import yaml |
---|
3 | svn = yaml.load(open('svn.yml')) |
---|
4 | packages = svn['packages'] |
---|
5 | trunks = svn['trunks'] |
---|
6 | scripts = svn['scripts'] |
---|
7 | third = svn['third'] |
---|
8 | quashes = svn['quashes'] |
---|
9 | |
---|
10 | repos = ['packages/%s' % package for package in packages] |
---|
11 | repos += ['scripts/%s' % script for script in scripts] |
---|
12 | repos += ['doc/xvm', 'scripts/osx-update', 'scripts/install-invirt'] |
---|
13 | repos += ['third/%s' % t for t in third] |
---|
14 | |
---|
15 | for package in packages: |
---|
16 | if 'merge' in packages[package]: |
---|
17 | repos.remove('packages/%s' % package) |
---|
18 | |
---|
19 | def get_repo(package): |
---|
20 | if 'merge' in packages[package]: |
---|
21 | return get_repo(packages[package]['merge']) |
---|
22 | return 'packages/%s.git' % package |
---|
23 | |
---|
24 | def get_branch(package): |
---|
25 | if 'branch' in packages[package]: |
---|
26 | return packages[package]['branch'] |
---|
27 | if 'merge' in packages[package]: |
---|
28 | return get_branch(packages[package]['merge']) |
---|
29 | return 'master' |
---|
30 | |
---|
31 | def get_tag_prefix(package): |
---|
32 | if 'merge' in packages[package]: |
---|
33 | return '%s/' % package |
---|
34 | return '' |
---|
35 | %> |
---|
36 | |
---|
37 | % for repo in repos: |
---|
38 | create repository ${repo}.git |
---|
39 | end repository |
---|
40 | |
---|
41 | % endfor |
---|
42 | |
---|
43 | % for quash in quashes: |
---|
44 | match ${quash['path']} |
---|
45 | min revision ${quash['rev']} |
---|
46 | max revision ${quash['rev']} |
---|
47 | end match |
---|
48 | % endfor |
---|
49 | |
---|
50 | % for package in packages: |
---|
51 | |
---|
52 | % if package == 'sipb-xen-database': |
---|
53 | match /trunk/packages/${package}/${package}-0/ |
---|
54 | repository ${get_repo(package)} |
---|
55 | branch ${get_branch(package)} |
---|
56 | max revision 8 |
---|
57 | end match |
---|
58 | % endif |
---|
59 | |
---|
60 | % if 'undouble' in packages[package]: |
---|
61 | match /trunk/packages/${package}/${package}/ |
---|
62 | repository ${get_repo(package)} |
---|
63 | branch ${get_branch(package)} |
---|
64 | max revision ${packages[package]['undouble'][0] - 1} |
---|
65 | end match |
---|
66 | |
---|
67 | match /package_tags/${package}/([^/~]+)/${package}/ |
---|
68 | repository ${get_repo(package)} |
---|
69 | branch refs/tags/${get_tag_prefix(package)}\1 |
---|
70 | annotated true |
---|
71 | max revision ${packages[package]['undouble'][0] - 1} |
---|
72 | end match |
---|
73 | |
---|
74 | match /trunk/packages/tmp/${package}/ |
---|
75 | min revision ${packages[package]['undouble'][0]} |
---|
76 | max revision ${packages[package]['undouble'][0]} |
---|
77 | end match |
---|
78 | |
---|
79 | match /trunk/packages/${package}/ |
---|
80 | min revision ${packages[package]['undouble'][1]} |
---|
81 | max revision ${packages[package]['undouble'][1]} |
---|
82 | end match |
---|
83 | % endif |
---|
84 | |
---|
85 | match /trunk/packages/${package}/ |
---|
86 | repository ${get_repo(package)} |
---|
87 | branch ${get_branch(package)} |
---|
88 | % if 'undouble' in packages[package]: |
---|
89 | min revision ${packages[package]['undouble'][1] + 1} |
---|
90 | % endif |
---|
91 | % if 'punt' in packages[package]: |
---|
92 | max revision ${packages[package]['punt'] - 1} |
---|
93 | % endif |
---|
94 | end match |
---|
95 | |
---|
96 | match /package_tags/${package}/([^/~]+)/ |
---|
97 | repository ${get_repo(package)} |
---|
98 | branch refs/tags/${get_tag_prefix(package)}\1 |
---|
99 | annotated true |
---|
100 | % if 'undouble' in packages[package]: |
---|
101 | min revision ${packages[package]['undouble'][1]} |
---|
102 | % endif |
---|
103 | end match |
---|
104 | |
---|
105 | match /package_tags/${package}/([^/~]+)~([^/~]+)/ |
---|
106 | repository ${get_repo(package)} |
---|
107 | branch refs/tags/${get_tag_prefix(package)}\1_\2 |
---|
108 | annotated true |
---|
109 | % if 'undouble' in packages[package]: |
---|
110 | min revision ${packages[package]['undouble'][1]} |
---|
111 | % endif |
---|
112 | end match |
---|
113 | |
---|
114 | % endfor |
---|
115 | |
---|
116 | match /trunk/packages/(xen-common|xen-3.1)/ |
---|
117 | end match |
---|
118 | |
---|
119 | match /package_tags/(xen-common|xen-3.1)/ |
---|
120 | end match |
---|
121 | |
---|
122 | % for trunk in trunks: |
---|
123 | % if 'inclusive' in trunks[trunk]: |
---|
124 | match /trunk/${trunk}(/|$) |
---|
125 | % else: |
---|
126 | match /trunk/${trunk}/ |
---|
127 | % endif |
---|
128 | repository ${get_repo(trunks[trunk]['merge'])} |
---|
129 | % if 'branch' in trunks[trunk]: |
---|
130 | branch ${trunks[trunk]['branch']} |
---|
131 | % else: |
---|
132 | branch ${get_branch(trunks[trunk]['merge'])} |
---|
133 | % endif |
---|
134 | % if 'inclusive' in trunks[trunk]: |
---|
135 | max revision ${trunks[trunk]['punt']} |
---|
136 | % else: |
---|
137 | max revision ${trunks[trunk]['punt'] - 1} |
---|
138 | % endif |
---|
139 | end match |
---|
140 | % endfor |
---|
141 | |
---|
142 | match /trunk/vnc/tightvnc-1.3.9_javasrc.zip |
---|
143 | end match |
---|
144 | |
---|
145 | % for script in scripts: |
---|
146 | match /trunk/scripts/${script}/ |
---|
147 | repository scripts/${script}.git |
---|
148 | branch master |
---|
149 | end match |
---|
150 | % endfor |
---|
151 | |
---|
152 | match /trunk/scripts/ |
---|
153 | repository scripts/osx-update.git |
---|
154 | branch master |
---|
155 | min revision 1785 |
---|
156 | max revision 1785 |
---|
157 | end match |
---|
158 | |
---|
159 | match /trunk/scripts/ |
---|
160 | repository scripts/install-invirt.git |
---|
161 | branch master |
---|
162 | min revision 2026 |
---|
163 | max revision 2026 |
---|
164 | end match |
---|
165 | |
---|
166 | match /trunk/scripts/ |
---|
167 | repository scripts/prod-migration.git |
---|
168 | branch master |
---|
169 | max revision 1863 |
---|
170 | end match |
---|
171 | |
---|
172 | % for t in third: |
---|
173 | match /trunk/third/${t}/ |
---|
174 | repository third/${t}.git |
---|
175 | branch master |
---|
176 | end match |
---|
177 | |
---|
178 | match /third_tags/${t}/([^/~]+)/ |
---|
179 | repository third/${t}.git |
---|
180 | branch refs/tags/\1 |
---|
181 | annotated true |
---|
182 | end match |
---|
183 | % endfor |
---|
184 | |
---|
185 | % for rev in [803, 804, 925, 926, 928, 1537, 1566]: |
---|
186 | match /trunk/ |
---|
187 | repository doc/xvm.git |
---|
188 | branch master |
---|
189 | min revision ${rev} |
---|
190 | max revision ${rev} |
---|
191 | end match |
---|
192 | % endfor |
---|
193 | |
---|
194 | match /trunk/vmctl/ |
---|
195 | end match |
---|
196 | |
---|
197 | match /trunk/COPYING$ |
---|
198 | end match |
---|
199 | |
---|
200 | match /branches/wsgi/ |
---|
201 | end match |
---|