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

search text in:





Poll
Which linux distribution do you use?







poll results

Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

207042

userrating:


May 25th. 2007:
Words

486

Views

257488

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

148422

userrating:


April, 26th. 2006:

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

back






Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2025 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 61.6 ms