| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Unit tests for git_cl.py.""" | 6 """Unit tests for git_cl.py.""" |
| 7 | 7 |
| 8 import os | 8 import os |
| 9 import StringIO | 9 import StringIO |
| 10 import stat | 10 import stat |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 ((['git', 'config', 'user.email'],), 'me@example.com'), | 116 ((['git', 'config', 'user.email'],), 'me@example.com'), |
| 117 ((['git', 'diff', '--no-ext-diff', '--stat', '-M', 'master...'],), | 117 ((['git', 'diff', '--no-ext-diff', '--stat', '-M', 'master...'],), |
| 118 '+dat'), | 118 '+dat'), |
| 119 ((['git', 'log', '--pretty=format:%s\n\n%b', 'master..'],), 'desc\n'), | 119 ((['git', 'log', '--pretty=format:%s\n\n%b', 'master..'],), 'desc\n'), |
| 120 ] | 120 ] |
| 121 | 121 |
| 122 @staticmethod | 122 @staticmethod |
| 123 def _git_upload_calls(): | 123 def _git_upload_calls(): |
| 124 return [ | 124 return [ |
| 125 ((['git', 'config', 'rietveld.cc'],), ''), | 125 ((['git', 'config', 'rietveld.cc'],), ''), |
| 126 ((['git', 'config', 'branch.master.base-url'],), ''), |
| 126 ((['git', 'config', '--get-regexp', '^svn-remote\\.'],), | 127 ((['git', 'config', '--get-regexp', '^svn-remote\\.'],), |
| 127 (('', None), 0)), | 128 (('', None), 0)), |
| 128 ((['git', 'rev-parse', '--show-cdup'],), ''), | 129 ((['git', 'rev-parse', '--show-cdup'],), ''), |
| 129 ((['git', 'svn', 'info'],), ''), | 130 ((['git', 'svn', 'info'],), ''), |
| 130 ((['git', 'config', 'branch.master.rietveldissue', '1'],), ''), | 131 ((['git', 'config', 'branch.master.rietveldissue', '1'],), ''), |
| 131 ((['git', 'config', 'branch.master.rietveldserver', | 132 ((['git', 'config', 'branch.master.rietveldserver', |
| 132 'https://codereview.example.com'],), ''), | 133 'https://codereview.example.com'],), ''), |
| 133 ((['git', 'config', 'branch.master.rietveldpatchset', '2'],), ''), | 134 ((['git', 'config', 'branch.master.rietveldpatchset', '2'],), ''), |
| 134 ] | 135 ] |
| 135 | 136 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 ((['git', 'config', 'rietveld.viewvc-url'],), ''), | 450 ((['git', 'config', 'rietveld.viewvc-url'],), ''), |
| 450 (('ViewVC URL:',), ''), | 451 (('ViewVC URL:',), ''), |
| 451 # DownloadHooks(True) | 452 # DownloadHooks(True) |
| 452 (('/usr/local/src/.git/hooks/commit-msg', os.X_OK,), True), | 453 (('/usr/local/src/.git/hooks/commit-msg', os.X_OK,), True), |
| 453 ] | 454 ] |
| 454 git_cl.main(['config']) | 455 git_cl.main(['config']) |
| 455 | 456 |
| 456 | 457 |
| 457 if __name__ == '__main__': | 458 if __name__ == '__main__': |
| 458 unittest.main() | 459 unittest.main() |
| OLD | NEW |