~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Haw Loeung (hloeung)
  • Date: 2012-07-24 12:53:36 UTC
  • mfrom: (6541 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6542.
  • Revision ID: haw.loeung@canonical.com-20120724125336-r3wzxm02lyec7jm6
[hloeung] Merged with upstream resolving conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2893
2893
        BzrError.__init__(self, tree=tree, display_url=display_url, more=more)
2894
2894
 
2895
2895
 
 
2896
class StoringUncommittedNotSupported(BzrError):
 
2897
 
 
2898
    _fmt = ('Branch "%(display_url)s" does not support storing uncommitted'
 
2899
            ' changes.')
 
2900
 
 
2901
    def __init__(self, branch):
 
2902
        import bzrlib.urlutils as urlutils
 
2903
        user_url = getattr(branch, "user_url", None)
 
2904
        if user_url is None:
 
2905
            display_url = str(branch)
 
2906
        else:
 
2907
            display_url = urlutils.unescape_for_display(user_url, 'ascii')
 
2908
        BzrError.__init__(self, branch=branch, display_url=display_url)
 
2909
 
 
2910
 
2896
2911
class ShelvedChanges(UncommittedChanges):
2897
2912
 
2898
2913
    _fmt = ('Working tree "%(display_url)s" has shelved changes'
3340
3355
 
3341
3356
    def __init__(self, feature):
3342
3357
        self.feature = feature
 
3358
 
 
3359
 
 
3360
class ChangesAlreadyStored(BzrCommandError):
 
3361
 
 
3362
    _fmt = ('Cannot store uncommitted changes because this branch already'
 
3363
            ' stores uncommitted changes.')