~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Andrew Bennetts
  • Date: 2010-12-14 23:12:59 UTC
  • mto: This revision was merged to the branch mainline in revision 5570.
  • Revision ID: andrew.bennetts@canonical.com-20101214231259-fmygw1f8pig6ydoc
Give more helpful message in AssertionErrors, just in case.

Show diffs side-by-side

added added

removed removed

Lines of Context:
254
254
            name=name, repository=repository)
255
255
        if not isinstance(real_branch, RemoteBranch):
256
256
            if not isinstance(repository, RemoteRepository):
257
 
                raise AssertionError('xxx %r' % (repository,))
 
257
                raise AssertionError(
 
258
                    'need a RemoteRepository to use with RemoteBranch, got %r'
 
259
                    % (repository,))
258
260
            result = RemoteBranch(self, repository, real_branch, name=name)
259
261
        else:
260
262
            result = real_branch
2136
2138
                    remote_repo_url)
2137
2139
            if url_diff != '.':
2138
2140
                raise AssertionError(
2139
 
                    'diff %r: %r vs. (%r + %r)' %
2140
 
                    (url_diff, repository.user_url, medium.base, repo_path))
 
2141
                    'repository.user_url %r does not match URL from server '
 
2142
                    'response (%r + %r)'
 
2143
                    % (repository.user_url, medium.base, repo_path))
2141
2144
            remote_repo = repository
2142
2145
        else:
2143
2146
            if repo_path == '':