[PATCH] tests: Set the group of the test directory of test-inherit-mode to one of the user's groups
Matt Mackall
mpm at selenic.com
Thu Mar 1 17:53:10 CST 2012
On Thu, 2012-03-01 at 23:39 +0000, Javi Merino wrote:
> # HG changeset patch
> # User Javi Merino <cibervicho at gmail.com>
> # Date 1330644592 0
> # Node ID 92ce7b21428515eb0b1489e7ba37cfaf152ff54b
> # Parent 0196c437ca9fc26d872b21286bee6959f1cd73e6
> tests: Set the group of the test directory of test-inherit-mode to one of the user's groups
>
> Some $TMPDIRs
Can you be more specific?
> create folders owned by a group which the user doesn't
> belong to. test-inherit-mode then fails when chmod tries to set the
> setgid bit because the user doesn't have permission to do so. This
> patch sets the group of the parent directory to one of the users'
> groups, so that the test can modify the setgid group of any of the
> directories created inside it afterwards.
> Forwarded: no
???
>
> diff --git a/tests/test-inherit-mode.t b/tests/test-inherit-mode.t
> --- a/tests/test-inherit-mode.t
> +++ b/tests/test-inherit-mode.t
> @@ -8,6 +8,7 @@ test that new files created in .hg inher
> just in case somebody has a strange $TMPDIR
>
> $ chmod g-s dir
> + $ chgrp $(groups | awk '{print $1}') dir
I'd be surprised if this was portable.
> $ cd dir
>
> $ cat >printmodes.py <<EOF
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list