svn 1.7手册

http://svnbook.red-bean.com/en/1.7/

 

Examining History

Your Subversion repository is like a time machine. It keeps a record of every change ever committed and allows you to explore this history by examining previous versions of files and directories as well as the metadata that accompanies them. With a single Subversion command, you can check out the repository (or restore an existing working copy) exactly as it was at any date or revision number in the past. However, sometimes you just want to peer into the past instead of going into it.

Several commands can provide you with historical data from the repository:

svn diff
Shows line-level details of a particular change

svn log
Shows you broad information: log messages with date and author information attached to revisions and which paths changed in each revision

svn cat
Retrieves a file as it existed in a particular revision number and displays it on your screen

svn annotate
Retrieves a human-readable file as it existed in a particular revision number, displaying its contents in a tabular form with last-changed information attributed to each line of the file.

svn list
Displays the files in a directory for any given revision

 

more…

理解SVN关键词BASE,HEAD,COMMITTED,PREV

SVN是以版本号(revision number)来记录版本库的每一次改变,一般的SVN操作不需要用到版本号,但是有些SVN操作需要指定版本号。我们可以指定一个明确的整数版本号,但是也可以使用SVN关键字来指代某个特殊的版本号,SVN会真正计算出它所指代的实际整数版本号:

HEAD:版本库中最新的版本;

BASE:某个工作副本项的版本,注意这个是你上次update该项时的版本号,可能晚于当前最新的版本号;

COMMITTED:某个工作副本项最近修改的版本,与BASE相同或更早;

PREV:COMMITTED – 1。

HEAD针对于版本库,另外3个针对于某个工作副本目录或文件。

示例:

$ svn diff -r PREV:COMMITTED foo.c
# shows the last change committed to foo.c
$ svn log -r HEAD
# shows log message for the latest repository commit
$ svn diff -r HEAD
# compares your working copy (with all of its local changes) to the latest version of that tree in the repository
$ svn diff -r BASE:HEAD foo.c
# compares the unmodified version of foo.c with the latest version of foo.c in the repository
$ svn log -r BASE:HEAD
# shows all commit logs for the current versioned directory since you last updated
$ svn update -r PREV foo.c
# rewinds the last change on foo.c, decreasing foo.c’s working revision
$ svn diff -r BASE:14 foo.c
# compares the unmodified version of foo.c with the way foo.c looked in revision 14

 

原文链接: http://www.cnblogs.com/frydsh/archive/2012/08/25/2655569.html

apt 包管理的几个基本命令

安装

查看包描述信息

查看指定包中的文件

查看指定文件属于哪个包

搜索软件包

搜索相关包

删除软件包

禁止更新(即:锁定版本)

(禁止 foo 更新)

docker error with http_proxy

问题

当存在 http_proxy 时, 如下命令会有问题:

原因:

docker 和 docker -d 之间的通信走的是http协议,而且会默认参考 http_proxy 环境变量(go程序默认如此)

解决办法:

  1. 去掉http_proxy

     
  2. 添加no_proxy环境变量

     

参考:https://github.com/tmatilai/vagrant-proxyconf/issues/109

 

grep awk 之buffer问题

问题

如下命令可以看到我们预期的输出:

如下命令不能看到预期的输出: (不是立即看到,其实,只要等等她就会来)

原因: 第一个grep命令buffer了输出

解决办法: 添加 –line-buffered 选项

 

同样, awk 也有类似问题,但是使用awk就没有添加选项这么幸运了;可以通过在awk的输出后面添加 system(“”); 来刷新buffer,如:

参考资料: http://unix.stackexchange.com/questions/33650/why-does-awk-do-full-buffering-when-reading-from-a-pipe