| OLD | NEW |
| 1 # Copyright (c) 2010 Google Inc. All rights reserved. | 1 # Copyright (c) 2010 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 self._exit(error.exit_code or 2) | 79 self._exit(error.exit_code or 2) |
| 80 except OSError: | 80 except OSError: |
| 81 _log.warning('PrettyPatch unavailable.') | 81 _log.warning('PrettyPatch unavailable.') |
| 82 | 82 |
| 83 def _diff(self, options): | 83 def _diff(self, options): |
| 84 changed_files = self._tool.git().changed_files(options.git_commit) | 84 changed_files = self._tool.git().changed_files(options.git_commit) |
| 85 return self._tool.git().create_patch(options.git_commit, | 85 return self._tool.git().create_patch(options.git_commit, |
| 86 changed_files=changed_files) | 86 changed_files=changed_files) |
| 87 | 87 |
| 88 def _open_pretty_diff(self, file_path): | 88 def _open_pretty_diff(self, file_path): |
| 89 if self._tool.platform.is_cygwin(): | |
| 90 assert file_path.endswith('.html') | |
| 91 self._tool.executive.run_command(['cygstart', file_path]) | |
| 92 return | |
| 93 url = 'file://%s' % urllib.quote(file_path) | 89 url = 'file://%s' % urllib.quote(file_path) |
| 94 self._tool.user.open_url(url) | 90 self._tool.user.open_url(url) |
| OLD | NEW |