/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/git/remote.py

  • Committer: Jelmer Vernooij
  • Date: 2018-09-28 05:18:28 UTC
  • mto: This revision was merged to the branch mainline in revision 7139.
  • Revision ID: jelmer@jelmer.uk-20180928051828-q9e7x8wio7rgfz1y
Handle github PermissionDenied.

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
    if message.startswith('access denied or repository not exported:'):
204
204
        extra, path = message.split(': ', 1)
205
205
        return PermissionDenied(path, extra)
206
 
    if message.strip() == 'GitLab: You are not allowed to push code to this project.':
207
 
        return PermissionDenied(url, message.strip())
 
206
    if message == 'GitLab: You are not allowed to push code to this project.':
 
207
        return PermissionDenied(url, message)
 
208
    m = re.match(r'Permission to ([^ ]+) denied to ([^ ]+)\.', message)
 
209
    if m:
 
210
        return PermissionDenied(m.group(1), 'denied to %s' % m.group(2))
208
211
    # Don't know, just return it to the user as-is
209
212
    return RemoteGitError(message)
210
213