731: post-review broken

eric****@gmai***** (Google Code) (Is this you? Claim this profile.)
Nov. 25, 2008
When posting a review with the latest version of post-review (r1555), I get
an error:

Unable to parse diff header: : No such file or directory

I am using p4 on FreeBSD.  I tracked the problem down to changes in the
execute() and _depot_to_local() functions.  It now includes a newline at
the end which causes problems.  In detail:

_depot_to_local returns '/path/to/file\n'.  Notice the newline at the end.
 Before, _depot_to_local used to call .splitlines() on the output of
execute(), but it has been changed to say split_lines=True which causes
slightly different behavior (because execute uses readlines to "split" them).

Then, diff_cmd becomes:

['diff', '-urNp', '/tmp/tmpw-ajEg', '/path/to/file\n']

When trying to execute this command, it thinks the filename has a newline
in it which causes it to fail (on my system, at least).

Issue #726 might be the same or similar problem.
chipx86
#1 chipx86
Yeah, this looks to be bug 726.
  • +Duplicate