[Python-checkins] r88805 - in tracker/instances/python-dev: extensions/create_patch.py schema.py

martin.v.loewis python-checkins at python.org
Fri Mar 25 23:11:31 CET 2011


Author: martin.v.loewis
Date: Fri Mar 25 23:11:31 2011
New Revision: 88805

Log:
Simplify and fix revspec, based on an idea by Baptiste Carvello.
Drop sourcebranch from schema.


Modified:
   tracker/instances/python-dev/extensions/create_patch.py
   tracker/instances/python-dev/schema.py

Modified: tracker/instances/python-dev/extensions/create_patch.py
==============================================================================
--- tracker/instances/python-dev/extensions/create_patch.py	(original)
+++ tracker/instances/python-dev/extensions/create_patch.py	Fri Mar 25 23:11:31 2011
@@ -30,7 +30,7 @@
             raise NotChanged
         repo=bundlerepo.bundlerepository(UI, ".", bundle)
         repo.ui.pushbuffer()
-        old = 'max(p1(min(outgoing() and branch(%s))) or max(p2(merge() and outgoing() and branch(%s)) and branch(%s) and not outgoing()))' % (patchbranch, patchbranch, sourcebranch)
+        old = 'max(ancestors(branch("%s")))-outgoing("%s"))' % (patchbranch, base)
         commands.diff(repo.ui, repo, rev=[old, patchbranch])
         result = repo.ui.popbuffer()
     finally:

Modified: tracker/instances/python-dev/schema.py
==============================================================================
--- tracker/instances/python-dev/schema.py	(original)
+++ tracker/instances/python-dev/schema.py	Fri Mar 25 23:11:31 2011
@@ -145,7 +145,6 @@
 hgrepo = Class(db, "hgrepo",
                url=String(),
                lastrev=String(),
-               sourcebranch=String(),
                patchbranch=String(),
                )
 
@@ -206,7 +205,7 @@
     return userid == db.hgrepo.get(itemid, "creator")
 db.security.addPermissionToRole('User', 'Create', 'hgrepo')
 p = db.security.addPermission(name='Edit', klass='hgrepo', check=may_edit_hgrepo,
-                              properties=['url', 'sourcebranch', 'patchbranch'])
+                              properties=['url', 'patchbranch'])
 db.security.addPermissionToRole('User', p)
 
 class may_view_spam:


More information about the Python-checkins mailing list