Customize ReviewBoard instance
Hi! I'am start using reviewboard and need some customizations: 1) I need hooks run after Submited or Discarded 2) Add custom footer, change logo, title First thing is a way to customize some layoutes. I know how I can do that now: * copy templates from reviewboard to my folder * set in my settings_local TEMPLATE_DIRS to my directory and oryginal directory (for example symlink somewhere inside my instance created by rb-site) but this option have one limitation. Upgrading my ReviewBoard need to check is modified by me templates doesn't change... hmmm. My idea is made some modifications in settings_local which allow not only overwrite existing settings but modify it. My first try looks like: settings_local.py --- import reviewboard.settings TEMPLATE_DIRS = ( r'/my/custom/dir' ) + reviewboard.settings.TEMPLATE_DIRS --- but this doesn't have effect. I guess problem in import recursion. settings_local import settings and settings import settings_local. Python make it and modify TEMPLATE_DIRS but Django doesn't catch this. So the second shoot is change some ways. * settings.py settings_default.py * settings_local.py --- from reviewboard.settings_default import * [... ... ...] some custom modifications * settings.py --- try: from settings_local import * except: from default import * some neccessery checks and customizations This is the way (i think) good enough which provide some features 1) We have our default values 2) User can change anything in settings_local. Overwriting is only one option. There can be also modification! They can add some custom template directory before templates from reviewboard (and create their own templates) or not :] Second grate benefit is way to add some custom plugins (MIDDLEWARE_CLASSES or APPS) which allow to do many greate things. Unfortunetly I don't know how this looks with merging with Django source tree so :] there is second option (IMHO a little bit worse then first one) At the end add loop which check settings_local under MYRB_PRE_ and MYRB_POST_ prefixed variables and add/append values to existing once. for variable filter(lambda s: s.startswith('MYRB_PRE_'), dir(settings_local)) [...] globals()[varname] = variable + globals()[varname] for variable filter(lambda s: s.startswith('MYRB_POST_'), dir(settings_local)) [...] globals()[varname] = globals()[varname] + variable IMHO first option is much more clear and flexible and bettter designed then first one. What do You think? I can prepare review for this concept. 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
Re: Slow diffs (many min)
Wow, thanks for all the detail! I'll definitely give this a shot on Monday! Some inline comments: On Fri, Apr 2, 2010 at 7:40 PM, Christian Hammond chip...@chipx86.comwrote: The possible bottlenecks I can think of are: 1) Fetching the file from the repository Seems not to be the issue (if the repository's logs can be trusted). 2) Performing the diff between the original file and the patched file Seems quite possible. This would, I expect, be the first thing to care about the file contents, no? 3) Applying syntax highlighting. Does this get done to the entire file or only the difference sections that are shown initially? What file type was it? It's some sort of text file that looks to be a sort of manifest. I'm not too familiar with the project that owns it, sadly, but it does appear to be plain text except for the leading BOM. We haven't tested with files containing a BOM. It's possible something breaks from it. We'd have to test it. I wouldn't have even mentioned it, but I happened to have come across an OpenGrok issue with BOMs that my predecessor had been tracking and it made me wonder. On Fri, Apr 2, 2010 at 3:50 PM, Aaron Sherman a...@ajs.com wrote: We have an RB instance with a Perforce back-end. We see some log entries that suggest VERY long response times for diffs. Now, to be fair, these are very rare, but they seem to be centered on reviews that are tied to many-thousand-line diffs. On the Perforce server logs, we don't see these long times anywere. In fact, every request from RB is serviced in a few seconds at most. Meanwhile I've seen 20 minute response times on some requests such as this one: 10.xxx.xxx.xxx - - [29/Mar/2010:09:25:16 -0700] GET /r/138017/diff/ HTTP/1.0 200 391661 So, what I'm wondering is: * Is there a good way to track this sort of thing down? * If the revision control system isn't seeing this, what's a likely culprit? * When does RB talk to the revision control system? I did visit these reviews myself, and the first time, it did hang on loading 2 of the 6 diffed files for me, but I've been unable to reproduce that since. The two files it hung on were both quite large and (I have no idea if this is relevant) contained a leading BOM marker (http://en.wikipedia.org/wiki/Byte_order_mark); would that cause any problems? -- 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.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en To unsubscribe, reply using remove me as the subject. -- 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.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs -- 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
Provide ReviewBoard hooks / triggers
Hi! I'am providing hooks in reviewboard and I think how I can do this. My idea is simple Add to json.py import like this: from rbhooks import pre_review_close_hook, post_review_close_hook And then modify some functions: try: pre_review_close_hook(review_request_id, type, request) review_request = ReviewRequest.objects.get(pk=review_request_id) review_request.close(type_map[type], request.user) post_review_close_hook(review_request, type, request) except ReviewRequest.DoesNotExist: return WebAPIResponseError(request, DOES_NOT_EXIST) except PermissionError: return HttpResponseForbidden() Where should be rbtools? I thinks this should be empty file (later when number of hooks will be large even directory) in ./rbtools.py for development and conf/rbtools.py in rb-site instance file where will be empty functions like this: def pre_review_close_hook(review_request_id, type, request): pass def post_review_close_hook(review_request, type, request): pass I'am providing some hooks now and I want to ask this tool author is there any way in which they want implement this feature. Any suggestions, ideas? One idea is provide triggers which can't modify anything, and if needed hooks which allow modify variables provided to function. -- 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 To unsubscribe, reply using remove me as the subject.
Re: Comment on Summer_of_Code_Ideas in reviewboard
Comment by hittudiv: Hi, I am hitesh from Bits-goa India. I am intrested in making a *Windows Installer* . I have already made A custom WAMP installer for some of my web applications. please look at [http://oem.hittudiv.in] for my application. For more information: http://code.google.com/p/reviewboard/wiki/Summer_of_Code_Ideas -- You received this message because you are subscribed to the Google Groups reviewboard-issues group. To post to this group, send email to reviewboard-iss...@googlegroups.com. To unsubscribe from this group, send email to reviewboard-issues+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/reviewboard-issues?hl=en.