Changeset 773

Show
Ignore:
Timestamp:
05/19/06 23:37:59 (3 years ago)
Author:
stevegt
Message:

WikiWorkflowPatch:

fix a nasty bug that was causing commits to be skipped for new pages
-- thanks pacopablo!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wikiworkflowpatch/0.9/wikiworkflowpatch.diff

    r763 r773  
    22=================================================================== 
    33--- trac/wiki/api.py    (.../vendor/trac-0.9.4) (revision 25) 
    4 +++ trac/wiki/api.py    (.../branches/wikiflowpatch/0.9.4)    (working copy) 
     4+++ trac/wiki/api.py    (.../branches/wikiflowpatch/0.9)      (working copy) 
    55@@ -65,16 +65,35 @@ 
    66   
     
    5555=================================================================== 
    5656--- trac/wiki/web_ui.py (.../vendor/trac-0.9.4) (revision 25) 
    57 +++ trac/wiki/web_ui.py (.../branches/wikiflowpatch/0.9.4)    (working copy) 
     57+++ trac/wiki/web_ui.py (.../branches/wikiflowpatch/0.9)      (working copy) 
    5858@@ -30,6 +30,7 @@ 
    5959 from trac.versioncontrol.diff import get_diff_options, hdf_diff 
     
    136136  
    137137         if not page.exists: 
    138 @@ -183,9 +203,11 @@ 
     138@@ -183,9 +203,12 @@ 
    139139             # WIKI_ADMIN 
    140140             page.readonly = int(req.args.has_key('readonly')) 
    141141  
    142 +        # definitely need to pass db in here, so that change listeners 
    143 +        # can cause rollback  
     142+        # XXX definitely should pass db in here, so that change listeners 
     143+        # can cause rollback in case they blow up; can't do that unless  
     144+        # we later do a db.commit() somewhere though 
    144145         page.save(req.args.get('author'), req.args.get('comment'), 
    145 -                  req.remote_addr) 
     146                   req.remote_addr) 
    146147-        req.redirect(self.env.href.wiki(page.name)) 
    147 +                  req.remote_addr, db=db) 
    148148+        req.redirect(self.env.href.wiki(page.name, version=page.version)) 
    149149  
    150150     def _render_confirm(self, req, db, page): 
    151151         if page.readonly: 
    152 @@ -312,7 +334,7 @@ 
     152@@ -312,7 +335,7 @@ 
    153153             info['readonly'] = int(req.args.has_key('readonly')) 
    154154         req.hdf['wiki'] = info 
     
    159159         HDF. 
    160160  
    161 @@ -327,7 +349,8 @@ 
     161@@ -327,7 +350,8 @@ 
    162162         req.hdf['title'] = page.name + ' (history)' 
    163163  
     
    172172=================================================================== 
    173173--- trac/wiki/model.py  (.../vendor/trac-0.9.4) (revision 25) 
    174 +++ trac/wiki/model.py  (.../branches/wikiflowpatch/0.9.4)    (working copy) 
     174+++ trac/wiki/model.py  (.../branches/wikiflowpatch/0.9)      (working copy) 
    175175@@ -20,17 +20,17 @@ 
    176176 import time 
     
    302302=================================================================== 
    303303--- trac/web/api.py     (.../vendor/trac-0.9.4) (revision 25) 
    304 +++ trac/web/api.py     (.../branches/wikiflowpatch/0.9.4)    (working copy) 
     304+++ trac/web/api.py     (.../branches/wikiflowpatch/0.9)      (working copy) 
    305305@@ -240,7 +240,16 @@ 
    306306         simply send the response itself and not return anything. 
     
    323323=================================================================== 
    324324--- trac/web/main.py    (.../vendor/trac-0.9.4) (revision 25) 
    325 +++ trac/web/main.py    (.../branches/wikiflowpatch/0.9.4)    (working copy) 
     325+++ trac/web/main.py    (.../branches/wikiflowpatch/0.9)      (working copy) 
    326326@@ -23,7 +23,7 @@ 
    327327 from trac.perm import PermissionCache, PermissionError 
     
    355355=================================================================== 
    356356--- templates/wiki.cs   (.../vendor/trac-0.9.4) (revision 25) 
    357 +++ templates/wiki.cs   (.../branches/wikiflowpatch/0.9.4)    (working copy) 
     357+++ templates/wiki.cs   (.../branches/wikiflowpatch/0.9)      (working copy) 
    358358@@ -289,6 +289,9 @@ 
    359359     if:trac.acl.WIKI_MODIFY ?>