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