rules.mako: indent control flow
[invirt/scripts/git-migration.git] / rules.mako
index 5ce003a..e3b8e9c 100644 (file)
@@ -1,6 +1,5 @@
 <%
     packages = [line.strip() for line in open('package-list')]
 <%
     packages = [line.strip() for line in open('package-list')]
-    packages.append('packages/xvm-console-devconfig')
     repos = packages
     packages = [package[len('packages/'):] for package in packages]
 
     repos = packages
     packages = [package[len('packages/'):] for package in packages]
 
         'invirt-remote-server': 1822,
     }
 
         'invirt-remote-server': 1822,
     }
 
+    quashes = [
+        ('/package_tags/sipb-xen-dev/sipb-xen-dev/', 11),
+        ('/package_tags/sipb-xen-dev/13/', 316),
+        ('/package_tags/sipb-xen-console/2/', 347),
+        ('/package_tags/sipb-xen-console/2/sipb-xen-console/', 348),
+        ('/package_tags/sipb-xen-console/2/', 349),
+        ('/package_tags/sipb-xen-console/7.1/sipb-xen-console/', 401),
+        ('/package_tags/sipb-xen-guest-installer/1.0/sipb-xen-guest-installer/', 452),
+        ('/package_tags/sipb-xen-dev/14/sipb-xen-dev/', 462),
+        ('/package_tags/sipb-xen-dev/14/', 463),
+        ('/trunk/packages/sipb-xen-autoinstaller/', 742),
+        ('/trunk/packages/invirt-console-server/', 1201),
+        ('/trunk/packages/xvm-prodconfig/', 1455),
+        ('/trunk/packages/invirt-xen-config/', 1757),
+        ('/trunk/packages/invirt-console/', 1819),
+        ('/trunk/scripts/prod-migration/', 1864),
+        ('/trunk/packages/invirt-dhcp/', 1904),
+    ]
+
     merges = []
     for line in open('merges'):
         line = line.strip()
     merges = []
     for line in open('merges'):
         line = line.strip()
@@ -89,104 +107,87 @@ end repository
 
 % endfor
 
 
 % endfor
 
-match /package_tags/sipb-xen-dev/sipb-xen-dev(/|$)
-end match
-
-match /package_tags/sipb-xen-console/2(/|$)
-  min revision 347
-  max revision 349
-end match
-
-match /package_tags/sipb-xen-console/7.1/sipb-xen-console(/|$)
-  min revision 401
-  max revision 401
-end match
-
-match /package_tags/sipb-xen-guest-installer/1.0/sipb-xen-guest-installer(/|$)
-  min revision 452
-  max revision 452
-end match
-
-match /package_tags/sipb-xen-dev/14/sipb-xen-dev(/|$)
-  min revision 462
-  max revision 463
-end match
-
-match /trunk/packages/sipb-xen-autoinstaller(/|$)
-  min revision 742
-  max revision 742
+% for quash in quashes:
+match ${quash[0]}
+  min revision ${quash[1]}
+  max revision ${quash[1]}
 end match
 end match
+% endfor
 
 % for package in packages:
 
 
 % for package in packages:
 
-% if package == 'sipb-xen-database':
-match /trunk/packages/${package}/${package}-0(/|$)
+%   if package == 'sipb-xen-database':
+match /trunk/packages/${package}/${package}-0/
   repository ${get_repo(package)}
   branch ${get_branch(package)}
   max revision 8
 end match
   repository ${get_repo(package)}
   branch ${get_branch(package)}
   max revision 8
 end match
-% endif
+%   endif
 
 
-% if package in doubled_packages:
-match /trunk/packages/${package}/${package}(/|$)
+%   if package in doubled_packages:
+match /trunk/packages/${package}/${package}/
   repository ${get_repo(package)}
   branch ${get_branch(package)}
   max revision ${doubled_packages[package][0] - 1}
 end match
 
   repository ${get_repo(package)}
   branch ${get_branch(package)}
   max revision ${doubled_packages[package][0] - 1}
 end match
 
-match /package_tags/${package}/([^/~]+)/${package}(/|$)
+match /package_tags/${package}/([^/~]+)/${package}/
   repository ${get_repo(package)}
   branch tags/${get_tag_prefix(package)}\1
   repository ${get_repo(package)}
   branch tags/${get_tag_prefix(package)}\1
+%     if package == 'sipb-xen-dev':
+  max revision 318
+%     else:
   max revision ${doubled_packages[package][0] - 1}
   max revision ${doubled_packages[package][0] - 1}
+%     endif
 end match
 
 end match
 
-match /trunk/packages/tmp/${package}(/|$)
+match /trunk/packages/tmp/${package}/
   min revision ${doubled_packages[package][0]}
   max revision ${doubled_packages[package][0]}
 end match
 
   min revision ${doubled_packages[package][0]}
   max revision ${doubled_packages[package][0]}
 end match
 
-match /trunk/packages/${package}(/|$)
+match /trunk/packages/${package}/
   min revision ${doubled_packages[package][1]}
   max revision ${doubled_packages[package][1]}
 end match
   min revision ${doubled_packages[package][1]}
   max revision ${doubled_packages[package][1]}
 end match
