My favorites | Sign in
Logo
          
New issue | Search
for
| Advanced search | Search tips
Issue 585: post-review dies when binaries are part of a p4 changeset
3 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Mar 2009
Type-Defect
Priority-Medium
VMware
Component-Scripts


Sign in to add a comment
 
Reported by mayesgr, Aug 13, 2008
What steps will reproduce the problem?
1. Add a binary to a p4 changeset
2. post-review that changeset


What is the expected output? What do you see instead?
I expected post-review to complete successfully with a link to a
reviewboard diff, but instead get this:

Traceback (most recent call last):
  File "/build/trees/bin/reviewboard/post-review", line 452, in <module>
    main()
  File "/build/trees/bin/reviewboard/post-review", line 448, in main
    tempt_fate(changenum, repository_path, client_root)
  File "/build/trees/bin/reviewboard/post-review", line 389, in tempt_fate
    upload_diff(review_request, changenum)
  File "/build/trees/bin/reviewboard/post-review", line 366, in upload_diff
    diff_content = generate_diff(changenum)
  File "/build/trees/bin/reviewboard/post-review", line 346, in generate_diff
    m = re.search(r'(\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d)', dl[1])
IndexError: list index out of range


What operating system are you using? What browser?
Linux/Gentoo 2007.0.


Please provide any additional information below.
This error happened consistently when I tried to add the p4 binary itself
to a changeset that already included two other text files.  When I created
a new test changeset with just the p4 binary by itself, post-review
completed successfully but the diff showed a lot of gibberish instead of
perhaps just listing the file name and the fact that it was a binary.  When
I added the GNU 'ls' binary to this changeset (so the changeset included
the p4 binary and the ls binary) then the same error (listed above) occured
again and post-review did not complete successfully.
Comment 1 by chipx86, Aug 13, 2008
This is an internal problem in VMware's script, since it's quite old, and won't be
fixed until we finally migrate everything to the new architecture and new script.
Labels: VMware Component-Scripts
Comment 2 by pmclana...@gmail.com, Dec 18, 2008
I've had this same issue and done some debugging. The problem is on line 975 and is 
caused by that line not evaluating to True. I'm still not sure why this is, but for 
me on Windows I had thought it was due to line ending issues, but since I now see 
this other bug report on Linux, I'm not so sure. In any case, the attached patch 
fixed it for me. I basically replaced the direct string equality check with a regex 
match. It's possible that just using 'dl[0].startswith()' instead of '==' or my regex 
would work as well, but I haven't tried that. Maybe this will help mayesgr get revews 
submitted.

post-review.patch
585 bytes   Download
Comment 3 by chipx86, Mar 27, 2009
Fixed in r1862.
Status: Fixed
Comment 4 by chipx86, Mar 28, 2009
 Issue 991  has been merged into this issue.
Comment 5 by chipx86, Apr 17, 2009
 Issue 1059  has been merged into this issue.
Sign in to add a comment

Powered by Google Project Hosting