After Sun/oracle worked for N (>12) years, I liked the web version of the Webrev tool because it was really very good at ease of use. Fortunately, engineers put Webrev tools on GitHub and supported git. The entire process of creating a Web version of Webrev using the Webrev tool is given below. Of course, first of all, make sure Git is already installed on Linux (I'm using Ubuntu14.04).
1th Step: Clone Webrev from here
veli$ cd/var/tmpveli$ git clone https: //github.com/joyent/webrev.git Cloning into'Webrev'... remote:counting objects: -, Done. Remote:total -(Delta0), reused0(Delta0), pack-reused -Unpacking objects: -% ( -/ -), Done. Checking Connectivity ... Done. veli$ Tree Webrevwebrev├──bin│├──wdiff│├──webrev│└──which_scm├──etc│├──its.conf│└──its.reg└──r Eadme.md
2nd Step: Add Webrev/bin to PATH
Export path=/var/tmp/webrev/ bin: $PATH/var/tmp/webrev/bin/webrev
3rd Step: Set up Apache2
sudo Install sudo sudo ln-s/var/sudo "ServerName localhost:80"sudo service apache2 restart
4th step: clone my source code and update something
veli$git clone https://Github.com/idorax/vcodehub.gitCloning into'Vcodehub'... remote:counting objects:359, Done. remote:compressing objects: -% ( -/ -), Done. Remote:total359(Delta -), reused0(Delta0), pack-reused254Receiving objects: -% (359/359),7.85MiB |1.61MIB/S, Done. Resolving deltas: -% (164/164), Done. Checking Connectivity ... Done.
Now update a file,
veli$ cd/var/tmp/sandbox/vcodehub/sharpsword/vi SUDORAX.C
5th step: Commit Changes
veli$git Commit-a 1 to/ -/ .: Demo to use Webrev2# Please enter the commit message foryour changes. Lines starting3# with'#''ll is ignored, and an empty message aborts the commit. 4# on Branch master5# Your Branch is up-to-DateWith'Origin/master'. 6 # 7# Changes to be committed:8# modified:sudorax.c9#veli $ git showcommit eb08966d562c03abbe538615a60b0ba648c9cadfauthor:vector Li<[email protected]126.com>Date:sun May - One: in: One .+0800 to/ -/ .: Demo to use Webrevdiff--git a/sharpsword/c/sudorax.c b/sharpsword/c/sudorax.cindex 3f334c5.4645870 100644---a/sharpsword/c/sudorax.c+ + b/sharpsword/c/sudorax.c@@- $, A+ $,9@@ typedef unsignedLonguint32_t; static uint64_t Power (int32_t N, uint32_t m) {-uint32_t i; uint64_tsum=1;-- for(i =0; I < m; i++)+ for(Uint32_t i =0; I < m; i++) sum*=N;-returnsum; }
6th step: Create Webrev
Webrev Warning:codereview (1) not found. SCM detected:git File list from:git ... Done. /var/tmp/sandbox/Vcodehub (at eb08966d562c) Compare against:origin/master (https://github.com /idorax/vcodehub.git at C64cf7c91ba6) output to:/var/tmp/sandbox/webrev output Files: Sharpsword/c/sudorax.c patch cdiffs udiffs wdiffs sdiffs frames Old New Generating PDF:Skipped:no output available index.html:Done.
7th step: visit Webrev in Firefox
Egrep ' 127.0.0.1 ' /etc/hosts127.0. 0.1 localhost127.0. 0.1 Idorax
Then visit http://idorax/t/sandbox/webrev
How familiar the interface, finally appeared! Thank OpenSolaris, Thank illumos! Click Frames,
How familiar the code than on the page, feel very kind ah:-)
Conclusion: You can use Webrev on Linux at home, it is too happy! In a nutshell, thank OpenSolaris, thank you illumos!
Create a web version of Webrev on Linux