~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to clean_tree.py

  • Committer: Aaron Bentley
  • Date: 2006-12-12 02:21:50 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20061212022150-7lqyw46pbb3jhkak
Clean up patch command (support http urls again)

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
               dry_run=False):
48
48
    """Remove files in the specified classes from the tree"""
49
49
    tree = WorkingTree.open_containing(directory)[0]
50
 
    tree.lock_read()
51
 
    try:
52
 
        deletables = iter_deletables(tree, unknown=unknown, ignored=ignored,
53
 
                                     detritus=detritus)
54
 
        delete_items(deletables, dry_run=dry_run)
55
 
    finally:
56
 
        tree.unlock()
 
50
    deletables = iter_deletables(tree, unknown=unknown, ignored=ignored, 
 
51
                                 detritus=detritus)
 
52
    delete_items(deletables, dry_run=dry_run)
57
53
 
58
54
 
59
55
def delete_items(deletables, dry_run=False):