~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Denys Duchier
  • Date: 2006-01-12 14:04:07 UTC
  • mto: This revision was merged to the branch mainline in revision 1545.
  • Revision ID: denys.duchier@mozart-oz.org-20060112140407-8fcdee0baca6d707
lock operations for trees - use them for diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
        files within them.
161
161
    """
162
162
 
 
163
    old_tree.lock_read()
 
164
    try:
 
165
        new_tree.lock_read()
 
166
        try:
 
167
            return _compare_trees(old_tree, new_tree, want_unchanged,
 
168
                                  specific_files)
 
169
        finally:
 
170
            new_tree.unlock()
 
171
    finally:
 
172
        old_tree.unlock()
 
173
 
 
174
 
 
175
def _compare_trees(old_tree, new_tree, want_unchanged, specific_files):
 
176
 
163
177
    from osutils import is_inside_any
164
178
    
165
179
    old_inv = old_tree.inventory