Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2632 by [email protected]: Cannot upload a diff created via svn
http://code.google.com/p/reviewboard/issues/detail?id=2632

What version are you running?
1.6.7.1

What steps will reproduce the problem?
1. I created a diff from svn (diff contains info about one file that was created, something like that:

Index: modules/compositionmng/server/utils/AuditLogUtils.java
===================================================================
--- modules/compositionmng/server/utils/AuditLogUtils.java      (revision )
+++ modules/compositionmng/server/utils/AuditLogUtils.java      (revision )
@@ -0,0 +1,7@@
+package com.server.utils;
+
+import org.apache.log4j.Logger;
+
+public class AuditLogUtils {
+    private static Logger log = Logger.getLogger(AuditLogUtils.class);
+}

2. Then I tried to upload the diff and got an error:

2012-06-08 16:55:48,066 - ERROR - Internal Server Error: /reviews/api/review-requests/5/diffs/
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/django/core/handlers/base.py", line 178, in get_response
    response = middleware_method(request, response)
File "/usr/lib/python2.6/site-packages/Django-1.3.1-py2.6.egg/django/middleware/http.py", line 15, in process_response
    response['Content-Length'] = str(len(response.content))
File "/usr/lib/python2.6/site-packages/Djblets-0.6.18-py2.6.egg/djblets/webapi/core.py", line 281, in _get_content
    content = adapter.encode(self.api_data, request=self.request)
File "/usr/lib/python2.6/site-packages/Djblets-0.6.18-py2.6.egg/djblets/webapi/core.py", line 88, in encode
    return super(JSONEncoderAdapter, self).encode(o)
File "/usr/lib64/python2.6/site-packages/simplejson/encoder.py", line 200, in encode
    chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib64/python2.6/site-packages/simplejson/encoder.py", line 260, in iterencode
    return _iterencode(o, 0)
File "/usr/lib/python2.6/site-packages/Djblets-0.6.18-py2.6.egg/djblets/webapi/core.py", line 99, in default
    raise TypeError("%r is not JSON serializable" % (o,))
TypeError: <Revision: HEAD> is not JSON serializable

The error appears only when I upload diff that contains info about adding files, otherwise it works properly.

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.

Reply via email to