Added full home directory to subversion certificate error message.
Updated 5 months, 2 weeks ago
| Mat Schaffer | Reviewers | ||
| trunk | reviewboard | ||
| None | Review Board SVN | ||
The previous message just said '~'. This substitutes the actual home directory of the user which should be helpful when diagnosing svn issues.
scmtools tests still run (os x, linux). Used this change to help diagnose confusion about which user reviewboard was running as.
| /trunk/reviewboard/scmtools/svn.py | |||
|---|---|---|---|
| Revision 1397 | New Change | ||
| 1 |
|
1 |
|
| 2 | import urllib |
2 | import urllib |
| 3 | import urlparse |
3 | import urlparse |
| 4 | import os |
||
| 4 | 5 | ||
| 5 | try: |
6 | try: |
| 6 | from pysvn import ClientError, Revision, opt_revision_kind |
7 | from pysvn import ClientError, Revision, opt_revision_kind |
| 7 | except ImportError: |
8 | except ImportError: |
| 8 | pass |
9 | pass |
| ... | 94 lines hidden [Expand] | ||
| 103 | except ClientError, e: |
104 | except ClientError, e: |
| 104 | stre = str(e) |
105 | stre = str(e) |
| 105 | if 'File not found' in stre or 'path not found' in stre: |
106 | if 'File not found' in stre or 'path not found' in stre: |
| 106 | raise FileNotFoundError(path, revision, str(e)) |
107 | raise FileNotFoundError(path, revision, str(e)) |
| 107 | elif 'callback_ssl_server_trust_prompt required' in stre: |
108 | elif 'callback_ssl_server_trust_prompt required' in stre: |
| 109 | home = os.path.expanduser('~') |
||
| 108 | raise SCMError( |
110 | raise SCMError( |
| 109 | 'HTTPS certificate not accepted. Please ensure that ' + |
111 | 'HTTPS certificate not accepted. Please ensure that ' |
| 110 | 'the proper certificate exists in ~/.subversion/auth ' + |
112 | 'the proper certificate exists in %s/.subversion/auth ' |
| 111 | 'for the user that reviewboard is running as.') |
113 | 'for the user that reviewboard is running as.' % home) |
| 112 | else: |
114 | else: |
| 113 | raise SCMError(e) |
115 | raise SCMError(e) |
| 114 | 116 | ||
| 115 | def collapse_keywords(self, data, keyword_str): |
117 | def collapse_keywords(self, data, keyword_str): |
| 116 | """ |
118 | """ |
| ... | 129 lines hidden [Expand] | ||
- /trunk/reviewboard/scmtools/svn.py: 3 changes [ 1 2 3 ]
Other reviews