Hi, Basically, you can't patch the bundled JavaScript without some careful work. You'd have to instead build a new package with the patch.
The reason is that our JavaScript gets minified and bundled together. When looking up a bundle, Review Board first looks up the bundle name (like reviews.min.js), computes a hash, generates a new filename with that hash, caches it, then looks up the resulting filename, fetches it, then validates that. The browser then caches the fetched file with no expiration. You'd basically need to patch the non-hashed version (which is minified, so this would be hard), then make a new file that contains the correct hash using the same logic Django uses, then clear memcached and restart Apache. Or you'd need to build a package. For that, you'd need node.js, lesscss for node (NOT the Ruby version), uglifyjs, and the Review Board source tree. You'd need to build the egg in the correct mode, install it, and go through the upgrade process for your site. However, in this case, this change is actually part of the latest versions of Review Board, so you'd be better off just upgrading. Christian On Monday, July 6, 2015, Xy Sui <[email protected]> wrote: > Hi, > > I would like to patch our reviewboard server with the diff of below review > request which includes 2 javascript changes > https://reviews.reviewboard.org/r/7186/ > > So my patch steps are: > wget http://reviews.reviewboard.org/r/7186/diff/raw/ -O > /tmp/r7186.patch > cd /usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.15-py2.7.egg/ > sudo patch -p1 </tmp/r7186.patch > > After restart apache, I don't see the target javascript files under > <SITE_ROOT> changed, > > To list the files under <SITE_ROOT>/htdocs/static/rb/js, I always got the > old modification date: > -rw-rw-r-- 1 root staff 173950 *May 18 10:53* > reviews.min.f40f098c0f34.js > > Any idea to trigger uglifyjs or django pipeline to regenerate the > compressed static files? > > Thanks already. > > -- > Supercharge your Review Board with Power Pack: > https://www.reviewboard.org/powerpack/ > Want us to host Review Board for you? Check out RBCommons: > https://rbcommons.com/ > Happy user? Let us know! https://www.reviewboard.org/users/ > --- > You received this message because you are subscribed to the Google Groups > "reviewboard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','reviewboard%[email protected]');> > . > For more options, visit https://groups.google.com/d/optout. > -- -- Christian Hammond - [email protected] Review Board - https://www.reviewboard.org Beanbag, Inc. - https://www.beanbaginc.com -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
