# HG changeset patch # User Steve Losh # Date 1278184365 14400 # Node ID 3d3a3f9e8d6c888aa41f9710ae81fec8c35b9b2c # Parent 1cfaa32d931d8de40ab5c882eb1e7a45bf2990dd hg-review: Update documentation. diff -r 1cfaa32d931d -r 3d3a3f9e8d6c hg-review/_sources/overview.txt --- a/hg-review/_sources/overview.txt Tue Jun 22 18:15:23 2010 -0400 +++ b/hg-review/_sources/overview.txt Sat Jul 03 15:12:45 2010 -0400 @@ -2,13 +2,13 @@ ======== Let's get started using hg-review. No matter how you want to use it, you need -to install it first! +to install it first. Installation ------------ hg-review requires `Python `_ 2.5 or later and `Mercurial -`_ 1.4 or later +`_ 1.6 or later You probably have both of these requirements already, but if you encounter problems you might want to check these first with ``python --version`` and diff -r 1cfaa32d931d -r 3d3a3f9e8d6c hg-review/_sources/webui.txt --- a/hg-review/_sources/webui.txt Tue Jun 22 18:15:23 2010 -0400 +++ b/hg-review/_sources/webui.txt Sat Jul 03 15:12:45 2010 -0400 @@ -55,3 +55,62 @@ Deployment to a Server ---------------------- + +Although hg-review is built for *distributed* code review it's sometimes nice +to provide a public interface. This will let people can comment easily without +using the extension (or even cloning your project). + +You can use any WSGI server you like to provide a public instance of hg-review. +Before you start you'll need to have Mercurial installed on your web server. + +Once you've got Mercurial running on the server you'll need to clone copies of +hg-review, your project, and your project's review data to the web server. +First create a directory where everything will live:: + + mkdir /var/www/myproject-review-interface/ + cd /var/www/myproject-review-interface/ + +Then grab a copy of hg-review:: + + hg clone http://bitbucket.org/sjl/hg-review/ + +Grab a copy of your project and configure it to use the hg-review extension:: + + hg clone http://bitbucket.org/you/yourproject/ + cd yourproject + + echo '[extensions]' >> .hg/hgrc + echo 'review = /var/www/myproject-review-interface/hg-review/review' >> .hg/hgrc + +Use hg-review to pull down the review data:: + + hg review --init + +Now that you've got all the necessary data you can set up the WSGI script. +Start by copying the included sample script:: + + cd /var/www/myproject-review-interface/ + cp hg-review/contrib/deploy/wsgi.py wsgi.py + +Edit the script to configure your project to your liking. For reference, the +relevant part of the script should look something like this:: + + # An example WSGI script for serving hg-review's web UI. + # Edit as necessary. + + # If hg-review is not on your webserver's PYTHONPATH, uncomment the lines + # below and point it at the hg-review directory. + import sys + sys.path.insert(0, "/var/www/myproject-review-interface/hg-review") + + REPO = '/var/www/myproject-review-interface/myproject' + READ_ONLY = True + ALLOW_ANON_COMMENTS = False + ANON_USER = 'Anonymous ' + SITE_ROOT = 'http://yoursite.com/optional/path' + TITLE = 'Your Project' + +All that's left is to point your WSGI server at this script and fire it up. How +you do that depends on your WSGI server. A sample configuration file for +`Gunicorn `_ is provided in +``contrib/deploy/gunicorn.conf.py``. diff -r 1cfaa32d931d -r 3d3a3f9e8d6c hg-review/_static/review.css --- a/hg-review/_static/review.css Tue Jun 22 18:15:23 2010 -0400 +++ b/hg-review/_static/review.css Sat Jul 03 15:12:45 2010 -0400 @@ -72,13 +72,15 @@ } .document .documentwrapper .bodywrapper div pre { border: 1px solid #edecc7; + border-right: none; background-color: #fbfbf3; + background-color: #f8f7e8; font-size: 13px; font-family: Monaco, Consolas, "Courier New", monospace; line-height: 24px; margin-bottom: 32px; margin-top: -8px; - margin-left: 24px; + margin-left: 25px; padding: 0px 8px; width: 498px; overflow-x: auto; @@ -144,3 +146,12 @@ text-align: right; font-style: italic; } +.sphinxsidebar .sphinxsidebarwrapper h4 { + margin-bottom: 0; +} +.sphinxsidebar .sphinxsidebarwrapper h3:nth-of-type(2) { + display: none; +} +.sphinxsidebar .sphinxsidebarwrapper ul.this-page-menu { + display: none; +} diff -r 1cfaa32d931d -r 3d3a3f9e8d6c hg-review/_static/review.less --- a/hg-review/_static/review.less Tue Jun 22 18:15:23 2010 -0400 +++ b/hg-review/_static/review.less Sat Jul 03 15:12:45 2010 -0400 @@ -73,13 +73,15 @@ div pre { border: 1px solid @c-cream; + border-right: none; background-color: lighten(@c-soft-cream, 3%); + background-color: @c-soft-cream; font-size: 13px; font-family: @font-mono; line-height: 24px; margin-bottom: 32px; margin-top: -8px; - margin-left: 24px; + margin-left: 25px; padding: 0px 8px; width: @content-width - 302px; overflow-x: auto; @@ -156,3 +158,14 @@ text-align: right; font-style: italic; } +.sphinxsidebar .sphinxsidebarwrapper { + h4 { + margin-bottom: 0; + } + h3:nth-of-type(2) { + display: none; + } + ul.this-page-menu { + display: none; + } +} diff -r 1cfaa32d931d -r 3d3a3f9e8d6c hg-review/overview.html --- a/hg-review/overview.html Tue Jun 22 18:15:23 2010 -0400 +++ b/hg-review/overview.html Sat Jul 03 15:12:45 2010 -0400 @@ -48,10 +48,10 @@

