Hi, all. I can generate diff content in the RB Server side now. But I really don't konw how to update this content into the 'request' object comes from post-review. I had viewed the "new_diff" function in 'json.py', And I had read some documents about Django Request object. They said "Request" object has two members : filename, content. But I found that there are no such members in the "request" object in 'new_diff' function at all. it shows follows:
-------------------------------------------------------- request['path'] =[<InMemoryUploadedFile: diff ()>] request['POST']=<QueryDict: {u'file_base_dir': [u':pserver:johnhe...@192.168.1.150:/export/home/cvsroot'], u'file_info': [u'test/abc.c;1.1:1 .5']}> (the request['POST'] info are what I posted from post-review side after my change to post-review) --------------------------------------------------------------- The request['files'] dict has no key like "content" or "filename" at all. So How can I change the request's diff content with which I had got at the RB Server side ? Best Regards! 在2010-01-29?14:12:53,JohnHenry?<qhlonl...@163.com>?写道: >Hi,?all. >?????I?am?using?reviewboard?1.0.5.1;?Now?I?had?to?change?post-review >and?reviewboard?so?that?post-review?will?not?upload?diff?file, >instead?,?it?give?file?versions?to?ReviewBoard,?So?that?Reviewbaord >can?run?"cvs?diff?-uN?-r?"?command?to?generate?diff?file?by?it?self. >?????Currently,?post-review?upload?diff?file?to?RBServer?by?function >"upload_diff"?which?will?call?another?function >"_encode_multipart_formdata"?.?and?the?"upload_diff"?will?upload?two >dictionry:?"fields"?and?"files"?,?the?files['path']['content']?is?the >file?content. >?????My?change?is?that:?the?diff?is?set?as?an?empty?string,?and?the >dictionary?"fields"?will?taken?another?dictionary?item,?which?will >take?info?about?file_name?and?file_versions.?such?as?{"test >\mytest.c":"1.2:1.4"}.?When?RB?server?get?this?dictionary,?It?will >call?cvs?command?to?generate?diff?content?(in?function?"new_diff"?of >file?json.py): >?????But?currently,?the?"_encode_multipart_formatdata"??will?not >encode?a?dictionary?type,?and?I?don't?know?how?to?encode?a?dictionary >type?to?let?it?transform?to?RB?server?either.?So?can?any?one?give?me >some?suggestion?on?the?infomation?format?or?communication?standard >between?post-review?and?reviewbaord?server??and?if?you?can?give?me >more?suggestion?about?self?defined?data?transmission?between?post- >review?and?RB?Server,?I?will?be?much?thanks. > > >Best?Regards! > >--? >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