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