RCS

Revision Control System je jeden z nejstarších programů pro správu software (1982). Operuje pouze na jednom jediném souboru. Na RCS vzniklo CVS a celá kapitola softwarového inženýrství.

Všechny RCS příkazy

  • ci − check in revisions
  • co − check out revisions
  • ident − extract identification markers
  • rcs − change RCS file attributes
  • rcsclean − clean working directory
  • rcsdiff − compare revisions
  • rcsfreeze − freeze a configuration
  • rcsmerge − merge revisions
  • rlog - prints the log messages and other information in an RCS file

RCS minimum za pět minut

  • RCS operuje na JEDNOM souboru
  • "repositář" = názevsouboru.koncovka,v (v jako version)
  • všechny repositáře je možné umístit do speciálního podadresáře RCS (rcs je tam hledá nejdříve, potom hledá ve working directory)
  • nejběžnější příkazy jsou co a ci
  • RCS používá zamykání repositářů

Ukázka práce s RCS:

$ cat > test.c
int main(void) {
  return 0;
}
$ ci test.c
test.c,v  <--  test.c
enter description, terminated with single '.' or end of file:
NOTE: This is NOT the log message!
>> test file
>> .
initial revision: 1.1
done
$ ls -a
./  ../  test.c,v
$ co -l test.c
test.c,v  -->  test.c
revision 1.1 (locked)
done
$ ls -la test.c
-rw-r--r-- 1 dum8d0g users 31 Feb  8 11:30 test.c
$ ed test.c
31
0i
#include <stdio.h>

.
/main
int main(void) {
a
  printf("rcs rocks!\n");
.
w
77
q
$ ci test.c
test.c,v  <--  test.c
new revision: 1.2; previous revision: 1.1
enter log message, terminated with single '.' or end of file:
>> printf
>> .
done
$ ls -a
./  ../  test.c,v
$ rlog test.c,v 

RCS file: test.c,v
Working file: test.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;     selected revisions: 2
description:
test file
----------------------------
revision 1.2
date: 2010/02/08 10:31:53;  author: dum8d0g;  state: Exp;  lines: +3 -0
printf
----------------------------
revision 1.1
date: 2010/02/08 10:30:11;  author: dum8d0g;  state: Exp;
Initial revision
=============================================================================
$ co test.c
test.c,v  -->  test.c
revision 1.2
done
$ ls -l test.c
-r--r--r-- 1 dum8d0g users 77 Feb  8 11:32 test.c
$ rm test.c
rm: remove write-protected regular file `test.c'? y
$ co -l test.c
test.c,v  -->  test.c
revision 1.2 (locked)
done
$ ed test.c
77
0i
/* comment */
.
w
91
q
$ rcsdiff test.c
===================================================================
RCS file: test.c,v
retrieving revision 1.2
diff -r1.2 test.c
0a1
> /* comment */
$ ci test.c
test.c,v  <--  test.c
new revision: 1.3; previous revision: 1.2
enter log message, terminated with single '.' or end of file:
>> comment
>> .
done
$ ls -a
./  ../  test.c,v
$ 

Odkazy

/home/dum8d0g/www/martin.kopta.eu/trash/wiki/data/pages/software/rcs.txt · Poslední úprava: 2010/02/08 11:36 autor: martin
CC Attribution 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0