/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: Jelmer Vernooij
  • Date: 2020-08-10 15:00:17 UTC
  • mfrom: (7490.40.99 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200810150017-vs7xnrd1vat4iktg
Merge lp:brz/3.1.

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.