Skip to content

Commit

Permalink
Informative error message on not being able to locate GNU diff for Pe…
Browse files Browse the repository at this point in the history
…rforce

Currently, if GNU diff is not in the path, post-review gives an unhandled
exception and a call stack. It scares the user, and left him without any clue
what is wrong. I found this is solved in case of SVN so I ported that solution
to Perforce too.

Fixes bug 2352
Reviewed at http://reviews.reviewboard.org/r/2685/
  • Loading branch information
fallergyula authored and davidt committed Jan 22, 2012
1 parent a2ba0e7 commit b6130ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rbtools/postreview.py
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,10 @@ def get_repository_info(self):
data, re.M)
self.p4d_version = int(m.group(1)), int(m.group(2))

# Now that we know it's Perforce, make sure we have GNU diff installed,
# and error out if we don't.
check_gnu_diff()

return RepositoryInfo(path=repository_path, supports_changesets=True)

def scan_for_server(self, repository_info):
Expand Down

0 comments on commit b6130ec

Please sign in to comment.