rcs

Can I view the RCS log with diffs?


Sadly, there is no RCS tag on Unix.stackexchange or ServerFault, so I am posting this on StackOverflow.

I'm spoiled by SVN/Git, and I need to see the history of a file. With my scripts I am using RCS to track changes made to system configuration files, so it would be neat if I could view them like I do with Git. for git I use git log -p to get this kind of output.

Is there a flag for rlog or rcsdiff or anything that lets me get a log that has the diffs?

Or must I use rcsdiff and a shell script to implement this myself?


Solution

  • rcshist (written by Ian Dowse) does what was requested. I do not know of prebuilt packages, but it builds easily.

    Here is sample output:

    REV:1.346               aclocal.m4          2012/09/03 17:21:43       tom
    tags:            xterm-281s, xterm-281r, xterm-281q, xterm-281p, xterm-281o,
                     xterm-281n, xterm-281m, xterm-281l, xterm-281k, xterm-281j,
                     xterm-281i, xterm-281h, xterm-281g, xterm-281f, xterm-281e
    
       change default for --with-xpm
    
    --- aclocal.m4  2012/08/25 23:05:32     1.345
    +++ aclocal.m4  2012/09/03 17:21:43     1.346
    @@ -1,4 +1,4 @@
    -dnl $XTermId: rcshist.html,v 1.16 2015/03/01 20:34:33 tom Exp $
    +dnl $XTermId: rcshist.html,v 1.16 2015/03/01 20:34:33 tom Exp $
     dnl
     dnl ---------------------------------------------------------------------------
     dnl
    @@ -3554,7 +3554,7 @@
     AC_SUBST(no_pixmapdir)
     ])dnl
     dnl ---------------------------------------------------------------------------
    -dnl CF_WITH_XPM version: 1 updated: 2012/07/22 09:18:02
    +dnl CF_WITH_XPM version: 2 updated: 2012/09/03 05:42:04
     dnl -----------
     dnl Test for Xpm library, update compiler/loader flags if it is wanted and
     dnl found.
    @@ -3571,7 +3571,7 @@
     AC_ARG_WITH(xpm,
     [  --with-xpm=DIR          use Xpm library for colored icon, may specify path],
            [cf_Xpm_library="$withval"],
    -       [cf_Xpm_library=no])
    +       [cf_Xpm_library=yes])
     AC_MSG_RESULT($cf_Xpm_library)
    
     if test "$cf_Xpm_library" != no ; then