ReviewBoard 2.5.3 - SVN - Unexpected error when validating the diff: list index out of range (HTTP 400, API Error 224)

536 views
Skip to first unread message

Markus Fischbacher

unread,
Mar 1, 2016, 11:48:15 AM3/1/16
to reviewboard
Hi there,

I've a problem posting a review request via RBTools.
Getting the following output during executing: rbt post --server http://review.efu.com --username abc --password xxx --debug

>>> RBTools 0.7.4
>>> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)]
>>> Running on Windows-8-6.2.9200
>>> Home = C:\Users\mf\AppData\Roaming
>>> Current directory = D:\DEV\test-repo
>>> Running: git version
>>> Checking for a Subversion repository...
>>> Running: svn --non-interactive info
>>> Running: diff --version
>>> Running: svn --non-interactive --version -q
>>> repository info: Path: http://svn.efu.com/test-repo, Base path: /, Supports changesets: False
>>> Making HTTP GET request to http://review.efu.com/api/
>>> Making HTTP GET request to http://review.efu.com/api/repositories/
>>> Cached response for HTTP GET http://review.efu.com/api/repositories/ expired and was modified
>>> Running: svn --non-interactive info
>>> Running: diff --version
>>> Running: svn --non-interactive --version -q
>>> repository info: Path: http://svn.efu.com/test-repo, Base path: /, Supports changesets: False
>>> Running: svn --non-interactive status -q --ignore-externals
>>> Running: svn --non-interactive diff --diff-cmd=diff --notice-ancestry -r BASE
>>> Running: svn --non-interactive info trunk/ordner1/text1.txt
>>> Running: svn --non-interactive info trunk/ordner1
>>> Running: svn --non-interactive info trunk
>>> Running: svn --non-interactive info trunk
>>> Running: svn --non-interactive info .
>>> Running: svn --non-interactive diff --diff-cmd=diff --notice-ancestry -r BASE --no-diff-deleted
>>> Running: svn --non-interactive info trunk/ordner1/text1.txt
>>> Running: svn --non-interactive info trunk/ordner1/text1.txt
>>> Running: svn --non-interactive info trunk/ordner1/text1.txt
>>> Running: svn --non-interactive info trunk
>>> Running: svn --non-interactive info trunk
>>> Running: svn --non-interactive info trunk
>>> Running: svn --non-interactive info .
>>> Running: svn --non-interactive info .
>>> Running: svn --non-interactive info .
>>> Making HTTP GET request to http://review.efu.com/api/validation/diffs/
>>> Cached response for HTTP GET http://review.efu.com/api/validation/diffs/ expired and was modified
>>> Making HTTP POST request to http://review.efu.com/api/validation/diffs/
>>> Got API Error 224 (HTTP code 400): Unexpected error when validating the diff: list index out of range
>>> Error data: {u'stat': u'fail', u'err': {u'msg': u'Unexpected error when validating the diff: list index out of range', u'code': 224}}
Traceback (most recent call last):
  File "C:\Program Files (x86)\RBTools\bin\..\Python27\Scripts\rbt-script.py", line 8, in <module>
    load_entry_point('RBTools==0.7.4', 'console_scripts', 'rbt')()
  File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\commands\main.py", line 133, in main
    command.run_from_argv([RB_MAIN, command_name] + args)
  File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\commands\__init__.py", line 612, in run_from_argv
    exit_code = self.main(*args) or 0
  File "C:\Program Files (x86)\RBTools\Python27\lib\site-packages\rbtools-0.7.4-py2.7.egg\rbtools\commands\post.py", line 754, in main
    (msg_prefix, e))
rbtools.commands.CommandError: Error validating diff

Unexpected error when validating the diff: list index out of range (HTTP 400, API Error 224)


The SVN Server is running on Ubuntu 14.04.3 LTS, SVN 1.8.8, Apache 2.4.7
ReviewBoard 2.5.3 is also running on Ubuntu 14.04.3 LTS, Apache 2.4.7 but a different host than SVN Server.

Does anyone having an idea what the problem can be?

Thanks in advance
Markus

Christian Hammond

unread,
Mar 1, 2016, 5:37:32 PM3/1/16
to revie...@googlegroups.com
Hi Markus,

