/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 bzrlib/transform.py

  • Committer: John Arbash Meinel
  • Date: 2009-10-29 21:13:16 UTC
  • mfrom: (4634.77.13 2.0)
  • mto: This revision was merged to the branch mainline in revision 4777.
  • Revision ID: john@arbash-meinel.com-20091029211316-d70fv1sxe2ev9rhy
Merge bzr.2.0 bringing in a bunch of small bugfixes.

Stuff like the ObjectNotLocked failures, reverting contents in the presence
of filters, etc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2639
2639
                tt.adjust_path(name[1], parent_trans, trans_id)
2640
2640
            if executable[0] != executable[1] and kind[1] == "file":
2641
2641
                tt.set_executability(executable[1], trans_id)
2642
 
        for (trans_id, mode_id), bytes in target_tree.iter_files_bytes(
2643
 
            deferred_files):
2644
 
            tt.create_file(bytes, trans_id, mode_id)
 
2642
        if working_tree.supports_content_filtering():
 
2643
            for index, ((trans_id, mode_id), bytes) in enumerate(
 
2644
                target_tree.iter_files_bytes(deferred_files)):
 
2645
                file_id = deferred_files[index][0]
 
2646
                # We're reverting a tree to the target tree so using the
 
2647
                # target tree to find the file path seems the best choice
 
2648
                # here IMO - Ian C 27/Oct/2009
 
2649
                filter_tree_path = target_tree.id2path(file_id)
 
2650
                filters = working_tree._content_filter_stack(filter_tree_path)
 
2651
                bytes = filtered_output_bytes(bytes, filters,
 
2652
                    ContentFilterContext(filter_tree_path, working_tree))
 
2653
                tt.create_file(bytes, trans_id, mode_id)
 
2654
        else:
 
2655
            for (trans_id, mode_id), bytes in target_tree.iter_files_bytes(
 
2656
                deferred_files):
 
2657
                tt.create_file(bytes, trans_id, mode_id)
2645
2658
    finally:
2646
2659
        if basis_tree is not None:
2647
2660
            basis_tree.unlock()