Q1: So is there a way to restructure this and retain the history?
就像你在你的评论中写道,如果你有SYS PRIVS就可以在仓库,并保持低于A和B的所有文件的历史,但这样做mv
模块,你失去了的历史,/A曾经是Module1/A和/ B曾经在Module1/B中(更不用说构建脚本可能会破坏)。 Subversion
通过提供记录模块的移动/重命名历史的move
(或重命名)命令为您解决此问题。
Q2: Is there a way to set up security so that certain users can check out Module1/A only and not Module1/B ? and vice-versa?
有肯定的是,使用组权限。在该页面中, http://www.linux.ie/articles/tutorials/managingaccesswithcvs.php 这里我指的是在情况下,剪断该页面永远消失
每一个模块中的组
我们已经看到早期如何创建帮 cvsusers组与 协调开发人员的工作。我们可以扩展这个 的方法来允许目录级别 签入限制。
在我们的例子,让我们说, 模块“cujo”是为R/W杰克 和约翰,以及模块“嘉莉”是 R/W为John和Jill。我们将创建 两组,g_cujo和g_carrie,并 添加相应的用户每个 - 在 /etc/group中,我们添加
g_cujo:x:3200:john,jack
g_carrie:x:3201:john,jill>
现在在库(根),运行
find $CVSROOT/cujo -exec chgrp g_cujo {} \;
find $CVSROOT/carrie -exec chgrp g_carrie {} \;
保证,和以前一样,所有的 目录有GID位设置。
现在,如果我们在 仓库一看...
[email protected]:~/cvs$ ls -l
total 16
drwxrwsr-x 3 john cvsadmin 4096 Dec 28 19:42 CVSROOT
drwxrwsr-x 2 john g_carrie 4096 Dec 28 19:35 carrie
drwxrwsr-x 2 john g_cujo 4096 Dec 28 19:40 cujo
,如果杰克试图提交修改 嘉莉...
[email protected]:~/carrie$ cvs update
cvs server: Updating .
M test
[email protected]:~/carrie$ cvs commit -m "test"
cvs commit: Examining .
Checking in test;
/home/john/cvs/carrie/test,v <-- test
new revision: 1.2; previous revision: 1.1
cvs [server aborted]: could not open lock file
`/home/john/cvs/carrie/,test,': Permission denied
[email protected]:~/carrie$
但在cujo,没有问题。
[email protected]:~/cujo$ cvs update
cvs server: Updating .
M test
[email protected]:~/cujo$ cvs commit -m "Updating test"
cvs commit: Examining .
Checking in test;
/home/john/cvs/cujo/test,v <-- test
new revision: 1.2; previous revision: 1.1
done
[email protected]:~/cujo$
添加用户的过程是现在 更复杂一点,它 可能。要创建一个新的CVS用户,我们 必须创建一个系统用户,将他们 添加到他们可能写入的 模块对应的组,并且(如果 您使用的是pserver方法) 为他们生成密码,并将 添加到CVSROOT/passwd的条目中。
要添加一个项目,我们需要创建一个 组,进口来源,更改所有文件的 集团在 库,并确保在执行位GID 设定的设置对所有 目录内该模块,并将相关用户添加到组中。
毫无疑问,我们需要更多的 来完成所有这些操作,比当我们用尖刺 刺戳人时更需要。在这种方法中,我们从来没有 添加系统用户或组或 更改目录上的组 - 所有 这是照顾一旦我们设置 存储库。这意味着一个不带动力的用户可以成为CVS管理员,而不需要 机器上的根证书。
好的。所以,在我看来,如果我有文件系统权限,我可以只对CVS服务器,转到cvs root并重新构建目录。在cvsroot下移动的目录将作为新模块检出。有没有人看到任何问题? – 2011-06-07 21:21:58