462: post-review: consider no shell callout on 'execute'

gcmc****@yaho***** (Google Code) (Is this you? Claim this profile.)
david
david
Sept. 21, 2008
What's the URL of the page containing the problem?

I've been working to get post-review to work in cygwin.  problems encountered:
- don't really want a shell callout on the pipe commands
- new line processing should be set more or less to universal
- quotes and spaces and $ in files still need to be maintained.


so far the best approach has been to split the command into arguments in
the Popen .

this means:

- set shell=False
- set universal_newlines=True
- split all commands in the callers of execute
  (e.g. spaces can exist in filenames so if you pre-split and send an
arglist into execute then you don't need to worry about $var or space
parsing errors from the shell callout.  this can get rid of the single
quoting around filenames that we presently have in the execute commands) 
constructs like this:

   where_info = execute(('p4', '-c', client, 'where', depot_path),...

- i got this to work on an older version of post-review on Perforce 


What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What operating system are you using? What browser?


Please provide any additional information below.
chipx86
#1 chipx86
Can you take a look at http://reviews.review-board.org/r/515/ and make sure this
(mostly) addresses this? I assume I would then be able to set shell=False and be done
with it.
  • -Priority-Medium
    +Priority-High
    +Component-Scripts
    +Milestone-Release1.0
    +OpSys-Windows
  • +chipx86
david
#2 david
Fixed in SVN r1512.
  • +Fixed
  • -chipx86
    +david