~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

Merge bzr.dev and tree-file-ids-as-tuples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
                           ImmortalLimbo, NoFinalPath,
51
51
                           UnableCreateSymlink)
52
52
from bzrlib.filters import filtered_output_bytes, ContentFilterContext
 
53
from bzrlib.mutabletree import MutableTree
53
54
from bzrlib.osutils import (
54
55
    delete_any,
55
56
    file_kind,
155
156
        """
156
157
        if self._tree is None:
157
158
            return
 
159
        for hook in MutableTree.hooks['post_transform']:
 
160
            hook(self._tree, self)
158
161
        self._tree.unlock()
159
162
        self._tree = None
160
163
 
229
232
        irrelevant.
230
233
 
231
234
        """
232
 
        new_roots = [k for k, v in self._new_parent.iteritems() if v is
 
235
        new_roots = [k for k, v in self._new_parent.iteritems() if v ==
233
236
                     ROOT_PARENT]
234
237
        if len(new_roots) < 1:
235
238
            return
625
628
        for trans_id in self._new_parent:
626
629
            seen = set()
627
630
            parent_id = trans_id
628
 
            while parent_id is not ROOT_PARENT:
 
631
            while parent_id != ROOT_PARENT:
629
632
                seen.add(parent_id)
630
633
                try:
631
634
                    parent_id = self.final_parent(parent_id)
641
644
        """If parent directories are versioned, children must be versioned."""
642
645
        conflicts = []
643
646
        for parent_id, children in by_parent.iteritems():
644
 
            if parent_id is ROOT_PARENT:
 
647
            if parent_id == ROOT_PARENT:
645
648
                continue
646
649
            if self.final_file_id(parent_id) is not None:
647
650
                continue
740
743
        """Children must have a directory parent"""
741
744
        conflicts = []
742
745
        for parent_id, children in by_parent.iteritems():
743
 
            if parent_id is ROOT_PARENT:
 
746
            if parent_id == ROOT_PARENT:
744
747
                continue
745
748
            no_children = True
746
749
            for child_id in children:
1721
1724
            calculating one.
1722
1725
        :param _mover: Supply an alternate FileMover, for testing
1723
1726
        """
 
1727
        for hook in MutableTree.hooks['pre_transform']:
 
1728
            hook(self._tree, self)
1724
1729
        if not no_conflicts:
1725
1730
            self._check_malformed()
1726
1731
        child_pb = ui.ui_factory.nested_progress_bar()