CVSROOT不被cvs读取

时间:2014-11-20 11:14:56

标签: bash version-control cvs

我们在远程计算机上有一个CVS服务器,我在.bashrc中有一行:

export CVSROOT=:pserver:myuser@theserver:/home/cvs

Bash确认已设置:

$ echo $CVSROOT
:pserver:myuser@theserver:/home/cvs

我还有一个我用于其他东西的本地CVS回购

/home/myuser/repo-cvs

我将访问哪些(因此要覆盖$ CVSROOT中的默认值):

cvs -d /home/myuser/repo-cvs co projA

当我在没有-d的情况下执行任何cvs命令时,我希望它使用$ CVSROOT中的一个定义,但我得到这样的东西:

$ cvs login
cvs login: can only use `login' command with the 'pserver' method
cvs [login aborted]: CVSROOT: /home/myuser/repo-cvs

$ cvs co tools
cvs checkout: cannot find module `tools' - ignored

但这有效(工具在pserver上而非本地):

$ cvs -d $CVSROOT tools
cvs checkout: Updating tools/
...

所以它显然忽略了env var $ CVSROOT

我删除了〜/ .cvspass,因为它引用了两者,我找不到任何其他可以缓存/存储此类信息的位置。

有什么想法吗?

附加说明

我没有在bashrc或.cvsrc中将任何覆盖设置为别名

$ cvs -v
Concurrent Versions System (CVS) 1.12.13-MirDebian-11 (client/server)

2 个答案:

答案 0 :(得分:2)

我做了两个假设:

  1. 我假设你没有指定-d,接下来会根据CVS手册页使用$ CVSROOT:

    -d cvs_root_directory
    Use cvs_root_directory as the root directory pathname of the repository. Overrides the setting of the $CVSROOT environment variable.

  2. 我运行cvs命令的目录是

    ~/tmp ~/dev/projects

  3. 我不期望CVS /当地目的地的两个地方;我希望他们是这样的:

    ~/dev/projects/myProjA/CVS
    

    我猜我是否花时间在手册中找到了解释cvs命令在查看$ CVSROOT之前查看本地修订信息dir CVS /的内容

答案 1 :(得分:0)

如果您正在检查我们的目录,那么在检查该目录时将使用cvsroot,即使CVSROOT显示不同的目录。