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