在Linux上创建webrev[基于git]
在Sun/Oracle工作了N(>12)年后,对webrev工具甚为喜欢,因为其易用性确实非常好。幸运的是,有工程师将webrev工具放到了GitHub上,而且支持git。 下面给出使用webrev工具创建代码比对网页的全过程。 当然,首先得保证代码管理工具git在Linux(我用的是Ubuntu14.04)上已经就位和已经安装了ksh,因为webrev工具是基于ksh实现的。
第1步: Clone webrev from here
veli$ cd /var/tmp
veli$ git clone https://github.com/joyent/webrev.git
Cloning into 'webrev'...
remote: Counting objects: , done.
remote: Total (delta ), reused (delta ), pack-reused
Unpacking objects: % (/), done.
Checking connectivity... done. veli$ tree webrev
webrev
├── bin
│ ├── wdiff
│ ├── webrev
│ └── which_scm
├── etc
│ ├── its.conf
│ └── its.reg
└── README.md
第2步: Add webrev/bin to PATH
veli$ export PATH=/var/tmp/webrev/bin:$PATH
veli$ type webrev
webrev is /var/tmp/webrev/bin/webrev
第3步: Set up apache2
veli$ sudo apt-get install apache2
veli$ sudo service apache2 status
veli$ cd /var/www/html && sudo ln -s /var/tmp t
veli$ sudo vim /etc/apache2/apache2.conf # add "ServerName localhost:80"
veli$ sudo service apache2 restart
第4步: clone my source code and update something
veli$ git clone https://github.com/idorax/vCodeHub.git
Cloning into 'vCodeHub'...
remote: Counting objects: , done.
remote: Compressing objects: % (/), done.
remote: Total (delta ), reused (delta ), pack-reused
Receiving objects: % (/), 7.85 MiB | 1.61 MiB/s, done.
Resolving deltas: % (/), done.
Checking connectivity... done.
Now update a file,
veli$ cd /var/tmp/sandbox/vCodeHub/sharpsword/c
veli$ vi sudorax.c
第5步: commit changes
veli$ git commit -a
//: demo to use webrev
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is up-to-date with 'origin/master'.
#
# Changes to be committed:
# modified: sudorax.c
# veli$ git show
commit eb08966d562c03abbe538615a60b0ba648c9cadf
Author: Vector Li <idorax@.com>
Date: Sun May :: + //: demo to use webrev diff --git a/sharpsword/c/sudorax.c b/sharpsword/c/sudorax.c
index 3f334c5..
--- a/sharpsword/c/sudorax.c
+++ b/sharpsword/c/sudorax.c
@@ -, +, @@ typedef unsigned long uint32_t;
static uint64_t
power(int32_t n, uint32_t m)
{
- uint32_t i;
uint64_t sum = ;
-
- for (i = ; i < m; i++)
+ for (uint32_t i = ; i < m; i++)
sum *= n;
-
return sum;
}
第6步: create webrev
veli$ webrev
WARNING: codereview() not found.
SCM detected: git
File list from: git ... Done.
Workspace: /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.
第7步: 在firefox里访问webrev
veli$ egrep '127.0.0.1' /etc/hosts
127.0.0.1 localhost
127.0.0.1 idorax
于是访问 http://idorax/t/sandbox/webrev

多么熟悉的web页面,终于出现了! Thank opensolaris, thank illumos! 点击Frames,

多么熟悉的代码比对页面,倍感亲切呀:-)
结束语: 能在家里的Linux上用上webrev,实在是太幸福了!归根结底就一句话, 感谢opensolaris, 感谢illumos!
在Linux上创建webrev[基于git]的更多相关文章
- 在Linux上创建webrev(cont)[基于svn]
在前文中,基于git介绍了webrev工具.实际上,webrev工具还支持hg和svn.最近的工作中不可避免地要使用svn,故在此总结一下如何基于svn在Linux上创建webrev.顺便吐个槽,没有 ...
- 在LINUX上创建GIT服务器【转】
转自:http://blog.csdn.net/xiongmc/article/details/9176785 如果使用git的人数较少,可以使用下面的步骤快速部署一个git服务器环境. 1. Cli ...
- 在Linux上用Apache搭建Git服务器
在Linux上用Apache搭建Git服务器 最近在学Linux,终于在Linux上用Apache搭建起了Git服务器,在此记录一下. 服务器:阿里云服务器 Linux版本:CentOS 6.5 ...
- 简易搭建git仓库、关联远程和本地仓库方法。克隆仓库方法。同一台电脑上创建两个git ssh key方法。
一,在github上建仓库 react-js-antd-demo: 二:将远程仓库与本地仓库关联 git remote add origin git@github.com:begin256/react ...
- #内存不够,swap来凑# Linux上创建SWAP文件/分区
转自:https://www.vmvps.com/how-to-create-a-swap-file-on-the-linux-os.html 很久很久以前,电脑的内存是个珍贵东西,于是乎就有了swa ...
- 如何在Linux上创建,列出和删除Docker容器
本篇文章介绍的内容是关于在Linux机器上创建,列出和删除docker容器,下面我们来看具体的内容. 1.启动Docker容器 使用下面的命令启动新的Docker容器.这将启动一个新的容器,并为你提供 ...
- Ubuntu 18.04 Linux上安装Etherpad,基于Web的实时协作编辑器
介绍 Etherpad是一个开源的,基于Web的实时协作编辑器(http://www.0834nanke.com) 它允许多个人使用他们的Web浏览器同时编辑文档. 它还提供了一些很酷的功能,如富文本 ...
- Linux上创建SSH隧道
Win上有好用的Xshell,可以做SSH隧道,但是Linux没有很好用的工具,本来gSTM还可以,但是死活装不上,也很久没更新了. 但其实,Linux上直接使用ssh命令就可以创建SSH隧道,非常方 ...
- 在 Linux 上创建第一个 Service Fabric Java 应用程序
先决条件 开始之前,请安装 Service Fabric SDK.Azure CLI,并在 Linux 开发环境中设置开发群集. 如果使用 Mac OS X,则可使用 Vagrant 在虚拟机中设置 ...
随机推荐
- java环境和Tomcat环境
这些变量名是一样的,变量的值需要自己根据自己的安装位置来确定 JAVA_HOME C:\Program Files\Java\jdk1.8.0_151 CATALINA_HOME(这个可能不需要) D ...
- 【Asp.net MVC】AJAXHelper 和jQueryAjax
在ASP.NET MVC中,有一个官方提供的AJAXHelper帮助我们做AJAX相关的东西.我用传统的jQuery AJAX技术和AJAXHelper分别实现同一个demo,特此记录一下. 由于是在 ...
- Android - Telephony API 1.6
SignalStrength: 1. public int getGsmSignalStrength() : GSM Signal Strength, valid values are (0-31, ...
- Android 如何查看源码 (eclipse 按住 ctrl )
首先要确认 Android SDK Manager 下载并安装了 sources.然后在代码中按住 ctrl 在点一个类名, 如果打开的页面是找不到源码,就点那个按钮,然后找到源码所在的文件夹,就可以 ...
- 12c ocp 062新考题(之前没出现过)-1
1.One of your databases has archive logging enabled and RMAN backups are taken at regular intervals. ...
- CTF之信息泄漏
web源码泄漏 .hg源码泄漏: 漏洞成因:hg init的时候会生成.hg,http://www.xx.com/.hg/, 工具:dvcs-ripper,(rip-hg.pl -v -u http ...
- linux强制安装rpm包的命令
rpm -ivh *********.rpm --nodeps --force 强制安装会忽略掉所有依赖关系,强制进行安装
- Substrings(SPOJ8222) (sam(后缀自动机))
You are given a string \(S\) which consists of 250000 lowercase latin letters at most. We define \(F ...
- [Objective-C语言教程]多态(26)
多态性这个词表示有许多形式. 通常,当存在类的层次结构并且通过继承相关时,会发生多态性. Objective-C多态表示对成员函数的调用将导致执行不同的函数,具体取决于调用该函数的对象的类型. 考虑下 ...
- linux中python配置tab=4个空格,并显示行号。
vim ~/.vimrc 写入: set ts=4 set nu :wq 保存. source ~/.vimrc 使之生效.