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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-08-23 01:15:41 UTC
  • mfrom: (7520.1.4 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200823011541-nv0oh7nzaganx2qy
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/389690

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
class WorkspaceDirty(BzrError):
38
38
    _fmt = "The directory %(path)s has pending changes."
39
39
 
40
 
    def __init__(self, tree):
41
 
        BzrError(self, path=tree.abspath('.'))
 
40
    def __init__(self, path):
 
41
        BzrError.__init__(self, path=path)
42
42
 
43
43
 
44
44
# TODO(jelmer): Move to .clean_tree?
69
69
    """
70
70
    # Just check there are no changes to begin with
71
71
    if local_tree.has_changes():
72
 
        raise WorkspaceDirty(local_tree)
 
72
        raise WorkspaceDirty(local_tree.abspath('.'))
73
73
    if list(local_tree.unknowns()):
74
 
        raise WorkspaceDirty(local_tree)
75
 
 
76
 
 
77
 
def delete_items(deletables, dry_run: bool = False):
 
74
        raise WorkspaceDirty(local_tree.abspath('.'))
 
75
 
 
76
 
 
77
def delete_items(deletables, dry_run=False):
78
78
    """Delete files in the deletables iterable"""
79
79
    def onerror(function, path, excinfo):
80
80
        """Show warning for errors seen by rmtree.