在 Mercurial 中央存储库中推送更改会更改所有者和组
我有一个中央存储库和 3 个具有本地存储库的用户,这些用户可以将代码拉取和推送到中央存储库。
我有一个定义的用户 hg 和一个名为 hgusers 的组,所有 3 个用户都属于该组。
每次用户推送代码时,某些目录和文件的所有者和组都会从 hg 和 hgusers 分别更改为 userName 和 userGroup,这使得其他人无法推送代码。因此,我必须执行 chown 和 chgrp 才能返回到又回到最初的情况。
关于用户和组,这是理想的情况:
drwxrwxr-x 3 hg hgusers 4.0K 2010-09-23 08:06 .
drwxrwxr-x 3 hg hgusers 4.0K 2010-07-29 19:06 ..
-rw-rw-r-- 2 hg hgusers 57 2010-07-21 10:08 00changelog.i
-rw-rw-r-- 1 hg hgusers 94 2010-09-23 08:06 branchheads.cache
-rw-rw-r-- 2 hg hgusers 23 2010-07-21 10:08 requires
drwxrwxr-x 3 hg hgusers 4.0K 2010-09-23 08:06 store
-rw-rw-r-- 1 hg hgusers 7 2010-09-23 08:06 undo.branch
-rw-rw-r-- 1 hg hgusers 0 2010-09-23 08:06 undo.dirstate
这是当用户 1(组 1)推送代码时我得到的结果:
drwxrwxr-x 3 hg hgusers 4.0K 2010-09-22 16:58 .
drwxrwxr-x 3 hg hgusers 4.0K 2010-07-29 19:06 ..
-rw-rw-r-- 2 hg hgusers 57 2010-07-21 10:08 00changelog.i
-rw-rw-r-- 1 user1 group1 94 2010-09-21 16:38 branchheads.cache
-rw-rw-r-- 1 user1 group1 7 2010-09-22 16:58 journal.branch
-rw-rw-r-- 1 user1 group1 0 2010-09-22 16:58 journal.dirstate
-rw-rw-r-- 2 hg hgusers 23 2010-07-21 10:08 requires
drwxrwxr-x 3 hg hgusers 4.0K 2010-09-22 16:58 store
-rw-rw-r-- 1 user1 group1 7 2010-09-21 16:38 undo.branch
-rw-rw-r-- 1 user1 group1 0 2010-09-21 16:38 undo.dirstate
可能有一些带有 S 位的东西
。有什么建议吗?谢谢。
I have a central repository and 3 users with local repositories that pull and push code to the central one.
I have a defined user hg and a group called hgusers to which all the 3 users belong to.
Every time a user pushes code, some directories and files get their owner and group changed from hg and hgusers to userName and userGroup respectively which makes impossible to the others to push code.So, I have to do chown and chgrp to go back to the initial situation again.
Here is the desirable situation, regarding user and group:
drwxrwxr-x 3 hg hgusers 4.0K 2010-09-23 08:06 .
drwxrwxr-x 3 hg hgusers 4.0K 2010-07-29 19:06 ..
-rw-rw-r-- 2 hg hgusers 57 2010-07-21 10:08 00changelog.i
-rw-rw-r-- 1 hg hgusers 94 2010-09-23 08:06 branchheads.cache
-rw-rw-r-- 2 hg hgusers 23 2010-07-21 10:08 requires
drwxrwxr-x 3 hg hgusers 4.0K 2010-09-23 08:06 store
-rw-rw-r-- 1 hg hgusers 7 2010-09-23 08:06 undo.branch
-rw-rw-r-- 1 hg hgusers 0 2010-09-23 08:06 undo.dirstate
Here is what I get when the user1 (group1) pushes code:
drwxrwxr-x 3 hg hgusers 4.0K 2010-09-22 16:58 .
drwxrwxr-x 3 hg hgusers 4.0K 2010-07-29 19:06 ..
-rw-rw-r-- 2 hg hgusers 57 2010-07-21 10:08 00changelog.i
-rw-rw-r-- 1 user1 group1 94 2010-09-21 16:38 branchheads.cache
-rw-rw-r-- 1 user1 group1 7 2010-09-22 16:58 journal.branch
-rw-rw-r-- 1 user1 group1 0 2010-09-22 16:58 journal.dirstate
-rw-rw-r-- 2 hg hgusers 23 2010-07-21 10:08 requires
drwxrwxr-x 3 hg hgusers 4.0K 2010-09-22 16:58 store
-rw-rw-r-- 1 user1 group1 7 2010-09-21 16:38 undo.branch
-rw-rw-r-- 1 user1 group1 0 2010-09-21 16:38 undo.dirstate
There is probably something with the bit S.
Any suggestions? thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将 +S 位添加到从
.hg
及以下位置开始的每个目录。有关详细信息,请参阅 MultipleCommitters。
You need to add the +S bit to every directory starting at
.hg
and below.See MultipleCommitters for details.