[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    Re: How to get path to repository for a global hook
From:       Jerry Maloney <gpjerrymaloney () gmail ! com>
Date:       2013-04-11 13:45:08
Message-ID: CAB54qPa9-Pi6HGOM-AaQ0uB0SbVCAJ_k0OWPiZf9mufGsRYU8w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@geisler.net> wrote:

> Jerry Maloney <gpjerrymaloney@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
>

[Attachment #5 (text/html)]

<div dir="ltr"><div>Thanks, Martin, that was what I needed! The right syntax \
is:<br><br>[hooks]<br><span class="" \
style="border-collapse:separate;color:rgb(0,0,0);font-family:&#39;Lucida \
Grande&#39;,arial,sans-serif;font-size:12px;font-style:normal;font-variant:normal;font \
-weight:normal;letter-spacing:normal;line-height:20px;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">changegroup.permissions \
= chmod -R u+rx &quot;`pwd`&quot;</span><br> <br></div><div>The dot syntax may also \
work; I didn&#39;t test it. I used pwd just for more clarity.<br><br></div>-- \
Jerry<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, \
Apr 11, 2013 at 3:13 AM, Martin Geisler <span dir="ltr">&lt;<a \
href="mailto:martin@geisler.net" target="_blank">martin@geisler.net</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">Jerry Maloney &lt;<a \
href="mailto:gpjerrymaloney@gmail.com">gpjerrymaloney@gmail.com</a>&gt; writes:<br> \
<br> &gt; I am writing a global hook to run on our SCM server that sets file<br>
&gt; permissions appropriately whenever incoming changesets are applied. So<br>
&gt; something like this in /etc/mercurial/hgrc:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; [hooks]<br>
&gt;<br>
&gt; changegroup.permissions = chmod -R u+x /path/to/the/directory/being/updated<br>
<br>
Hooks are executed with the current working directory set to the root of<br>
the repository. So maybe you can use &#39;.&#39; as the path above?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Martin Geisler<br>
</font></span></blockquote></div><br></div>



_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic