1637: Review Board + perforce can not upload diff

dekun.c********@gmai***** (Google Code) (Is this you? Claim this profile.)
Aug. 30, 2010
hi, guys
 now i have setup one reviewboard server to review code changes for
perforce server, but i got the following error when i use cmd "post-review
3756" to create one review request

$ post-review 3756

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.


but i can found the changes with "post-review 3756 --output-diff --debug"
as the following description


$ post-review 3756 --output-diff --debug
>>> svn info
>>> git rev-parse --git-dir
>>> p4 info
>>> repository info: Path: p4_svr2:1666, Base path: None, Supports
changesets: T
rue
>>> Generating diff for changenum 3756
>>> p4 describe -s 3756
>>> Processing edit of
//EMMI/branch/Email/proj/sc/product/xmmi_m800n/mak/option
s.mak
>>> Writing
"//EMMI/branch/Email/proj/sc/product/xmmi_m800n/mak/options.mak#1" t
o "c:\docume~1\admini~1\locals~1\temp\tmpsx9vph"
>>> p4 print -o c:\docume~1\admini~1\locals~1\temp\tmpsx9vph -q
//EMMI/branch/Em
ail/proj/sc/product/xmmi_m800n/mak/options.mak#1
>>> diff -urNp c:\docume~1\admini~1\locals~1\temp\tmpsx9vph
D:/TP_EMMI_Email/pro
j\sc\product\xmmi_m800n\mak\options.mak
--- //EMMI/branch/Email/proj/sc/product/xmmi_m800n/mak/options.mak     
//EMMI/b
ranch/Email/proj/sc/product/xmmi_m800n/mak/options.mak#1
+++ //EMMI/branch/Email/proj/sc/product/xmmi_m800n/mak/options.mak     
2010-04-
28 19:10:33
@@ -56,6 +56,13 @@ PP_OPT_COMMON+= __WAP__
 # Option_Selection= N/A
 PP_OPT_COMMON+= __MMS__

+# Feature_Name=EMAIL
+# Description=Option for EMAIL feature
+# Pre_Condition_On= N/A
+# Pre_Condition_Off= N/A
+# Option_Selection= N/A
+PP_OPT_COMMON+= __EMAIL__
+
 # Feature_Name=FAKE_VENDOR
 # Description=Option for a fake vendor to prevent frequent merging errors
 # Pre_Condition_On= N/A
@@ -776,6 +783,15 @@ ifeq ($(filter __MMS__ ,$(PP_OPT_COMMON)
 PP_OPT_COMMON +=  __MMS_MMI_CDMMS__
 endif

+# Feature_Name=EMAIL
+# Description=Option to enable EMAIL function
+# Pre_Condition_On= __EMAIL__
+# Pre_Condition_Off= N/A
+# Option_Selection= N/A
+ifeq ($(filter __EMAIL__ ,$(PP_OPT_COMMON)),__EMAIL__)
+PP_OPT_COMMON +=  __EMAIL_MMI__
+endif
+
 # Feature_Name=Disable SMS SIM Folder
 # Description=Option to disable the SMS SIM folder
 # Pre_Condition_On= N/A



any help for me???
chipx86
#1 chipx86
Can you run without --output-diff so we can see the debug info during the upload process?
  • +NeedInfo
#2 dekun.c********@gmai***** (Google Code) (Is this you? Claim this profile.)
Thanks for your help. please find the following info:

$ post-review 3756

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.
chipx86
#3 chipx86
Sorry, still want --debug in there. I need to see everything that hte debug output
says (though you can mask the domain names if you want). All the paths and everything
else must be there in the debug log though.
#5 bwe****@gmai***** (Google Code) (Is this you? Claim this profile.)
I have the exact same issue, here is my output with debug but not output-diff. As a note this is a brand new reviewboard server and my first time setting it up.

#post-review 513239 --debug
>>> svn info
>>> p4 info
>>> repository info: Path: p4server-atl01.us.msudev.lab.net:1680, Base path: None, Supports changesets: True
>>> p4 counters
>>> Generating diff for changenum 513239
>>> p4 describe -s 513239
>>> Processing edit of //depot/syncsuite/cas/trunk/rpm/build.xml
>>> Writing "//depot/syncsuite/cas/trunk/rpm/build.xml#15" to "/tmp/tmpWRRyXF"
>>> p4 print -o /tmp/tmpWRRyXF -q //depot/syncsuite/cas/trunk/rpm/build.xml#15
>>> Writing "//depot/syncsuite/cas/trunk/rpm/build.xml#16" to "/tmp/tmpmqWes7"
>>> p4 print -o /tmp/tmpmqWes7 -q //depot/syncsuite/cas/trunk/rpm/build.xml#16
>>> diff -urNp /tmp/tmpWRRyXF /tmp/tmpmqWes7
>>> Looking for 're.us.msudev.lab.net /reviewboard/' cookie in /root/.post-review-cookies.txt
>>> Loaded valid cookie -- no login required
>>> Attempting to create review request on p4server-atl01.us.msudev.lab.net:1680 for 513239
>>> HTTP POSTing to http://re.us.msudev.lab.net/reviewboard/api/json/reviewrequests/new/: {'repository_path': 'p4server-atl01.us.msudev.lab.net:1680', 'changenum': '513239'}
>>> Review request created
>>> Uploading diff, size: 566
>>> HTTP POSTing to http://re.us.msudev.lab.net/reviewboard/api/json/reviewrequests/9/diff/new/: {}
>>> Got API Error 105 (HTTP code 200): One or more fields had errors
>>> Error data: {'fields': {'path': ['[Errno 2] No such file or directory']}, 'stat': 'fail', 'err': {'msg': 'One or more fields had errors', '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.
#6 paul.******@gmai***** (Google Code) (Is this you? Claim this profile.)
Perforce, new reviewboard install, similar issue when using post-review.  I won't post the error data; it looks identical.

Strangely, the diff printed by "post-review -n" looks like it was generated with p4 rather than diff -urNp.  Here's the output of "post-review -n":

[C:\dfp-cust-b]post-review -n 349518
--- //dfp/Main/Common/Code/Python/dfp4.py       //dfp/Main/Common/Code/Python/dfp4.py#16
+++ //dfp/Main/Common/Code/Python/dfp4.py       2010-06-30 19:27:45
@@ -26,6 +26,7 @@ from P4 import P4Exception, P4Error
 RAISE_ALL = 2
 RAISE_ERROR = 1
 RAISE_NONE = 0
+RAISE_A_RUCKUS = -1

 # ----------------------------------------------------------------------
 # DF wrapper around P4API wrapper

And here's what I get when running "diff" by hand (following what "post-review -d" says it's doing):

[C:\dfp-cust-b]p4 print -o tmpa -q //dfp/main/common/code/python/dfp4.py#16
[C:\dfp-cust-b]diff -urNp c:\dfp-cust-b\tmpa c:\dfp-cust-b\Common\Code\Python\dfp4.py
--- c:\dfp-cust-b\tmpa  2010-06-30 19:32:18.755014300 -0700
+++ c:\dfp-cust-b\Common\Code\Python\dfp4.py    2010-06-30 19:27:45.074381800 -0700
@@ -26,6 +26,7 @@ from P4 import P4Exception, P4Error
 RAISE_ALL = 2
 RAISE_ERROR = 1
 RAISE_NONE = 0
+RAISE_A_RUCKUS = -1

 # ----------------------------------------------------------------------
 # DF wrapper around P4API wrapper

I tried uploading the output of "post-review -n" by hand, via the "Upload Diff" button.  The upload dialog box gave me the same error:

"One or more fields had errors"
"[Errno 2] No such file or directory"

I tried uploading the output of diff -urNp by hand and got different errors:

"One or more fields had errors"
"need more than 1 value to unpack"
chipx86
#7 chipx86
The problem looks to be that p4 (or p4.exe) isn't installed on the server. It must be available in the path so the web server can access it.
#8 paul.******@gmai***** (Google Code) (Is this you? Claim this profile.)
That was the issue.  p4 in /usr/sbin instead of /usr/bin.  Thanks!
david
#9 david
  • -NeedInfo
    +SetupIssue
#10 vpen****@gmai***** (Google Code) (Is this you? Claim this profile.)
Comment 7 gives the right clue.  

Suggest improving the error output messages.  Ask users to check the p4 path for the Python scripts!