Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Posix call (execve) breaks mercurial?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Wayne Werner  
View profile  
 More options Oct 11 2012, 7:10 pm
Newsgroups: comp.lang.python
From: Wayne Werner <wa...@waynewerner.com>
Date: Thu, 11 Oct 2012 18:10:12 -0500 (CDT)
Local: Thurs, Oct 11 2012 7:10 pm
Subject: Posix call (execve) breaks mercurial?
So... this is certainly the deepest I've got to dig into any source code.

I'm experimenting with Review Board for code reviews, and trying to get it
set up/working here at work. When using post-review, however, I started
getting issues with untrusted users - even though they were set to trusted
in my ~/.hgrc and things worked fine otherwise.

So here's where things got weird. I could call
`subprocess.check_output(['hg', 'root'])`, and things worked just fine.
But when I added the env parameter, I got the untrusted issues. So if I
did:

import os, subprocess

# Works just fine
subprocess.check_output(['hg', 'root'])

# Gives untrusted issues
subprocess.check_output(['hg', 'root'], env=os.environ)

Long story short, I dug around the source code and ended up at the POSIX
execve function. I've been reading the manpages, but nothing seems to pop
out at me as "hey, this should/shouldn't work!".

Does anyone know what's going on here, or where I should go for more help?

Thanks,
Wayne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wayne Werner  
View profile  
 More options Oct 11 2012, 7:34 pm
Newsgroups: comp.lang.python
From: Wayne Werner <wa...@waynewerner.com>
Date: Thu, 11 Oct 2012 18:33:49 -0500 (CDT)
Local: Thurs, Oct 11 2012 7:33 pm
Subject: Re: Posix call (execve) breaks mercurial?

On Thu, 11 Oct 2012, Wayne Werner wrote:
> So here's where things got weird. I could call
> `subprocess.check_output(['hg', 'root'])`, and things worked just fine. But
> when I added the env parameter, I got the untrusted issues. So if I did:

> import os, subprocess

> # Works just fine
> subprocess.check_output(['hg', 'root'])

> # Gives untrusted issues
> subprocess.check_output(['hg', 'root'], env=os.environ)

So... curiouser and curiouser - it looks like it's not *actually* execve's
fault after all. I just compiled the code from the man page, tweaked it to
run 'hg root', and passed it a new environment. No problems. Well, then I
manually called the posix one from Python and thing worked fine. *Then* I
actually tried the above code, and *it* worked fine.

However I *still* get problems with the post-review code. So it looks like
when I get back to work on Monday I'll be looking to see  what the
difference in environment is there.

-Wayne


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Antoine Pitrou  
View profile  
 More options Oct 12 2012, 9:31 am
Newsgroups: comp.lang.python
From: Antoine Pitrou <solip...@pitrou.net>
Date: Fri, 12 Oct 2012 13:31:22 +0000 (UTC)
Local: Fri, Oct 12 2012 9:31 am
Subject: Re: Posix call (execve) breaks mercurial?

Hello,

Wayne Werner <wayne <at> waynewerner.com> writes:

> So... curiouser and curiouser - it looks like it's not *actually* execve's
> fault after all. I just compiled the code from the man page, tweaked it to
> run 'hg root', and passed it a new environment. No problems. Well, then I
> manually called the posix one from Python and thing worked fine. *Then* I
> actually tried the above code, and *it* worked fine.

> However I *still* get problems with the post-review code. So it looks like
> when I get back to work on Monday I'll be looking to see  what the
> difference in environment is there.

Your problem is a user question for the Mercurial mailing-list, not a Python
problem. See http://selenic.com/mailman/listinfo/mercurial

Regards

Antoine.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »