My favorites | Sign in
Project Home Wiki Issues
New issue   Search
for
  Advanced search   Search tips
Issue 840: post-review can't diff correctly Perforce paths with spaces?
3 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  chip...@gmail.com
Closed:  May 2009


Sign in to add a comment
 
Reported by btseb...@gmail.com, Feb 2, 2009
*NOTE: Do not post confidential information in this bug report.*

What's the URL of the page containing the problem? N/A


What steps will reproduce the problem?
1. Have Perforce
2. In your perforce system, have a path like //depot/dev/proj1/path with
spaces/file.cpp
3. Edit the file and setup to post-review the change list
4. Review board interprets it as a change of "deleted content"

What is the expected output? What do you see instead?
- I would have expected it to properly do the diffs and handle the path
with spaces.
- 
When doing post-review -d, the problem looks to be that the path agurment
to the diff command is not-escaped or complete

so i've seen something like

diff -urNp /cygdrive/c/TEMP/tmpatI2gl //btse-ws2//dev/proj1/path


- just 'path' instead of 'path with space/file.cpp'

What operating system are you using? What browser?

Windows XP, Firefox 3.0.1


Please provide any additional information below.

Is there some patch in the python script to properly escape these depot paths?
Comment 1 by btseb...@gmail.com, Feb 3, 2009
Ahh. After looking at the post-review script I see the comments in function:
_depot_to_local()

        # XXX: This breaks on filenames with spaces.
        return last_line.split(' ')[2]
Rats.
Comment 2 by project member trowb...@gmail.com, Feb 9, 2009
(No comment was entered for this change.)
Status: Confirmed
Labels: Component-Scripts
Comment 3 by devli...@buzzardsoft.com, Apr 4, 2009
I'm attaching a patch that I believe fixes the "spaces in paths" problem with Perforce.  At a high level, it passes 
the "-ztag" flag to the "p4 where" command to split the Perforce and local paths onto separate lines.

This has only been tested briefly on Mac OS X (and I'm not a Python expert) so YMMV, especially on other 
platforms. 
post-review.patch
1.4 KB   View   Download
Comment 4 by sharan...@gmail.com, May 14, 2009
I was facing the same issue with Perforce on windows a couple of days back. I applied
the patch and it worked nicely.
Comment 5 by project member chip...@gmail.com, May 28, 2009
Committed as r1990.
Status: Fixed
Owner: chipx86
Labels: -Priority-Medium -Component-Scripts Priority-High Component-RBTools Milestone-Release1.0
Sign in to add a comment

Powered by Google Project Hosting