~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Martin Pool
  • Date: 2006-01-13 07:45:31 UTC
  • mfrom: (1543.1.2 bzr.diff)
  • Revision ID: mbp@sourcefrog.net-20060113074531-d62e6798c2dc5ebc
[merge] Hold locks around diff to prevent thrashing stat-cache (Denys)

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