/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/errors.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-03-25 22:47:16 UTC
  • mfrom: (7499.1.2 revspec-errors)
  • Revision ID: breezy.the.bot@gmail.com-20200325224716-wxn1o0ga8c81p34z
Move InvalidRevisionSpec to breezy.revisionspec.

Merged from https://code.launchpad.net/~jelmer/brz/revspec-errors/+merge/381196

Show diffs side-by-side

added added

removed removed

Lines of Context:
956
956
        self.revision_id = revision_id
957
957
 
958
958
 
959
 
class InvalidRevisionSpec(BzrError):
960
 
 
961
 
    _fmt = ("Requested revision: '%(spec)s' does not exist in branch:"
962
 
            " %(branch_url)s%(extra)s")
963
 
 
964
 
    def __init__(self, spec, branch, extra=None):
965
 
        BzrError.__init__(self, branch=branch, spec=spec)
966
 
        self.branch_url = getattr(branch, 'user_url', str(branch))
967
 
        if extra:
968
 
            self.extra = '\n' + str(extra)
969
 
        else:
970
 
            self.extra = ''
971
 
 
972
 
 
973
959
class AppendRevisionsOnlyViolation(BzrError):
974
960
 
975
961
    _fmt = ('Operation denied because it would change the main history,'