Overview

Let’s get started using hg-review. No matter how you want to use it, you need -to install it first!

+to install it first.

Installation

-

hg-review requires Python 2.5 or later and Mercurial 1.4 or later

+

hg-review requires Python 2.5 or later and Mercurial 1.6 or later

You probably have both of these requirements already, but if you encounter problems you might want to check these first with python --version and hg --version.

diff -r 1cfaa32d931d -r 3d3a3f9e8d6c hg-review/searchindex.js --- a/hg-review/searchindex.js Tue Jun 22 18:15:23 2010 -0400 +++ b/hg-review/searchindex.js Sat Jul 03 15:12:45 2010 -0400 @@ -1,1 +1,1 @@ -Search.setIndex({desctypes:{},terms:{all:[2,5],concept:[0,5,2],mile:5,hate:[],locat:2,depend:2,flask:2,init:[0,2],program:[7,5],under:7,sourc:2,fals:4,faq:7,offlin:5,affect:7,disturb:[],did:5,list:5,"try":5,gut:5,quick:2,pleas:2,prevent:4,natur:5,sign:5,past:5,second:5,port:4,even:[4,5],index:[],what:[0,4],poke:0,section:4,abl:4,access:[2,4],version:[2,7,5],"new":2,hgreview:2,"public":2,can:[2,4,5],full:5,never:5,here:0,let:[2,4,5],address:4,path:[0,2],search:[],sjl:[0,2],opinion:5,chang:5,chanc:5,extra:4,backout:5,appli:5,modul:[],brought:5,api:[0,3],instal:[0,2],from:5,would:5,visit:[2,4],two:5,next:2,few:[2,4,5],recommend:5,decentr:5,type:5,tell:5,more:[0,4,5],peopl:[4,5],train:5,particular:5,hold:2,easiest:2,car:5,work:[2,7,5],histori:5,remain:5,whatev:5,learn:[0,7],purpos:5,root:5,control:5,distrubut:5,quickstart:0,indic:[],want:[0,7,4,2],alwai:5,goal:5,turn:5,anoth:5,write:5,how:[2,7,5],anyon:[2,4],instead:[4,5],simpl:[0,5],isn:5,product:5,clone:[0,2],befor:5,wrong:5,plane:5,embrac:5,mai:[],data:[0,5,4,3,2],practic:5,bind:4,inform:4,combin:4,allow:4,talk:5,help:5,over:2,move:5,approv:5,becaus:[4,5],top:5,held:5,hgrc:[0,2],perfect:5,fix:5,better:5,solitari:[],decad:5,might:[2,7,5],easier:5,them:[2,4,5],greater:5,thei:5,python:[0,3,2],initi:[0,2],jinja2:2,half:5,now:[0,2],choic:0,somewher:[0,2],name:4,anyth:[0,5],edit:5,gerrit:5,separ:5,mode:4,each:5,mean:5,idea:5,realli:[2,5],year:5,our:5,out:[0,5],accomplish:5,goe:5,content:[],got:0,insid:5,ask:5,org:[0,2],care:[4,5],could:5,keep:5,thing:[2,5],perhap:5,place:0,perman:4,think:5,first:[0,5,2],onc:2,alreadi:[0,2],done:2,open:[0,2],primari:5,ont:[],gpl:7,differ:5,interact:5,gpg:5,system:5,mercuri:[0,5,7,4,2],store:5,listen:4,luckili:0,option:4,especi:5,tool:[0,5],exactli:5,than:[0,5],kind:5,provid:[1,5],structur:[0,5],project:[2,5],matter:2,friend:5,were:5,toward:5,browser:[0,2],sai:5,viewer:4,ani:[2,7,5],have:[2,5],tabl:[],need:[0,5,2],seen:5,seem:5,also:[2,5],exampl:[2,4,5],take:[4,5],sure:2,distribut:[0,7,5],though:5,usernam:4,licens:[0,7],most:[4,5],plai:0,deploi:4,don:[2,5],url:2,later:[2,7,5],doe:5,someth:2,changeset:[2,5],signoff:[0,5,1,4],hack:[0,6],find:5,impact:5,onli:[2,4,5],layout:[0,6],should:[2,7,5],local:[0,5,4,2],get:2,bear:5,repo:2,made:4,report:[0,2],requir:2,enabl:0,remot:[2,5],integr:0,contain:5,wrote:5,view:4,set:[2,4,5],see:[2,4],expertis:5,review:[0,1,2,4,5,6,7],behind:5,won:5,simplest:5,awai:[0,5],experi:5,approach:5,extens:[0,2],both:2,howev:5,anon:4,com:4,comment:[0,5,1,4],simpli:5,overview:[0,2],period:5,guid:0,reviewboard:5,code:[0,5,2],coupl:2,been:5,basic:[0,5],oth:[],fire:2,thousand:5,atlassian:5,understand:5,"catch":5,impati:0,crucibl:5,look:[7,5],"while":[2,5],error:[2,5],anonym:4,advantag:5,readi:[0,2],worri:2,itself:[0,7,5],clutter:[2,5],sever:5,develop:[0,5],welcom:[],author:[4,5],perform:0,suggest:2,make:[2,5],tour:2,same:[7,5],document:[0,6,2],http:[0,4,2],someon:5,hand:5,user:[0,5],whole:5,well:2,person:5,without:[2,4,5],command:[0,4,1,2],thi:[0,5,7,4,2],programm:[],model:5,usual:[],just:[2,5],when:[0,4,5],collabor:5,web:[0,4,1,2],easi:5,had:5,littl:5,add:[0,4,2],els:5,useless:5,applic:0,around:[0,5],format:[0,3],read:[2,4,5],know:[0,5,2],like:[2,5],specif:5,changelog:2,server:[0,4,5],necessari:5,popular:5,page:7,encount:2,right:0,often:5,some:[0,5],back:5,intern:5,home:[],avoid:5,deploy:[0,4],definit:5,track:5,localhost:[0,4,2],machin:5,creatur:[],run:[0,4,2],power:5,usag:[0,2],sacrif:5,host:2,repositori:[0,5,4,3,2],post:2,src:5,about:[2,7,5],central:5,unfortun:5,commit:[2,5],own:[0,5],within:5,down:2,subvers:5,your:[0,5,4,2],manag:5,git:5,lof:[],log:5,wai:[2,5],support:5,start:[0,5,4,2],reli:5,interfac:[0,4,1,2],includ:5,lot:5,biggest:5,hei:5,"function":5,form:5,bundl:2,neutral:5,yourproject:5,line:[0,5,1,2],bug:[0,2],pull:[2,4,5],rietveld:5,possibl:5,"default":4,problem:[2,5],creat:[2,7,5],doesn:5,exist:[2,5],file:[0,5,3,2],check:[0,1,2],probabl:[2,4],googl:[],titl:[],tip:[],other:[0,5,4,2],normal:[4,5],test:[0,6],you:[0,5,7,4,2],meaning:[],ago:5,bitbucket:[0,2],directori:[0,5,2],time:2,push:[4,5]},titles:["hg-review documentation","Command Line Interface","Overview","API","Web Interface","Concepts","Hacking hg-review","Licensing"],modules:{},descrefs:{},filenames:["index","cli","overview","dev","webui","concepts","hacking","licensing"]}) \ No newline at end of file +Search.setIndex({desctypes:{},terms:{all:[2,4,5],concept:[0,5,2],mile:5,hate:[],depend:[2,4],flask:2,init:[0,4,2],program:[7,5],under:7,sourc:2,fals:4,faq:7,offlin:5,affect:7,relev:4,disturb:[],did:5,list:5,"try":5,gut:5,quick:2,pleas:2,prevent:4,natur:5,sign:5,past:5,second:5,port:4,even:[4,5],index:[],what:[0,4],poke:0,section:4,abl:4,remain:5,access:[2,4],version:[2,7,5],"new":2,hgreview:2,"public":[2,4],can:[2,4,5],full:5,never:5,here:0,let:[2,4,5],address:4,locat:2,search:[],sjl:[0,4,2],opinion:5,chang:5,chanc:5,although:4,extra:4,backout:5,appli:5,modul:[],brought:5,api:[0,3],instal:[0,4,2],from:5,would:5,visit:[2,4],two:5,next:2,few:[2,4,5],live:4,recommend:5,decentr:5,type:5,tell:5,more:[0,4,5],peopl:[4,5],site_root:4,train:5,particular:5,hold:2,easiest:2,car:5,work:[2,7,5],histori:5,anon_us:4,whatev:5,learn:[0,7],purpos:5,root:5,control:5,distrubut:5,quickstart:0,indic:[],want:[0,7,4,2],alwai:5,goal:5,turn:5,anoth:5,read_onli:4,how:[2,7,4,5],anyon:[2,4],instead:[4,5],simpl:[0,5],isn:5,product:5,clone:[0,4,2],befor:[4,5],wrong:5,plane:5,embrac:5,mai:[],data:[0,5,4,3,2],practic:5,bind:4,inform:4,combin:4,allow:4,talk:5,help:5,over:2,move:5,approv:5,becaus:[4,5],top:5,held:5,hgrc:[0,4,2],perfect:5,write:5,fix:5,better:5,solitari:[],decad:5,might:[2,7,5],easier:5,them:[2,4,5],greater:5,thei:5,python:[0,3,2],initi:[0,2],jinja2:2,half:5,now:[0,4,2],choic:0,somewher:[0,2],name:4,anyth:[0,5],edit:[4,5],gerrit:5,separ:5,easili:4,mode:4,each:5,mean:5,idea:5,realli:[2,5],year:5,our:5,out:[0,5],accomplish:5,goe:5,content:[],got:[0,4],gunicorn:4,insid:5,ask:5,org:[0,4,2],care:[4,5],could:5,keep:5,thing:[2,5],perhap:5,place:0,perman:4,think:5,first:[0,5,4,2],onc:[2,4],sometim:4,alreadi:[0,2],done:2,open:[0,2],primari:5,ont:[],gpl:7,differ:5,script:4,interact:5,gpg:5,mkdir:4,system:5,mercuri:[0,5,7,4,2],store:5,listen:4,luckili:0,option:4,especi:5,tool:[0,5],copi:4,biggest:5,part:4,exactli:5,than:[0,5],serv:4,kind:5,provid:[5,1,4],structur:[0,5],provic:[],project:[2,4,5],matter:2,friend:5,were:5,toward:5,browser:[0,2],sai:5,viewer:4,ani:[2,7,4,5],myproject:4,have:[2,4,5],tabl:[],need:[0,5,4,2],seen:5,seem:5,built:4,also:[2,5],exampl:[2,4,5],take:[4,5],sure:2,distribut:[0,7,4,5],deploy:[0,4],track:5,licens:[0,7],most:[4,5],plai:0,deploi:4,everyth:4,don:[2,5],url:2,later:[2,7,5],doe:5,left:4,someth:[2,4],changeset:[2,5],wsgi:4,signoff:[0,5,1,4],hack:[0,6],find:5,impact:5,yoursit:4,onli:[2,4,5],layout:[0,6],configur:4,should:[2,7,4,5],local:[0,5,4,2],get:2,bear:5,repo:[2,4],made:4,report:[0,2],requir:2,enabl:0,remot:[2,5],integr:0,contain:5,grab:4,where:4,wrote:5,view:4,set:[2,4,5],see:[2,4],expertis:5,review:[0,1,2,4,5,6,7],behind:5,won:5,simplest:5,"import":4,awai:[0,5],experi:5,approach:5,extens:[0,4,2],both:2,howev:5,anon:4,instanc:4,com:4,comment:[0,5,1,4],simpli:5,point:4,overview:[0,2],period:5,path:[0,4,2],guid:0,reviewboard:5,code:[0,5,4,2],coupl:2,been:5,basic:[0,5],oth:[],fire:[2,4],thousand:5,atlassian:5,understand:5,"catch":5,impati:0,crucibl:5,look:[7,4,5],"while":[2,5],error:[2,5],anonym:4,advantag:5,readi:[0,2],worri:2,itself:[0,7,5],clutter:[2,5],uncom:4,conf:4,sever:5,develop:[0,5],welcom:[],author:[4,5],perform:0,suggest:2,make:[2,5],tour:2,same:[7,5],document:[0,6,2],http:[0,4,2],webserv:4,someon:5,hand:5,user:[0,5],whole:5,well:2,person:5,without:[2,4,5],command:[0,4,1,2],thi:[0,5,7,4,2],programm:[],model:5,usual:[],just:[2,5],when:[0,4,5],collabor:5,web:[0,4,1,2],easi:5,had:5,littl:5,add:[0,4,2],els:5,useless:5,applic:0,around:[0,5],format:[0,3],read:[2,4,5],know:[0,5,2],insert:4,like:[2,4,5],specif:5,changelog:2,server:[0,4,5],necessari:[4,5],popular:5,page:7,encount:2,www:4,right:0,often:5,some:[0,5],back:5,intern:5,sampl:4,home:[],avoid:5,though:5,definit:5,usernam:4,localhost:[0,4,2],refer:4,machin:5,creatur:[],run:[0,4,2],power:5,usag:[0,2],sacrif:5,host:2,repositori:[0,5,4,3,2],post:2,src:5,about:[2,7,5],central:5,unfortun:5,commit:[2,5],own:[0,5],pythonpath:4,within:5,down:[2,4],contrib:4,subvers:5,your:[0,5,4,2],manag:5,git:5,lof:[],log:5,wai:[2,5],support:5,start:[0,5,4,2],reli:5,interfac:[0,4,1,2],includ:[4,5],lot:5,"var":4,hei:5,"function":5,form:5,bundl:2,neutral:5,yourproject:[4,5],line:[0,5,4,1,2],"true":4,bug:[0,2],pull:[2,4,5],rietveld:5,possibl:5,"default":4,allow_anon_com:4,below:4,problem:[2,5],creat:[2,7,4,5],doesn:5,exist:[2,5],file:[0,5,4,3,2],check:[0,1,2],probabl:[2,4],echo:4,googl:[],titl:4,tip:[],other:[0,5,4,2],normal:[4,5],test:[0,6],you:[0,5,7,4,2],nice:4,meaning:[],ago:5,bitbucket:[0,4,2],directori:[0,5,4,2],time:2,push:[4,5]},titles:["hg-review documentation","Command Line Interface","Overview","API","Web Interface","Concepts","Hacking hg-review","Licensing"],modules:{},descrefs:{},filenames:["index","cli","overview","dev","webui","concepts","hacking","licensing"]}) \ No newline at end of file diff -r 1cfaa32d931d -r 3d3a3f9e8d6c hg-review/webui.html --- a/hg-review/webui.html Tue Jun 22 18:15:23 2010 -0400 +++ b/hg-review/webui.html Sat Jul 03 15:12:45 2010 -0400 @@ -89,6 +89,57 @@

