views:

22

answers:

1

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.

+5  A: 

You need to add the +S bit to every directory starting at .hg and below.

See http://mercurial.selenic.com/wiki/MultipleCommitters for details.

tonfa

related questions