How to get path to repository for a global hook

Jerry Maloney gpjerrymaloney at gmail.com
Thu Apr 11 13:45:08 UTC 2013


Thanks, Martin, that was what I needed! The right syntax is:

[hooks]
changegroup.permissions = chmod -R u+rx "`pwd`"

The dot syntax may also work; I didn't test it. I used pwd just for more
clarity.

-- Jerry



On Thu, Apr 11, 2013 at 3:13 AM, Martin Geisler <martin at geisler.net> wrote:

> Jerry Maloney <gpjerrymaloney at gmail.com> writes:
>
> > I am writing a global hook to run on our SCM server that sets file
> > permissions appropriately whenever incoming changesets are applied. So
> > something like this in /etc/mercurial/hgrc:
> >
> >
> >
> > [hooks]
> >
> > changegroup.permissions = chmod -R u+x
> /path/to/the/directory/being/updated
>
> Hooks are executed with the current working directory set to the root of
> the repository. So maybe you can use '.' as the path above?
>
> --
> Martin Geisler
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20130411/b3ab0f59/attachment-0002.html>


More information about the Mercurial mailing list