Deployment to a Server

+

Although hg-review is built for distributed code review it’s sometimes nice +to provide a public interface. This will let people can comment easily without +using the extension (or even cloning your project).

+

You can use any WSGI server you like to provide a public instance of hg-review. +Before you start you’ll need to have Mercurial installed on your web server.

+

Once you’ve got Mercurial running on the server you’ll need to clone copies of +hg-review, your project, and your project’s review data to the web server. +First create a directory where everything will live:

+
mkdir /var/www/myproject-review-interface/
+cd /var/www/myproject-review-interface/
+
+

Then grab a copy of hg-review:

+
hg clone http://bitbucket.org/sjl/hg-review/
+
+

Grab a copy of your project and configure it to use the hg-review extension:

+
hg clone http://bitbucket.org/you/yourproject/
+cd yourproject
+
+echo '[extensions]' >> .hg/hgrc
+echo 'review = /var/www/myproject-review-interface/hg-review/review' >> .hg/hgrc
+
+

Use hg-review to pull down the review data:

+
hg review --init
+
+

Now that you’ve got all the necessary data you can set up the WSGI script. +Start by copying the included sample script:

+
cd /var/www/myproject-review-interface/
+cp hg-review/contrib/deploy/wsgi.py wsgi.py
+
+

Edit the script to configure your project to your liking. For reference, the +relevant part of the script should look something like this:

+
# An example WSGI script for serving hg-review's web UI.
+# Edit as necessary.
+
+# If hg-review is not on your webserver's PYTHONPATH, uncomment the lines
+# below and point it at the hg-review directory.
+import sys
+sys.path.insert(0, "/var/www/myproject-review-interface/hg-review")
+
+REPO = '/var/www/myproject-review-interface/myproject'
+READ_ONLY = True
+ALLOW_ANON_COMMENTS = False
+ANON_USER = 'Anonymous <anonymous@example.com>'
+SITE_ROOT = 'http://yoursite.com/optional/path'
+TITLE = 'Your Project'
+
+
+

All that’s left is to point your WSGI server at this script and fire it up. How +you do that depends on your WSGI server. A sample configuration file for +Gunicorn is provided in +contrib/deploy/gunicorn.conf.py.