1687: post-review API Error 105

Anthony*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Nov. 15, 2010
What version are you running?
RBTools 0.2, Rb 1.5B2

What's the URL of the page containing the problem?
internal network lab

What steps will reproduce the problem?
1. post-review in subversion checkout directory

What is the expected output? What do you see instead?

Error uploading diff

...
>>> Got API Error 105 (HTTP code 200): One or more fields had errors
>>> Error data: {u'fields': {u'path': [u'time data did not match format:  data=(
revision 21939)  fmt=%Y-%m-%d %H:%M:%S']}, u'stat': u'fail', u'err': {u'msg': u'
One or more fields had errors', u'code': 105}, u'deprecated': {u'in_version': u'
1.5'}}
...

Please provide any additional information below.
I see that the diff output mode shows
--- /xxx/xxx...  (revision 21939)
+++ /xxx/xxx...  (working copy)
It appears that the svn info call is expected to give a time/date here instead of the revision number.  I am using SVN 1.6.6 (r40053)
#1 Anthony*******@gmai***** (Google Code) (Is this you? Claim this profile.)
This issue can be closed due to user error/configuration problem or marked as a feature request.  The reviewboard repository was configured incorrectly as the wrong type.  It might be nice if it is possible to test the validity of the configuration or just determine the server type without user input.  Thank you Christian for helping diagnose this offline.
chipx86
#2 chipx86
  • +SetupIssue
#3 mail*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I am getting the same error as shown below, I upgraded by server by running 'rb-site upgrade /path" too. 
On running p4 diff,  I was able to see the difference made in workspace and repository but post-review --server=http://reviewboardserver:port fails as below

Please let me know how to resolve this issue as I find in previous post it issue with configuration in server but It is not clear with what configuration issue will resolve this. Thanks
------------------------------------------------------------

>>> HTTP POSTing to http://x.x.x.x:yy/api/json/reviewrequests/new/: {'repository_path': 'perforceserver:1666'}
>>> Review request created
>>> Uploading diff, size: 0
>>> HTTP POSTing to http://x.x.x.x:yy/api/json/reviewrequests/4/diff/new/: {}
>>> Got API Error 105 (HTTP code 200): One or more fields had errors
>>> Error data: {u'fields': {u'path': [u'The submitted file is empty.']}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code': 105}, u'deprecated': {u'in_version': u'1.5'}}
---------------------------------------------------------------------------
chipx86
#4 chipx86
We don't use p4 diff. Can you run post-review with --output-diff and see what it sees?
  • -SetupIssue
    +NeedInfo
chipx86
#5 chipx86
We don't use p4 diff. Can you run post-review with --output-diff and see what it sees?
#6 mail*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Running command with --output-diff doesn't show anything.
----------------------------------------------------------
C:>$ post-review --server=http://127.0.0.1:8082 --output-diff
C:>$

Running p4 diff shows the changes made
-----------------------------------------
C:>$ p4 diff
==== //x/y/z/attr.c#
7 - C:/Documents and Settings/Viswesn/x/y/z/attr.c ====
33c33
<  * This file contains general function for attributes of type
---
>  * This file contains general function for attributes of type review board

C:>$
and I am getting the error as specified in my pervious post, If I ran with -d option
:(
#7 mail*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Today I tried running post-review as shown below and I got error as "The diff file is empty" rather than previous "The submitted file is empty" error. How can I resolve this issue?

post-review --diff-filename=attr_fn_acl.c -d --server=http://x.y.z.a:8082
>>> svn info
>>> git rev-parse --git-dir
>>> p4 info
>>> repository info: Path: a.b.c.d:1666, Base path: None, Supports changesets: True
>>> Looking for 'x.y.z.a /' cookie in /home/viswesn/.post-review-cookies.txt
>>> Loaded valid cookie -- no login required
>>> Attempting to create review request on trperforce01:2666 for None
>>> HTTP POSTing to http://x.y.z.a:8082/api/json/reviewrequests/new/: {'repository_path': 'a.b.c.d:1666'}
>>> Review request created
>>> Uploading diff, size: 15723
>>> HTTP POSTing to http://x.y.z.a:8082/api/json/reviewrequests/8/diff/new/: {}
>>> Got API Error 105 (HTTP code 200): One or more fields had errors
>>> Error data: {u'fields': {u'path': [u'The diff file is empty']}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code': 105}, u'deprecated': {u'in_version': u'1.5'}}

Error uploading diff

The generated diff file was empty. This usually means no files were
modified in this change.

Try running with --output-diff and --debug for more information.

Your review request still exists, but the diff is not attached.
david
#8 david
It looks like you're passing a C file in as the diff file? This probably isn't what you want. Since this is perforce, you need to pass in a changenum (either a numbered change or "default").
  • -NeedInfo
    +UserError
#9 akshaya.s*********@gmai***** (Google Code) (Is this you? Claim this profile.)
We have Reviewboard with clearcase enviroment  where uploading diff file using --diff-filename it giving below error and not uplaoding the diff file .Please suggest what could be the issue ,

samana1@lppc111.lss.emc.com:/vobs/ms-test 121 % post-review --diff-filename=diff.txt --server="https://ppsappdev02.isus.emc.com:443"  -d
>>> RBTools 0.4.1
>>> Home = /emc/samana1
>>> HTTP GETting api/
>>> HTTP GETting https://ppsappdev02.isus.emc.com:443/api/info/
>>> Using the new web API
>>> HTTP GETting https://ppsappdev02.isus.emc.com:443/api/repositories/
>>> HTTP GETting https://ppsappdev02.isus.emc.com:443/api/repositories/1/
>>> HTTP GETting https://ppsappdev02.isus.emc.com:443/api/repositories/1/info/
>>> HTTP GETting https://ppsappdev02.isus.emc.com:443/api/repositories/2/
>>> HTTP GETting https://ppsappdev02.isus.emc.com:443/api/repositories/2/info/
>>> HTTP GETting https://ppsappdev02.isus.emc.com:443/api/repositories/3/
>>> HTTP GETting https://ppsappdev02.isus.emc.com:443/api/repositories/3/info/
>>> Attempting to create review request on /view/ppreleng_reviewboardAdmin/vobs/ms-test for None
>>> HTTP POSTing to https://ppsappdev02.isus.emc.com:443/api/review-requests/: {'repository': u'/view/ppreleng_reviewboardAdmin/vobs/ms-test'}
>>> Review request created
>>> Uploading diff, size: 492
>>> HTTP POSTing to https://ppsappdev02.isus.emc.com:443/api/review-requests/379/diffs/: {'basedir': u'/view/ppreleng_reviewboardAdmin/vobs/ms-test'}
>>> Got API Error 105 (HTTP code 400): One or more fields had errors
>>> Error data: {u'fields': {u'path': [u'The diff file is empty']}, u'stat': u'fail', u'err': {u'msg': u'One or more fields had errors', u'code': 105}}

Error uploading diff

The generated diff file was empty. This usually means no files were
modified in this change.

Try running with --output-diff and --debug for more information.

Your review request still exists, but the diff is not attached.
#10 akshaya.s*********@gmai***** (Google Code) (Is this you? Claim this profile.)
Please help and atleast give some pointer to fix it .
david
#11 david
Akshaya, the error for you is listed in the debug output (though it is unfortunately hidden):

"The diff file is empty"