[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']) |
---|
[1901] | 29 | return 'master' |
---|
| 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)} |
---|
| 69 | branch tags/${get_tag_prefix(package)}\1 |
---|
[1945] | 70 | max revision ${packages[package]['undouble'][0] - 1} |
---|
[1901] | 71 | end match |
---|
| 72 | |
---|
[1931] | 73 | match /trunk/packages/tmp/${package}/ |
---|
[1945] | 74 | min revision ${packages[package]['undouble'][0]} |
---|
| 75 | max revision ${packages[package]['undouble'][0]} |
---|
[1906] | 76 | end match |
---|
[1914] | 77 | |
---|
[1931] | 78 | match /trunk/packages/${package}/ |
---|
[1945] | 79 | min revision ${packages[package]['undouble'][1]} |
---|
| 80 | max revision ${packages[package]['undouble'][1]} |
---|
[1914] | 81 | end match |
---|
[1944] | 82 | % endif |
---|
[1906] | 83 | |
---|
[1931] | 84 | match /trunk/packages/${package}/ |
---|
[1901] | 85 | repository ${get_repo(package)} |
---|
| 86 | branch ${get_branch(package)} |
---|
[1945] | 87 | % if 'undouble' in packages[package]: |
---|
| 88 | min revision ${packages[package]['undouble'][1] + 1} |
---|
[1944] | 89 | % endif |
---|
[1945] | 90 | % if 'punt' in packages[package]: |
---|
| 91 | max revision ${packages[package]['punt'] - 1} |
---|
[1944] | 92 | % endif |
---|
[1901] | 93 | end match |
---|
| 94 | |
---|
[1931] | 95 | match /package_tags/${package}/([^/~]+)/ |
---|
[1901] | 96 | repository ${get_repo(package)} |
---|
| 97 | branch tags/${get_tag_prefix(package)}\1 |
---|
[1945] | 98 | % if 'undouble' in packages[package]: |
---|
| 99 | min revision ${packages[package]['undouble'][1]} |
---|
[1944] | 100 | % endif |
---|
[1901] | 101 | end match |
---|
| 102 | |
---|
[1931] | 103 | match /package_tags/${package}/([^/~]+)~([^/~]+)/ |
---|
[1901] | 104 | repository ${get_repo(package)} |
---|
| 105 | branch tags/${get_tag_prefix(package)}\1_\2 |
---|
[1945] | 106 | % if 'undouble' in packages[package]: |
---|
| 107 | min revision ${packages[package]['undouble'][1]} |
---|
[1944] | 108 | % endif |
---|
[1901] | 109 | end match |
---|
| 110 | |
---|
| 111 | % endfor |
---|
| 112 | |
---|
[1931] | 113 | match /trunk/packages/(xen-common|xen-3.1)/ |
---|
[1901] | 114 | end match |
---|
| 115 | |
---|
[1931] | 116 | match /package_tags/(xen-common|xen-3.1)/ |
---|
[1901] | 117 | end match |
---|
| 118 | |
---|
[1946] | 119 | % for trunk in trunks: |
---|
| 120 | % if 'inclusive' in trunks[trunk]: |
---|
| 121 | match /trunk/${trunk}(/|$) |
---|
| 122 | % else: |
---|
| 123 | match /trunk/${trunk}/ |
---|
| 124 | % endif |
---|
| 125 | repository ${get_repo(trunks[trunk]['merge'])} |
---|
| 126 | % if 'branch' in trunks[trunk]: |
---|
| 127 | branch ${trunks[trunk]['branch']} |
---|
| 128 | % else: |
---|
| 129 | branch ${get_branch(trunks[trunk]['merge'])} |
---|
| 130 | % endif |
---|
| 131 | % if 'inclusive' in trunks[trunk]: |
---|
| 132 | max revision ${trunks[trunk]['punt']} |
---|
| 133 | % else: |
---|
| 134 | max revision ${trunks[trunk]['punt'] - 1} |
---|
| 135 | % endif |
---|
[1901] | 136 | end match |
---|
[1946] | 137 | % endfor |
---|
[1901] | 138 | |
---|
[1905] | 139 | match /trunk/vnc/tightvnc-1.3.9_javasrc.zip |
---|
| 140 | end match |
---|
| 141 | |
---|
[1921] | 142 | % for script in scripts: |
---|
[1931] | 143 | match /trunk/scripts/${script}/ |
---|
[1921] | 144 | repository scripts/${script}.git |
---|
| 145 | branch master |
---|
[1920] | 146 | end match |
---|
[1921] | 147 | % endfor |
---|
[1920] | 148 | |
---|
[1931] | 149 | match /trunk/scripts/ |
---|
[1921] | 150 | repository scripts/osx-update.git |
---|
| 151 | branch master |
---|
| 152 | min revision 1785 |
---|
| 153 | max revision 1785 |
---|
[1901] | 154 | end match |
---|
| 155 | |
---|
[1931] | 156 | match /trunk/scripts/ |
---|
[2027] | 157 | repository scripts/install-invirt.git |
---|
| 158 | branch master |
---|
| 159 | min revision 2026 |
---|
| 160 | max revision 2026 |
---|
| 161 | end match |
---|
| 162 | |
---|
| 163 | match /trunk/scripts/ |
---|
[1921] | 164 | repository scripts/prod-migration.git |
---|
| 165 | branch master |
---|
| 166 | max revision 1863 |
---|
| 167 | end match |
---|
| 168 | |
---|
[2310] | 169 | % for t in third: |
---|
| 170 | match /trunk/third/${t}/ |
---|
| 171 | repository third/${t}.git |
---|
[2306] | 172 | branch master |
---|
| 173 | end match |
---|
| 174 | |
---|
[2310] | 175 | match /third_tags/${t}/([^/~]+)/ |
---|
| 176 | repository third/${t}.git |
---|
| 177 | branch tags/\1 |
---|
| 178 | end match |
---|
| 179 | % endfor |
---|
| 180 | |
---|
[1921] | 181 | % for rev in [803, 804, 925, 926, 928, 1537, 1566]: |
---|
[1931] | 182 | match /trunk/ |
---|
[1921] | 183 | repository doc/xvm.git |
---|
| 184 | branch master |
---|
| 185 | min revision ${rev} |
---|
| 186 | max revision ${rev} |
---|
| 187 | end match |
---|
| 188 | % endfor |
---|
| 189 | |
---|
[1931] | 190 | match /trunk/vmctl/ |
---|
[1921] | 191 | end match |
---|
| 192 | |
---|
| 193 | match /trunk/COPYING$ |
---|
| 194 | end match |
---|
| 195 | |
---|
[1931] | 196 | match /branches/wsgi/ |
---|
[1901] | 197 | end match |
---|