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