cvs short tour2009年02月07日 02時10分32秒


% cd /tmp
% mkdir work
% cd work
% echo "A B C" > a.txt
% echo "1 2 3" > 1.txt
% cvs -d /tmp/cvsrepos init
% cvs -d /tmp/cvsrepos import -m 'Importing /tmp/work into /tmp/cvsrepos.' work 
work work_0
N work/a.txt
N work/1.txt

No conflicts created by this import

% cd /tmp
% cvs -d /tmp/cvsrepos co -d work cvswork
U cvswork/1.txt
U cvswork/a.txt
% cd cvswork
% cvs stat a.txt 
===================================================================
File: a.txt             Status: Up-to-date

   Working revision:    1.1.1.1 Sat Feb  7 01:17:45 2009
   Repository revision: 1.1.1.1 /tmp/cvsrepos/work/a.txt,v
   Sticky Tag:          (none)
   Sticky Date:         (none)
   Sticky Options:      (none)

   Existing Tags:
        work_0                          (revision: 1.1.1.1)
        work                            (branch: 1.1.1)

% echo "10 11 12" >> 1.txt
% cvs stat
M 1.txt
% cvs diff
Index: 1.txt
===================================================================
RCS file: /tmp/cvsrepos/work/1.txt,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 1.txt
--- 1.txt       7 Feb 2009 01:17:45 -0000       1.1.1.1
+++ 1.txt       7 Feb 2009 01:20:23 -0000
@@ -1 +1,2 @@
 1 2 3
+10 11 12
% cvs ci -m 'Added 2 digits numbers.'
Checking in 1.txt;
/tmp/cvsrepos/work/1.txt,v  <--  1.txt
new revision: 1.2; previous revision: 1.1
done
% mv a.txt A.txt
% cvs add A.txt
cvs add: use 'cvs commit' to add this file permanently
% cvs rm a.txt
cvs remove: use 'cvs commit' to remove this file permanently
% cvs ci -m 'Uppercase.'
RCS file: /tmp/cvsrepos/work/A.txt,v
done
Checking in A.txt;
/tmp/cvsrepos/work/A.txt,v  <--  A.txt
initial revision: 1.1
done
Removing a.txt;
/tmp/cvsrepos/work/a.txt,v  <--  a.txt
new revision: delete; previous revision: 1.1.1.1
done
% ls -a
.       ..      1.txt   A.txt   CVS
% cvs log
RCS file: /tmp/cvsrepos/work/1.txt,v
Working file: 1.txt
head: 1.2
branch:
locks: strict
access list:
symbolic names:
        work_0: 1.1.1.1
        work: 1.1.1
keyword substitution: kv
total revisions: 3;     selected revisions: 3
description:
----------------------------
revision 1.2
date: 2009/02/07 01:21:23;  author: uyota;  state: Exp;  lines: +1 -0
Added 2 digits numbers.
----------------------------
revision 1.1
date: 2009/02/07 01:17:45;  author: uyota;  state: Exp;
branches:  1.1.1;
Initial revision
----------------------------
revision 1.1.1.1
date: 2009/02/07 01:17:45;  author: uyota;  state: Exp;  lines: +0 -0
Importing /tmp/work into /tmp/cvsrepos.
=============================================================================

RCS file: /tmp/cvsrepos/work/A.txt,v
Working file: A.txt
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;     selected revisions: 1
description:
----------------------------
revision 1.1
date: 2009/02/07 01:22:21;  author: uyota;  state: Exp;
Uppercase.
=============================================================================

RCS file: /tmp/cvsrepos/work/Attic/a.txt,v
Working file: a.txt
head: 1.2
branch:
locks: strict
access list:
symbolic names:
        work_0: 1.1.1.1
        work: 1.1.1
keyword substitution: kv
total revisions: 3;     selected revisions: 3
description:
----------------------------
revision 1.2
date: 2009/02/07 01:22:21;  author: uyota;  state: dead;  lines: +0 -0
Uppercase.
----------------------------
revision 1.1
date: 2009/02/07 01:17:45;  author: uyota;  state: Exp;
branches:  1.1.1;
Initial revision
----------------------------
revision 1.1.1.1
date: 2009/02/07 01:17:45;  author: uyota;  state: Exp;  lines: +0 -0
Importing /tmp/work into /tmp/cvsrepos.
=============================================================================

旅程cvsMercurial/hggitSubversion/svnrcssvk