代码之家  ›  专栏  ›  技术社区  ›  Elias Zamaria

cvs:显示本地更改的文件

cvs
  •  43
  • Elias Zamaria  · 技术社区  · 16 年前

    是否有任何简单的方法只显示我的存储库中本地添加、删除或修改的文件?我知道我可以输入“cvs stat”并查看文件列表,但这很冗长且容易出错。我想知道有没有更简单的方法。我使用的是cvs 1.11.17,以备不时之需。

    8 回复  |  直到 9 年前
        1
  •  77
  •   dokaspar    14 年前

    “dummy”更新将提供此信息。

    cvs -qn update
    

    所用选项的简短描述:

    -q      Cause CVS to be somewhat quiet.
    -n      Do not execute anything that will change the disk.
    
        2
  •  20
  •   martin clayton egrunin    16 年前

    您可以使用cvs获得差异的简短列表 diff 命令:

    cvs -q diff --brief
    
        3
  •  4
  •   Ryan Joy    16 年前

    输送到 grep !

    cvs -Q status | grep -i locally
    
        4
  •  2
  •   cppRohit    12 年前

    我用的是:

    cvs -Q status | grep -A 4 Locally | egrep -v '^\-\-|^   Working|^   Commit|^$' | awk '{print $2 " " $4}' | sed -e 's/\<Locally\>//;s/revision: \CVS-REPOSITORY-PATH/\t\t/'
    

    输出:

    pin_stages.ref 
                tests/unit/ccsn/pin_stages/pin_stages.ref,v
    pin_stages_func.ref 
                tests/unit/ccsn/pin_stages_func/pin_stages_func.ref,v
    
        5
  •  0
  •   vtrz    16 年前

    以下是nmake perl脚本列表修改文件,基于上述cvs update-qn:

    DIRS=\
      c:\project1\
      c:\project2
    
    all: $(DIRS)
      !cd $? & cvs -qn update | perl -ne "s!\/!\\!g;print '$?\\'.qq($$1) if /^M (.*)/s;"
    
        6
  •  0
  •   Marijn    14 年前

    做CVS更新 以m开头的文件是修改过的文件。

    例子:

    CVS Update
    cvsntsrv server: Updating dat/idv
    M dat/idv/conduct.idv  = Modified
    ...
    
        7
  •  0
  •   Knight of Ni    13 年前

    作为一般提及的替代方案 cvs update -qn ,你可以去 cvs release 命令。但是这个是交互式的,在输出结束时请求确认(所以您只需要中止它!).正常输出:

    > cvs release .
    ...
    U some/updated/file
    M some/modified/file
    ...
    You have [1] altered files in this repository.
    Are you sure you want to release directory `.': n
    ** `release' aborted by user choice.
    >
    

    问题后 Are you sure you want to release directory '.': 你放的东西不同于 y 或 Y .

        8
  •  0
  •   Ram    9 年前

    可以使用以下命令获取本地修改的文件列表

    cvs-qn更新grep“m”awk'打印$2

    推荐文章