O'Reilly logo

Linux Server Hacks by Rob Flickenger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #25. Tracking Changes with rcs2log

See at a glance who's been editing your files, and why

RCS really shows its strength when more than one person needs to edit a particular file. Having multiple admins can sometimes lead to a blame game when things aren't working properly. In these cases, it's obvious that somebody changed something, but nobody will admit to it. If you keep track of changes in RCS, then it's simple to tell who's been changing what:

root@www:/usr/local/apache/htdocs# rcs2log index.html
2002-08-14 rob <rob@mouse>

* index.html: meeting announcement

2002-07-30 rob <rob@mouse>

* index.html: gre.tunnel announcement

2002-07-12 sderle <sderle@mouse>

* index.html: added Marin and shuffled around a bit.

2002-07-10 rob <rob@mouse>

* index.html: meeting announcement + v0.81

2002-07-01 jim <jim@mouse>

* index.html: *** empty log message ***

2002-06-20 rob <rob@mouse>

* index.html: meeting reminder

Hmm, what's that empty log message doing there? It might be worth talking to Jim (and possibly doing an rcsdiff between it and the previous revision). But how can you tell which versions correspond to which log entries? Try the -v switch on rcs2log:

root@www:/usr/local/apache/htdocs# rcs2log -v index.html 2002-08-14 rob <rob@mouse> * index.html 1.54: meeting announcement 2002-07-30 rob <rob@mouse> * index.html 1.53: gre.tunnel announcement 2002-07-12 sderle <sderle@mouse> * index.html 1.52: added Marin and shuffled around a bit. 2002-07-10 rob <rob@mouse> * index.html 1.51: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required