Hi,

Did you ever figure this out? I think what's generally done is just that,
they preconfigure the environment before calling post-review.

post-review is a useful tool for developers, and is written with that in
mind. It's also useful for post-commit hooks, but isn't written solely for
that. It needs an environment, and if something is calling post-review
without one, it's the job of the caller to give post-review the environment
it needs.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Mon, Feb 15, 2010 at 8:25 AM, Stodge <sto...@gmail.com> wrote:

> I know I can override the environment:
>
>        data = execute([os.path.join(POSTREVIEW_PATH, 'post-review')] +
> args,
>                                   env = {
>                                        'LANG': 'en_US.UTF-8',
>                                        'HOME': '/tmp',
>                                        })
>
> This works nicely but I don't understand why I have to do it. Is
> anyone using this particular script?
>
>
> On Feb 15, 11:03 am, Stodge <sto...@gmail.com> wrote:
> > I installed the SVN post-commit from review board's contrib directory.
> > I'm running into a problem that doesn't make sense. When the hook runs
> > I get an error;
> >
> > [Errno 13] Permission denied: '.post-review-cookies.txt'#012
> >
> > So initially it does make sense - it's trying to create the cookie
> > file in my home directory. Except, subversion hooks have a minimal
> > environment and the home directory variable isn't configured. Makes
> > sense so far.
> >
> > What doesn't make sense is that this post-commit hook is written with
> > the assumption that the environment is correctly configured, which
> > contradicts the svn hook documentation. From my understanding, this
> > script can never work as an SVN hook.
> >
> > Am I making sense?
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com<reviewboard%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

Reply via email to