在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 在虚拟机中设置 ...
随机推荐
- Asp.NetCore Razor 模式 Web 应用
Razor 页面是 ASP.NET Core MVC 的一个新功能,它可以使基于页面的编码方式更简单高效. Razor 页面是 ASP.NET Core 2.0 中的一个新选择,它是基于页面的编程模型 ...
- Android-工作总结-LX-2018-08-20-setHint
问题的因素: 调试了一下午,我一直是以为是数据没有传递过来,然后一直在数据获取环节检查在检查,数据跟踪在跟踪,最后发现数据获取是OK
- The Scope Chain
JavaScript is a lexically scoped language: the scope of variable can be thought of as the set of sou ...
- Java Web系列:JAAS认证和授权基础
1.认证和授权概述 (1)认证:对用户的身份进行验证. .NET基于的RBS(参考1)的认证和授权相关的核心是2个接口System.Security.Principal.IPrincipal和Syst ...
- kv数据库对比总结
集群型: hbase Cassandra scylladb redis类: redis + twemproxy codis 持久型: pika ssdb
- ASP.NET IIS 支持PUT、DELETE请求
IIS 本身不支持PUT.DELETE请求,但可以通过一下方法修改进而达到目的 删除IIS安装的WebDav模块,选择你的项目,右边有个“模块”,双击它:找到WebDavModule,删除它(不推荐, ...
- 会HTML/CSS就可以轻松创建网站
网站其本质就是HTML + CSS 外加一些JavaScript构成的.所以基本上只要你会一些前端,就可以开始花样搭网站了. 如果只用HTML/CSS那做出来的网站只能叫静态网站,性能好但维护不方便, ...
- 【Dnc.Api.Throttle】适用于.Net Core WebApi接口限流框架
Dnc.Api.Throttle 适用于Dot Net Core的WebApi接口限流框架 使用Dnc.Api.Throttle可以使您轻松实现WebApi接口的限流管理.Dnc.Api.Thr ...
- sql server中的 trimtrailingblanks
使用sp_help 查出 发现有个这个属性, 如何修改呢? SET ANSI_PADDING ONAlter Table Sys_users_History Alter column PveSit ...
- KindEditor的使用
KindEditor 是一套开源的在线HTML编辑器,主要用于让用户在网站上获得所见即所得编辑效果,开发人员可以用 KindEditor 把传统的多行文本输入框(textarea)替换为可视化的富文本 ...