~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-07-20 12:11:36 UTC
  • mfrom: (5353.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100720121136-r4c42ke7mjobuuo4
(vila) Dont print internal object names in invalid revision spec
        error (Neil Martinsen-Burrell)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1180
1180
class InvalidRevisionSpec(BzrError):
1181
1181
 
1182
1182
    _fmt = ("Requested revision: '%(spec)s' does not exist in branch:"
1183
 
            " %(branch)s%(extra)s")
 
1183
            " %(branch_url)s%(extra)s")
1184
1184
 
1185
1185
    def __init__(self, spec, branch, extra=None):
1186
1186
        BzrError.__init__(self, branch=branch, spec=spec)
 
1187
        self.branch_url = getattr(branch, 'user_url', str(branch))
1187
1188
        if extra:
1188
1189
            self.extra = '\n' + str(extra)
1189
1190
        else: