from small one page howto to huge articles all in one place
 

search text in:





Poll
Which kernel version do you use?





poll results



Last additions:
Disable Anti-Aliasing fonts

Disable Anti-Aliasing fonts

words:

186

views:

6107

userrating:

no votes yet


May 25th. 2007:
Words

491

Views

7050

why adblockers are bad


handy one-liners for sed (Unix stream editor)
Tutorial:

handy one-liners for sed (Unix stream editor)

words:

4078

views:

19774

userrating:

no votes yet


rotating apache logfiles with cronolog

rotating apache logfiles with cronolog

words:

294

views:

7427

userrating:

no votes yet


Druckversion . pdf icon
You are here: System

Using RCS



This short tutorial shows you how to use of RCS to keep track of changes in configuration files. To get RCS and its related tools, install rcs.

Note: Similarities between CVS and RCS will cause any $Header: /var/www/www.gentoo.org/raw_cvs/gentoo/xml/htdocs/news/en/gwn/20040216-newsletter.xml,v 1.1 2004/02/17 01:53:48 carlos Exp $ or $Id: 20040216-newsletter.xml,v 1.1 2004/02/17 01:53:48 carlos Exp $ tags to be rewritten when you put files under revision control.

Code Listing 1: Adding files to RCS
# cd /etc
# mkdir RCS

// Put make.conf under revision control
# ci -i make.conf
RCS/make.conf,v  <--  make.conf
enter description, terminated with single '.' or end of file:
NOTE: This is NOT the log message!
>> make.conf - custom settings for portage
>> .
initial revision: 1.1
done
   // The file is now in RCS, so put it back in /etc for reading
# co make.conf


Notice that make.conf is now under revision control and is read-only. To edit the file, you need to perform the following steps:

Code Listing 2: Editing a file under revision control
// Checkout the file with locking enabled
# co -l make.conf
RCS/make.conf,v  -->  make.conf
revision 1.1 (locked)
done

// Edit the file
# ${EDITOR} make.conf

// Check the file back in and unlock it.
# ci -u make.conf
RCS/make.conf,v  <--  make.conf
new revision: 1.2; previous revision: 1.1
enter log message, terminated with single '.' or end of file:
>> changed DISTDIR to use a drive with more space
>> .  done


This can be a tedious process so it's better to put all the commands in a script to do it automatically.

Code Listing 3: Example script for revision control
#!/bin/sh
# Script to edit files under revision control
[ [ -f "RCS/$1,v" ]] && co -l $1
${EDITOR} $1
[ [ -f "RCS/$1,v" ]] && ci -u $1

For more information on using RCS see man 1 rcsintro.

From http://www.gentoo.org/news/en/gwn/20040216-newsletter.xml


rate this article:
current rating: no votes yet
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back
comment this article
Please read "Why adblockers are bad". Ärger mit Freenet.de



to the forum.
:
:
other Ads
Stellenangebote
Stellenangebote
für Fach- und
Führungskräfte
www.nachoben.com
Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
FeedCollector
Combine various newsfeeds to one customized webpage
www.feedcollector.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004 S&P Softwaredesign
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 13.2 ms
system status display