~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Patch Queue Manager
  • Date: 2012-07-23 17:56:45 UTC
  • mfrom: (6538.1.34 branch-store)
  • Revision ID: pqm@pqm.ubuntu.com-20120723175645-92crzj8j7bfnuglm
(abentley) switch --store stores uncommitted changes in branch (Aaron
 Bentley)

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.')