Dirty fix for new-comments not writing bug
authorAaron Bentley <abentley@panoramicfeedback.com>
Fri, 31 Mar 2006 20:27:34 +0000 (15:27 -0500)
committerAaron Bentley <abentley@panoramicfeedback.com>
Fri, 31 Mar 2006 20:27:34 +0000 (15:27 -0500)
.be/bugs/a63bd76a-cd43-4f97-88ba-2323546d4572/values
beweb/beweb/controllers.py
libbe/bzr.py

index de74b696dc75e1cf132210c4bc23e077a7e40213..78011385c7e04e8fba8b915ad620c42418c10c51 100644 (file)
@@ -15,7 +15,7 @@ severity=minor
 
 
 
-status=open
+status=closed
 
 
 
index 912411672a0da0920d766695ca90fe2b10ca0411..9379e24b26d71cee144d9c494f167130fd68e71d 100644 (file)
@@ -103,6 +103,10 @@ class Bug(PrestHandler):
 
     @provide_action("action", "New comment")
     def new_comment(self, bug_data, bug, *args, **kwargs):
+        try:
+            self.update(bug_data, bug, *args, **kwargs)
+        except cherrypy.HTTPRedirect:
+            pass
         return self.comment.new_comment(bug_data, comment=None, *args, 
                                          **kwargs)
 
index 045395d607b8716b7956c12fbcba620bce0b63c7..7aa6a58430033d37a3039cfdd5e3e522ee041469 100644 (file)
@@ -120,10 +120,14 @@ def commit(directory, summary, body=None):
 def postcommit(directory):
     try:
         invoke_client('merge', directory=directory)
-    except CommandError:
-        status = invoke_client('revert --no-backup', directory=directory)
-        status = invoke_client('resolve --all', directory=directory)
-        raise
+    except CommandError, e:
+        if 'No merge branch known or specified' in e.err_str:
+            pass
+        else:
+            status = invoke_client('revert',  '--no-backup', 
+                                   directory=directory)
+            status = invoke_client('resolve', '--all', directory=directory)
+            raise
     if len(invoke_client('status', directory=directory)[1]) > 0:
         commit(directory, 'Merge from upstream')