【问题标题】:Can I view the RCS log with diffs?我可以查看带有差异的 RCS 日志吗?
【发布时间】:2015-04-30 14:41:07
【问题描述】:

遗憾的是,Unix.stackexchange 或 ServerFault 上没有 RCS 标签,所以我将其发布在 StackOverflow 上。

我被 SVN/Git 宠坏了,我需要查看文件的历史记录。在我的脚本中,我使用 RCS 来跟踪对系统配置文件所做的更改,因此如果我可以像使用 Git 一样查看它们,那就太好了。对于 git,我使用 git log -p 来获得这种输出。

是否有 rlogrcsdiff 的标志或任何可以让我获得有差异的日志的标志?

或者我必须使用rcsdiff 和一个shell 脚本来自己实现这个吗?

【问题讨论】:

    标签: rcs


    【解决方案1】:
        rlog filename 
    

    将向您展示基本历史。

        rcsdiff -r5.1 -r5.2 filename   
    

    查看两个版本之间的差异。不要在 -r 后面加空格。

    【讨论】:

    • 我不是在问如何做这些事情。我知道如何做这些事情,这些是基本命令。我是说我想查看rlog 日志中的差异。就像我有 10 个修订版一样,我想同时查看所有 9 个差异。
    • @StevenLu:我很确定rlog 没有这样的功能。
    【解决方案2】:

    rcshist(由 Ian Dowse 编写)按要求执行。我不知道预构建的包,但它很容易构建。

    这里是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
    

    【讨论】:

      【解决方案3】:

      读取 .v 文件。它包含完整的历史记录。

      【讨论】:

        猜你喜欢
        • 2022-01-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-03-03
        相关资源
        最近更新 更多