From 8388d68190bb6193157788466de8782fd607488e Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Sat, 10 Oct 2009 03:34:57 -0700 Subject: Re-introduce a fix for binary files and versioning for Perforce. The fix for bug #585 broke the binary file support. This change brings it back. This also fixes the Perforce server versioning check. Patch by Eric Huss Reviewed at http://reviews.review-board.org/r/1154/ --- rbtools/postreview.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rbtools/postreview.py b/rbtools/postreview.py index 76c6be5..8be963a 100755 --- a/rbtools/postreview.py +++ b/rbtools/postreview.py @@ -1530,7 +1530,7 @@ class PerforceClient(SCMClient): else: v = self.p4d_version - if v[1] < 2002 or (v[1] == "2002" and v[2] < 2): + if v[0] < 2002 or (v[0] == "2002" and v[1] < 2): description = execute(["p4", "describe", "-s", changenum], split_lines=True) @@ -1708,8 +1708,9 @@ class PerforceClient(SCMClient): # and the code below expects the output to start with # "Binary files " if len(dl) == 1 and \ - dl[0] == ('Files %s and %s differ'% (old_file, new_file)): - dl = ['Binary files %s and %s differ'% (old_file, new_file)] + dl[0].startswith('Files %s and %s differ' % + (old_file, new_file)): + dl = ['Binary files %s and %s differ\n' % (old_file, new_file)] if dl == [] or dl[0].startswith("Binary files "): if dl == []: -- cgit v1.2.3