Re: Fields error on windows with svn
Ok :) I test it on Windows using ReviewBoard 1.1 and all is right! Error bellow occur only when we try to upload empty diff. Greetings from Poland! On Feb 2, 7:21 am, Jan Koprowski wrote: > Hi Christian! > > I use Reviewboard 1.0.5.1. I can check it on ReviewBoard 1.1. > I looked to both this files when I get this error with ClearCase (I > don't check clearcase on linux yet but on windows they generate > identical error). > So the problem was in diffviewer/forms.py in > > class UploadDiffForm(forms.Form): > basedir = forms.CharField( > label=_("Base directory"), > help_text=_("The absolute path in the repository the diff was " > "generated in.")) > path = forms.FileField( > label=_("Diff"), > help_text=_("The new diff to upload.")) > parent_diff_path = forms.FileField( > label=_("Parent diff"), > help_text=_("An optional diff that the main diff is based on. " > "This is usually used for distributed revision > control " > "systems (Git, Mercurial, etc.)."), > required=False) > > # Extensions used for intelligent sorting of header files > # before implementation files. > HEADER_EXTENSIONS = ["h", "H", "hh", "hpp", "hxx", "h++"] > IMPL_EXTENSIONS = ["c", "C", "cc", "cpp", "cxx", "c++", "m", > "mm", "M"] > > def __init__(self, repository, *args, **kwargs): > forms.Form.__init__(self, *args, **kwargs) <--- HERE IS THE > PROBLEM > > Problem is *args is string but path and parent_diff_path is Django > Uploaded file objects and I don't know how I can investigate this > files. Before this line there wasn't any error, after it I get: > > > Error uploading diff:Oneormorefieldshaderrors(105) > {'fields': {'path': ['diff']}, 'stat': 'fail', 'err': {'msg': > 'Oneormorefieldshaderrors', 'code': 105}} > > so Django Form mechanism check somehow content of diff and aver it is > wrong but I don't know what else I can check. > > On Feb 2, 6:31 am, Christian Hammond wrote: > > > > > Hmm.. Very hard to say. They certainly look identical. > > > What version of Review Board is this? I believe the 1.1 nightlies have some > > additional server-side logging for theseerrors, but either way, it might be > > worth instrumenting the server to find out where exactly it's failing. Take > > a look at the new_diff function in reviewboard/webapi/json.py. Add some > > logging to the various exception handlers. In the 1.1 nightlies at least, > > this has been added to the generic Exception handle: > > > logging.error("Error uploading new diff: %s", e, exc_info=1) > > > If not there, then in the UploadDiffForm in reviewboard/reviews/forms.py and > > reviewboard/diffviewer/forms.py. > > > Christian > > > -- > > Christian Hammond - chip...@chipx86.com > > Review Board -http://www.reviewboard.org > > VMware, Inc. -http://www.vmware.com > > > On Mon, Feb 1, 2010 at 4:41 AM, Jan Koprowski > > wrote: > > > > I made experiment. I create very simple svn repository on linux and > > > try use post-review for it on Windows and on Linux. What I get: > > > > On Linux: > > > > >>> HTTP POSTing to > > >http://192.168.56.2/api/json/reviewrequests/11/diff/new/:{'basedir': '/'} > > > --127.0.1.1.1000.2795.1265030375.375.2 > > > Content-Disposition: form-data; name="basedir" > > > > / > > > --127.0.1.1.1000.2795.1265030375.375.2 > > > Content-Disposition: form-data; name="path"; filename="diff" > > > > Index: /b > > > === > > > --- /b (revision 0) > > > +++ /b (revision 0) > > > @@ -0,0 +1 @@ > > > +b > > > > --127.0.1.1.1000.2795.1265030375.375.2-- > > > > {'path': {'content': 'Index: /b > > > \n=== > > > \n--- /b\t(revision 0)\n+++ /b\t(revision 0)\n@@ -0,0 +1 @@\n+b\n', > > > 'filename': 'diff'}} > > > Review request #11 posted. > > > >http://192.168.56.2/r/11 > > > > On Windows: > > > > >>> HTTP POSTing tohttp://localhost/api/json/reviewrequests/55/diff/new/: > > > {'basedir': '/'} > > > --172.28.38.102.1.6644.1265026662.057.3 > > > Content-Disposition: form-data; name="basedir" > > > > / > > > --172.28.38.102.1.6644.1265026662.057.3 > > > Content-Disposition: form-data; name="path"; filename="diff" > > > > Index: /b > > > === > > > --- /b (revision 0) > > > +++ /b (revision 0) > > > @@ -0,0 +1 @@ > > > +b > > > > --172.28.38.102.1.6644.1265026662.057.3-- > > > > {'path': {'content': 'Index: /b > > > \n=== > > > \n--- /b\t(revision 0)\n+++ /b\t(revision 0)\n@@ -0,0 +1 @@\n+b\n', > > > 'filename': 'diff'}} > > > Error uploading diff:Oneormorefieldshaderrors(105) > > > >>> {'fields': {'path': ['diff']}, 'stat': 'fail', 'err': {'msg': 'Oneor > > >morefieldshaderrors', 'code': 105}} > > > Your review request still exists, but the diff is not att
Re: Fields error on windows with svn
Hi Christian! I use Reviewboard 1.0.5.1. I can check it on ReviewBoard 1.1. I looked to both this files when I get this error with ClearCase (I don't check clearcase on linux yet but on windows they generate identical error). So the problem was in diffviewer/forms.py in class UploadDiffForm(forms.Form): basedir = forms.CharField( label=_("Base directory"), help_text=_("The absolute path in the repository the diff was " "generated in.")) path = forms.FileField( label=_("Diff"), help_text=_("The new diff to upload.")) parent_diff_path = forms.FileField( label=_("Parent diff"), help_text=_("An optional diff that the main diff is based on. " "This is usually used for distributed revision control " "systems (Git, Mercurial, etc.)."), required=False) # Extensions used for intelligent sorting of header files # before implementation files. HEADER_EXTENSIONS = ["h", "H", "hh", "hpp", "hxx", "h++"] IMPL_EXTENSIONS = ["c", "C", "cc", "cpp", "cxx", "c++", "m", "mm", "M"] def __init__(self, repository, *args, **kwargs): forms.Form.__init__(self, *args, **kwargs) <--- HERE IS THE PROBLEM Problem is *args is string but path and parent_diff_path is Django Uploaded file objects and I don't know how I can investigate this files. Before this line there wasn't any error, after it I get: > Error uploading diff: One or more fields had errors (105) {'fields': {'path': ['diff']}, 'stat': 'fail', 'err': {'msg': 'One or more fields had errors', 'code': 105}} so Django Form mechanism check somehow content of diff and aver it is wrong but I don't know what else I can check. On Feb 2, 6:31 am, Christian Hammond wrote: > Hmm.. Very hard to say. They certainly look identical. > > What version of Review Board is this? I believe the 1.1 nightlies have some > additional server-side logging for these errors, but either way, it might be > worth instrumenting the server to find out where exactly it's failing. Take > a look at the new_diff function in reviewboard/webapi/json.py. Add some > logging to the various exception handlers. In the 1.1 nightlies at least, > this has been added to the generic Exception handle: > > logging.error("Error uploading new diff: %s", e, exc_info=1) > > If not there, then in the UploadDiffForm in reviewboard/reviews/forms.py and > reviewboard/diffviewer/forms.py. > > Christian > > -- > Christian Hammond - chip...@chipx86.com > Review Board -http://www.reviewboard.org > VMware, Inc. -http://www.vmware.com > > On Mon, Feb 1, 2010 at 4:41 AM, Jan Koprowski wrote: > > > > > I made experiment. I create very simple svn repository on linux and > > try use post-review for it on Windows and on Linux. What I get: > > > On Linux: > > > >>> HTTP POSTing to > >http://192.168.56.2/api/json/reviewrequests/11/diff/new/:{'basedir': '/'} > > --127.0.1.1.1000.2795.1265030375.375.2 > > Content-Disposition: form-data; name="basedir" > > > / > > --127.0.1.1.1000.2795.1265030375.375.2 > > Content-Disposition: form-data; name="path"; filename="diff" > > > Index: /b > > === > > --- /b (revision 0) > > +++ /b (revision 0) > > @@ -0,0 +1 @@ > > +b > > > --127.0.1.1.1000.2795.1265030375.375.2-- > > > {'path': {'content': 'Index: /b > > \n=== > > \n--- /b\t(revision 0)\n+++ /b\t(revision 0)\n@@ -0,0 +1 @@\n+b\n', > > 'filename': 'diff'}} > > Review request #11 posted. > > >http://192.168.56.2/r/11 > > > On Windows: > > > >>> HTTP POSTing tohttp://localhost/api/json/reviewrequests/55/diff/new/: > > {'basedir': '/'} > > --172.28.38.102.1.6644.1265026662.057.3 > > Content-Disposition: form-data; name="basedir" > > > / > > --172.28.38.102.1.6644.1265026662.057.3 > > Content-Disposition: form-data; name="path"; filename="diff" > > > Index: /b > > === > > --- /b (revision 0) > > +++ /b (revision 0) > > @@ -0,0 +1 @@ > > +b > > > --172.28.38.102.1.6644.1265026662.057.3-- > > > {'path': {'content': 'Index: /b > > \n=== > > \n--- /b\t(revision 0)\n+++ /b\t(revision 0)\n@@ -0,0 +1 @@\n+b\n', > > 'filename': 'diff'}} > > Error uploading diff: One or more fields had errors (105) > > >>> {'fields': {'path': ['diff']}, 'stat': 'fail', 'err': {'msg': 'One or > > more fields had errors', 'code': 105}} > > Your review request still exists, but the diff is not attached. > > > What is the problem? Why this same diff works fine on Linuks and break > > on Windows? What is the change? I don't see any big change in > > generated output. > > > Greetings from Poland! > > -- > > Jan Koprowski > > > -- > > Want to help the Review Board project? Donate today at > >http://www.reviewboard.org/donate/ > > Happy user? Let us know athttp://www.reviewbo
Re: Fields error on windows with svn
Hmm.. Very hard to say. They certainly look identical. What version of Review Board is this? I believe the 1.1 nightlies have some additional server-side logging for these errors, but either way, it might be worth instrumenting the server to find out where exactly it's failing. Take a look at the new_diff function in reviewboard/webapi/json.py. Add some logging to the various exception handlers. In the 1.1 nightlies at least, this has been added to the generic Exception handle: logging.error("Error uploading new diff: %s", e, exc_info=1) If not there, then in the UploadDiffForm in reviewboard/reviews/forms.py and reviewboard/diffviewer/forms.py. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Mon, Feb 1, 2010 at 4:41 AM, Jan Koprowski wrote: > I made experiment. I create very simple svn repository on linux and > try use post-review for it on Windows and on Linux. What I get: > > On Linux: > > >>> HTTP POSTing to > http://192.168.56.2/api/json/reviewrequests/11/diff/new/: {'basedir': '/'} > --127.0.1.1.1000.2795.1265030375.375.2 > Content-Disposition: form-data; name="basedir" > > / > --127.0.1.1.1000.2795.1265030375.375.2 > Content-Disposition: form-data; name="path"; filename="diff" > > Index: /b > === > --- /b (revision 0) > +++ /b (revision 0) > @@ -0,0 +1 @@ > +b > > --127.0.1.1.1000.2795.1265030375.375.2-- > > > {'path': {'content': 'Index: /b > \n=== > \n--- /b\t(revision 0)\n+++ /b\t(revision 0)\n@@ -0,0 +1 @@\n+b\n', > 'filename': 'diff'}} > Review request #11 posted. > > http://192.168.56.2/r/11 > > > On Windows: > > >>> HTTP POSTing to http://localhost/api/json/reviewrequests/55/diff/new/: > {'basedir': '/'} > --172.28.38.102.1.6644.1265026662.057.3 > Content-Disposition: form-data; name="basedir" > > / > --172.28.38.102.1.6644.1265026662.057.3 > Content-Disposition: form-data; name="path"; filename="diff" > > Index: /b > === > --- /b (revision 0) > +++ /b (revision 0) > @@ -0,0 +1 @@ > +b > > --172.28.38.102.1.6644.1265026662.057.3-- > > > {'path': {'content': 'Index: /b > \n=== > \n--- /b\t(revision 0)\n+++ /b\t(revision 0)\n@@ -0,0 +1 @@\n+b\n', > 'filename': 'diff'}} > Error uploading diff: One or more fields had errors (105) > >>> {'fields': {'path': ['diff']}, 'stat': 'fail', 'err': {'msg': 'One or > more fields had errors', 'code': 105}} > Your review request still exists, but the diff is not attached. > > What is the problem? Why this same diff works fine on Linuks and break > on Windows? What is the change? I don't see any big change in > generated output. > > Greetings from Poland! > -- > Jan Koprowski > > -- > Want to help the Review Board project? Donate today at > http://www.reviewboard.org/donate/ > Happy user? Let us know at http://www.reviewboard.org/users/ > -~--~~~~--~~--~--~--- > To unsubscribe from this group, send email to > reviewboard+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/reviewboard?hl=en -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know at http://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en