178.10. cvs log

let me create a file, and then modify the file to make several version

$ touch file
$ echo helloworld > file
$ cvs add file
cvs add: scheduling file `file' for addition
cvs add: use `cvs commit' to add this file permanently
$ cvs commit -m 'add file to cvs' file
/home/cvsroot/project_name/file,v  <--  file
initial revision: 1.1
$ echo I am Neo > file
$ cvs commit -m 'add file to cvs' file
/home/cvsroot/project_name/file,v  <--  file
new revision: 1.2; previous revision: 1.1
$ echo my nickname is netkiller > file
$ cvs commit -m 'modified file' file
/home/cvsroot/project_name/file,v  <--  file
new revision: 1.3; previous revision: 1.2
$ echo I am 28 years old > file
$ cvs commit -m 'modified file' file
/home/cvsroot/project_name/file,v  <--  file
new revision: 1.4; previous revision: 1.3

show log message

$ cvs log file

RCS file: /home/cvsroot/project_name/file,v
Working file: file
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;   selected revisions: 4
description:
----------------------------
revision 1.4
date: 2008-11-24 15:42:49 +0800;  author: neo;  state: Exp;  lines: +1 -1;  commitid: V0iuptfP43iETPrt;
modified file
----------------------------
revision 1.3
date: 2008-11-24 15:42:20 +0800;  author: neo;  state: Exp;  lines: +1 -1;  commitid: YWfYHFSV10duTPrt;
modified file
----------------------------
revision 1.2
date: 2008-11-24 15:41:47 +0800;  author: neo;  state: Exp;  lines: +1 -1;  commitid: 4iRs5fm1g9diTPrt;
add file to cvs
----------------------------
revision 1.1
date: 2008-11-24 15:41:28 +0800;  author: neo;  state: Exp;  commitid: zCWkxnWxLZHbTPrt;
add file to cvs
=============================================================================

cvs log -r1.2 file

$ cvs log -r1.2 file

RCS file: /home/cvsroot/project_name/file,v
Working file: file
head: 2.1
branch:
locks: strict
access list:
symbolic names:
        release_1_0_patch: 1.4.0.2
        release_1_0: 1.4
keyword substitution: kv
total revisions: 5;     selected revisions: 1
description:
----------------------------
revision 1.2
date: 2008-11-24 15:41:47 +0800;  author: neo;  state: Exp;  lines: +1 -1;  commitid: 4iRs5fm1g9diTPrt;
add file to cvs
=============================================================================
		

原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

时间: 2024-10-12 21:18:03

178.10. cvs log的相关文章

第 178 章 cvs - Concurrent Versions System

178.1. installation 过程 178.1. install cvs install $ sudo apt-get install xinetd $ sudo apt-get install cvs show the cvs version $ cvs -v Concurrent Versions System (CVS) 1.12.13 (client/server) create cvs group and cvsroot user $ sudo groupadd cvs $

178.2. cvs login | logout

neo@netkiller:~/workspace/cvs$ cvs login Logging in to :pserver:neo@localhost:2401/home/cvsroot CVS password: logout $ cvs logout Logging out of :pserver:neo@localhost:2401/home/cvsroot Please enable JavaScript to view the <a href="https://disqus.

178.7. cvs status

$ cvs status dir1/file1 cvs status: use `cvs add' to create an entry for `dir1/file1' =================================================================== File: file1             Status: Unknown    Working revision:  No entry for file1    Repository r

178.3. cvs import

cvs import -m "write some comments here" project_name vendor_tag release_tag $ cvs import -m "write some comments here" project_name vendor_tag release_tag 原文出处:Netkiller 系列 手札 本文作者:陈景峯 转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明.

178.9. cvs remove

  $ rm -rf new_file $ cvs remove new_file cvs remove: scheduling `new_file' for removal cvs remove: use `cvs commit' to remove this file permanently $ cvs commit -m "delete file" new_file /home/cvsroot/project_name/new_file,v  <--  new_file n

178.11. cvs annotate

$ cvs annotate file Annotations for file *************** 2.2          (nchen    26-Nov-08): I am Neo 2.2          (nchen    26-Nov-08): My nickname netkiller 2.3          (nchen    26-Nov-08): I'm from shenzhen 1.4          (neo      24-Nov-08): I am

178.15. cvs export

cvs export -r release_1_0 project_name $ cvs export -r release_1_0 project_name cvs export: Updating project_name U project_name/file cvs export: Updating project_name/dir1 U project_name/dir1/file1 cvs export: Updating project_name/dir2 U project_na

178.4. cvs checkout

$ cvs checkout project_name cvs checkout: Updating project_name checkout before cvs checkout -r release_1_0 project_name $ cvs checkout -r release_1_0 project_name cvs checkout: Updating project_name U project_name/file cvs checkout: Updating project

178.12. cvs diff

neo@netkiller:~/workspace/cvs/project_name$ cvs diff -r1.3 -r1.4 file Index: file =================================================================== RCS file: /home/cvsroot/project_name/file,v retrieving revision 1.3 retrieving revision 1.4 diff -r1