-% endif
+%   endif
 
 
-match /trunk/packages/${package}(/|$)
+match /trunk/packages/${package}/
   repository ${get_repo(package)}
   branch ${get_branch(package)}
   repository ${get_repo(package)}
   branch ${get_branch(package)}
-% if package in doubled_packages:
+%   if package in doubled_packages:
   min revision ${doubled_packages[package][1] + 1}
   min revision ${doubled_packages[package][1] + 1}
-% endif
-% if package in punt:
+%   endif
+%   if package in punt:
   max revision ${punt[package] - 1}
   max revision ${punt[package] - 1}
-% endif
+%   endif
 end match
 
 end match
 
-match /package_tags/${package}/([^/~]+)(/|$)
+match /package_tags/${package}/([^/~]+)/
   repository ${get_repo(package)}
   branch tags/${get_tag_prefix(package)}\1
   repository ${get_repo(package)}
   branch tags/${get_tag_prefix(package)}\1
-% if package in doubled_packages:
+%   if package in doubled_packages:
   min revision ${doubled_packages[package][1]}
   min revision ${doubled_packages[package][1]}
-% endif
+%   endif
 end match
 
 end match
 
-match /package_tags/${package}/([^/~]+)~([^/~]+)(/|$)
+match /package_tags/${package}/([^/~]+)~([^/~]+)/
   repository ${get_repo(package)}
   branch tags/${get_tag_prefix(package)}\1_\2
   repository ${get_repo(package)}
   branch tags/${get_tag_prefix(package)}\1_\2
-% if package in doubled_packages:
+%   if package in doubled_packages:
   min revision ${doubled_packages[package][1]}
   min revision ${doubled_packages[package][1]}
-% endif
+%   endif
 end match
 
 % endfor
 
 end match
 
 % endfor
 
-match /trunk/packages/(xen-common|xen-3.1)(/|$)
+match /trunk/packages/(xen-common|xen-3.1)/
 end match
 
 end match
 
-match /package_tags/(xen-common|xen-3.1)(/|$)
+match /package_tags/(xen-common|xen-3.1)/
 end match
 
 end match
 
-match /trunk/dhcp(/|$)
+match /trunk/dhcp/
   repository ${get_repo('sipb-xen-dhcp')}
   branch ${get_branch('sipb-xen-dhcp')}
   max revision 281
   repository ${get_repo('sipb-xen-dhcp')}
   branch ${get_branch('sipb-xen-dhcp')}
   max revision 281
@@ -201,7 +202,7 @@ end match
 match /trunk/vnc/tightvnc-1.3.9_javasrc.zip
 end match
 
 match /trunk/vnc/tightvnc-1.3.9_javasrc.zip
 end match
 
-match /trunk/vnc/vnc_javasrc(/|$)
+match /trunk/vnc/vnc_javasrc/
   repository ${get_repo('sipb-xen-vnc-client')}
   branch ${get_branch('sipb-xen-vnc-client')}
   max revision 304
   repository ${get_repo('sipb-xen-vnc-client')}
   branch ${get_branch('sipb-xen-vnc-client')}
   max revision 304
@@ -213,34 +214,34 @@ match /trunk/vnc/vnc_server(/|$)
   max revision 286
 end match
 
   max revision 286
 end match
 
-match /trunk/dns(/|$)
+match /trunk/dns/
   repository ${get_repo('sipb-xen-dns')}
   branch dns
   max revision 268
 end match
 
 % for script in scripts:
   repository ${get_repo('sipb-xen-dns')}
   branch dns
   max revision 268
 end match
 
 % for script in scripts:
-match /trunk/scripts/${script}(/|$)
+match /trunk/scripts/${script}/
   repository scripts/${script}.git
   branch master
 end match
 % endfor
 
   repository scripts/${script}.git
   branch master
 end match
 % endfor
 
-match /trunk/scripts(/|$)
+match /trunk/scripts/
   repository scripts/osx-update.git
   branch master
   min revision 1785
   max revision 1785
 end match
 
   repository scripts/osx-update.git
   branch master
   min revision 1785
   max revision 1785
 end match
 
-match /trunk/scripts(/|$)
+match /trunk/scripts/
   repository scripts/prod-migration.git
   branch master
   max revision 1863
 end match
 
 % for rev in [803, 804, 925, 926, 928, 1537, 1566]:
   repository scripts/prod-migration.git
   branch master
   max revision 1863
 end match
 
 % for rev in [803, 804, 925, 926, 928, 1537, 1566]:
-match /trunk(/|$)
+match /trunk/
   repository doc/xvm.git
   branch master
   min revision ${rev}
   repository doc/xvm.git
   branch master
   min revision ${rev}
@@ -248,11 +249,11 @@ match /trunk(/|$)
 end match
 % endfor
 
 end match
 % endfor
 
-match /trunk/vmctl(/|$)
+match /trunk/vmctl/
 end match
 
 match /trunk/COPYING$
 end match
 
 end match
 
 match /trunk/COPYING$
 end match
 
-match /branches/wsgi(/|$)
+match /branches/wsgi/
 end match
 end match