Do you see anything in the Review Board log file about this?

Christian
--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
-- 
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Markus Fischbacher

unread,
Mar 2, 2016, 4:34:08 AM3/2/16
to reviewboard
Hi Christian,

thank you for your fast response.

This is the log from Review Board:

2016-03-02 09:28:11,966 - DEBUG - None - AnonymousUser - /api/ - Attempting authentication on API: username=sst, password=************
2016-03-02 09:28:11,972 - DEBUG -  - Attempting to authenticate as CN=sst sst,OU=Systemaccounts,OU=euro,DC=euro,DC=com
2016-03-02 09:28:13,733 - DEBUG -  - DiffParser.parse: Beginning parse of diff, size = 925
2016-03-02 09:28:13,733 - ERROR -  - Unexpected error when validating diff.

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.3-py2.7.egg/reviewboard/webapi/resources/validate_diff.py", line 156, in create
    save=False)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.3-py2.7.egg/reviewboard/diffviewer/managers.py", line 417, in create_from_upload
    save=save)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.3-py2.7.egg/reviewboard/diffviewer/managers.py", line 441, in create_from_data
    check_existence=(not parent_diff_file_contents)))
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.3-py2.7.egg/reviewboard/diffviewer/managers.py", line 557, in _process_files
    for f in parser.parse():
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.3-py2.7.egg/reviewboard/diffviewer/parser.py", line 59, in parse
    next_linenum, new_file = self.parse_change_header(i)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.3-py2.7.egg/reviewboard/diffviewer/parser.py", line 100, in parse_change_header
    linenum = self.parse_special_header(linenum, info)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.3-py2.7.egg/reviewboard/scmtools/svn/__init__.py", line 526, in parse_special_header
    linenum, info)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.3-py2.7.egg/reviewboard/diffviewer/parser.py", line 162, in parse_special_header
    info['index'] = self.lines[linenum].split(None, 1)[1]
IndexError: list index out of range
2016-03-02 09:28:14,081 - DEBUG -  - Calculated issue counts for review request ID 744 across 1 review(s): Resulting counts = {u'R': 0, u'D': 0, u'O': 0}; DB values = [{u'screenshot_comments__issue_status': None, u'file_attachment_comments__pk': None, u'screenshot_comments__issue_opened': None, u'comments__pk': None, u'comments__issue_opened': None, u'file_attachment_comments__issue_opened': None, u'screenshot_comments__pk': None, u'comments__issue_status': None, u'file_attachment_comments__issue_status': None}]; Field IDs = {u'screenshot_comments': set([]), u'comments': set([]), u'file_attachment_comments': set([])}

That's the diff:

D:\DEV\test-repo>rbt diff
Index: /trunk/ordner1/text1.txt
===================================================================
--- /trunk/ordner1/text1.txt    (revision 30)
+++ /trunk/ordner1/text1.txt    (working copy)
@@ -3,4 +3,5 @@
 test

 test
-bla bla
\ No newline at end of file
+bla bla
+test
\ No newline at end of file
Index: /trunk
===================================================================
--- /trunk      (revision 1)
+++ /trunk      (working copy)

Property changes on: trunk
___________________________________________________________________
Added: reviewboard:url
## -0,0 +1 ##
+http://review.efu.com
\ No newline at end of property
Index:
===================================================================
---     (revision 0)
+++     (working copy)

Property changes on: .
___________________________________________________________________
Added: reviewboard:url
## -0,0 +1 ##
+http://review.efu.com
\ No newline at end of property


Kind regards,
Markus

Christian Hammond

unread,
Mar 2, 2016, 5:09:42 AM3/2/16
to revie...@googlegroups.com
Hi Markus,

While our diff parser should be handling the property changes, it's possible there's a bug there.

Can you file a bug on https://hellosplat.com/s/beanbag/tickets/new/?project=reviewboard and attach a copy of that diff, so we can track this and inspect the raw contents of the diff?

Thanks,

Christian

-- 
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Markus Fischbacher

unread,
Mar 2, 2016, 5:12:54 AM3/2/16
to reviewboard, chri...@beanbaginc.com
Hi Christian,

sure, I'll file the bug and attach the diff.

Thanks for your response :)

Markus
Reply all
Reply to author
Forward
0 new messages