[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 | |
---|
[1936] | 49 | quashes = [ |
---|
| 50 | ('/package_tags/sipb-xen-dev/sipb-xen-dev/', 11), |
---|
| 51 | ('/package_tags/sipb-xen-dev/13/', 316), |
---|
| 52 | ('/package_tags/sipb-xen-console/2/', 347), |
---|
| 53 | ('/package_tags/sipb-xen-console/2/sipb-xen-console/', 348), |
---|
| 54 | ('/package_tags/sipb-xen-console/2/', 349), |
---|
| 55 | ('/package_tags/sipb-xen-console/7.1/sipb-xen-console/', 401), |
---|
| 56 | ('/package_tags/sipb-xen-guest-installer/1.0/sipb-xen-guest-installer/', 452), |
---|
| 57 | ('/package_tags/sipb-xen-dev/14/sipb-xen-dev/', 462), |
---|
| 58 | ('/package_tags/sipb-xen-dev/14/', 463), |
---|
| 59 | ('/trunk/packages/sipb-xen-autoinstaller/', 742), |
---|
[1937] | 60 | ('/trunk/packages/invirt-console-server/', 1201), |
---|
| 61 | ('/trunk/packages/xvm-prodconfig/', 1455), |
---|
| 62 | ('/trunk/packages/invirt-xen-config/', 1757), |
---|
| 63 | ('/trunk/packages/invirt-console/', 1819), |
---|
| 64 | ('/trunk/scripts/prod-migration/', 1864), |
---|
| 65 | ('/trunk/packages/invirt-dhcp/', 1904), |
---|
[1936] | 66 | ] |
---|
| 67 | |
---|
[1901] | 68 | merges = [] |
---|
| 69 | for line in open('merges'): |
---|
| 70 | line = line.strip() |
---|
| 71 | if line == '' or line[0] == '#': |
---|
| 72 | continue |
---|
| 73 | |
---|
| 74 | merges.append(line.split()) |
---|
| 75 | |
---|
| 76 | merge_map = {} |
---|
| 77 | merge_count = {} |
---|
| 78 | merge_n = {} |
---|
| 79 | for merge in merges: |
---|
| 80 | repos.remove('packages/%s' % merge[0]) |
---|
| 81 | merge_map[merge[0]] = merge[1] |
---|
| 82 | if int(merge[2]) == 0: |
---|
| 83 | merge_count[merge[1]] = merge_count.get(merge[1], 0) + 1 |
---|
| 84 | else: |
---|
| 85 | merge_n[merge[0]] = int(merge[2]) |
---|
| 86 | |
---|
| 87 | def get_repo(package): |
---|
| 88 | if package in merge_map: |
---|
| 89 | return get_repo(merge_map[package]) |
---|
| 90 | return 'packages/%s.git' % package |
---|
| 91 | |
---|
| 92 | def get_branch(package): |
---|
| 93 | if package in merge_map: |
---|
| 94 | if package in merge_n or merge_count[merge_map[package]] > 1: |
---|
| 95 | return package |
---|
| 96 | return get_branch(merge_map[package]) |
---|
| 97 | return 'master' |
---|
| 98 | |
---|
| 99 | def get_tag_prefix(package): |
---|
| 100 | if package in merge_map: |
---|
| 101 | return '%s/' % package |
---|
| 102 | return '' |
---|
| 103 | %> |
---|
| 104 | |
---|
| 105 | % for repo in repos: |
---|
| 106 | create repository ${repo}.git |
---|
| 107 | end repository |
---|
| 108 | |
---|
| 109 | % endfor |
---|
| 110 | |
---|
[1936] | 111 | % for quash in quashes: |
---|
| 112 | match ${quash[0]} |
---|
| 113 | min revision ${quash[1]} |
---|
| 114 | max revision ${quash[1]} |
---|
[1903] | 115 | end match |
---|
[1936] | 116 | % endfor |
---|
[1903] | 117 | |
---|
[1901] | 118 | % for package in packages: |
---|
[1906] | 119 | |
---|
| 120 | % if package == 'sipb-xen-database': |
---|
[1931] | 121 | match /trunk/packages/${package}/${package}-0/ |
---|
[1906] | 122 | repository ${get_repo(package)} |
---|
| 123 | branch ${get_branch(package)} |
---|
| 124 | max revision 8 |
---|
| 125 | end match |
---|
| 126 | % endif |
---|
| 127 | |
---|
| 128 | % if package in doubled_packages: |
---|
[1931] | 129 | match /trunk/packages/${package}/${package}/ |
---|
[1901] | 130 | repository ${get_repo(package)} |
---|
| 131 | branch ${get_branch(package)} |
---|
[1906] | 132 | max revision ${doubled_packages[package][0] - 1} |
---|
[1901] | 133 | end match |
---|
| 134 | |
---|
[1931] | 135 | match /package_tags/${package}/([^/~]+)/${package}/ |
---|
[1901] | 136 | repository ${get_repo(package)} |
---|
| 137 | branch tags/${get_tag_prefix(package)}\1 |
---|
[1932] | 138 | % if package == 'sipb-xen-dev': |
---|
| 139 | max revision 318 |
---|
| 140 | % else: |
---|
[1906] | 141 | max revision ${doubled_packages[package][0] - 1} |
---|
[1932] | 142 | % endif |
---|
[1901] | 143 | end match |
---|
| 144 | |
---|
[1931] | 145 | match /trunk/packages/tmp/${package}/ |
---|
[1914] | 146 | min revision ${doubled_packages[package][0]} |
---|
| 147 | max revision ${doubled_packages[package][0]} |
---|
[1906] | 148 | end match |
---|
[1914] | 149 | |
---|
[1931] | 150 | match /trunk/packages/${package}/ |
---|
[1914] | 151 | min revision ${doubled_packages[package][1]} |
---|
| 152 | max revision ${doubled_packages[package][1]} |
---|
| 153 | end match |
---|
[1906] | 154 | % endif |
---|
| 155 | |
---|
[1931] | 156 | match /trunk/packages/${package}/ |
---|
[1901] | 157 | repository ${get_repo(package)} |
---|
| 158 | branch ${get_branch(package)} |
---|
[1906] | 159 | % if package in doubled_packages: |
---|
[1914] | 160 | min revision ${doubled_packages[package][1] + 1} |
---|
[1906] | 161 | % endif |
---|
[1905] | 162 | % if package in punt: |
---|
| 163 | max revision ${punt[package] - 1} |
---|
| 164 | % endif |
---|
[1901] | 165 | end match |
---|
| 166 | |
---|
[1931] | 167 | match /package_tags/${package}/([^/~]+)/ |
---|
[1901] | 168 | repository ${get_repo(package)} |
---|
| 169 | branch tags/${get_tag_prefix(package)}\1 |
---|
[1906] | 170 | % if package in doubled_packages: |
---|
| 171 | min revision ${doubled_packages[package][1]} |
---|
| 172 | % endif |
---|
[1901] | 173 | end match |
---|
| 174 | |
---|
[1931] | 175 | match /package_tags/${package}/([^/~]+)~([^/~]+)/ |
---|
[1901] | 176 | repository ${get_repo(package)} |
---|
| 177 | branch tags/${get_tag_prefix(package)}\1_\2 |
---|
[1906] | 178 | % if package in doubled_packages: |
---|
| 179 | min revision ${doubled_packages[package][1]} |
---|
| 180 | % endif |
---|
[1901] | 181 | end match |
---|
| 182 | |
---|
| 183 | % endfor |
---|
| 184 | |
---|
[1931] | 185 | match /trunk/packages/(xen-common|xen-3.1)/ |
---|
[1901] | 186 | end match |
---|
| 187 | |
---|
[1931] | 188 | match /package_tags/(xen-common|xen-3.1)/ |
---|
[1901] | 189 | end match |
---|
| 190 | |
---|
[1931] | 191 | match /trunk/dhcp/ |
---|
[1905] | 192 | repository ${get_repo('sipb-xen-dhcp')} |
---|
| 193 | branch ${get_branch('sipb-xen-dhcp')} |
---|
| 194 | max revision 281 |
---|
[1901] | 195 | end match |
---|
| 196 | |
---|
[1905] | 197 | match /trunk/web(/|$) |
---|
| 198 | repository ${get_repo('sipb-xen-www')} |
---|
| 199 | branch ${get_branch('sipb-xen-www')} |
---|
[1914] | 200 | max revision 303 |
---|
[1905] | 201 | end match |
---|
| 202 | |
---|
| 203 | match /trunk/vnc/tightvnc-1.3.9_javasrc.zip |
---|
| 204 | end match |
---|
| 205 | |
---|
[1931] | 206 | match /trunk/vnc/vnc_javasrc/ |
---|
[1905] | 207 | repository ${get_repo('sipb-xen-vnc-client')} |
---|
| 208 | branch ${get_branch('sipb-xen-vnc-client')} |
---|
[1914] | 209 | max revision 304 |
---|
[1905] | 210 | end match |
---|
| 211 | |
---|
| 212 | match /trunk/vnc/vnc_server(/|$) |
---|
| 213 | repository ${get_repo('sipb-xen-vnc-server')} |
---|
| 214 | branch ${get_branch('sipb-xen-vnc-server')} |
---|
[1914] | 215 | max revision 286 |
---|
[1905] | 216 | end match |
---|
| 217 | |
---|
[1931] | 218 | match /trunk/dns/ |
---|
[1920] | 219 | repository ${get_repo('sipb-xen-dns')} |
---|
| 220 | branch dns |
---|
| 221 | max revision 268 |
---|
[1905] | 222 | end match |
---|
| 223 | |
---|
[1921] | 224 | % for script in scripts: |
---|
[1931] | 225 | match /trunk/scripts/${script}/ |
---|
[1921] | 226 | repository scripts/${script}.git |
---|
| 227 | branch master |
---|
[1920] | 228 | end match |
---|
[1921] | 229 | % endfor |
---|
[1920] | 230 | |
---|
[1931] | 231 | match /trunk/scripts/ |
---|
[1921] | 232 | repository scripts/osx-update.git |
---|
| 233 | branch master |
---|
| 234 | min revision 1785 |
---|
| 235 | max revision 1785 |
---|
[1901] | 236 | end match |
---|
| 237 | |
---|
[1931] | 238 | match /trunk/scripts/ |
---|
[1921] | 239 | repository scripts/prod-migration.git |
---|
| 240 | branch master |
---|
| 241 | max revision 1863 |
---|
| 242 | end match |
---|
| 243 | |
---|
| 244 | % for rev in [803, 804, 925, 926, 928, 1537, 1566]: |
---|
[1931] | 245 | match /trunk/ |
---|
[1921] | 246 | repository doc/xvm.git |
---|
| 247 | branch master |
---|
| 248 | min revision ${rev} |
---|
| 249 | max revision ${rev} |
---|
| 250 | end match |
---|
| 251 | % endfor |
---|
| 252 | |
---|
[1931] | 253 | match /trunk/vmctl/ |
---|
[1921] | 254 | end match |
---|
| 255 | |
---|
| 256 | match /trunk/COPYING$ |
---|
| 257 | end match |
---|
| 258 | |
---|
[1931] | 259 | match /branches/wsgi/ |
---|
[1901] | 260 | end match |
---|