/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: Vincent Ladeuil
  • Date: 2012-01-17 16:03:07 UTC
  • mfrom: (6434.1.3 bzr-pypy)
  • mto: (6437.3.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6441.
  • Revision ID: v.ladeuil+lp@free.fr-20120117160307-0ufsytdtj5l3rrzr
Test for equality instead of object identity where ROOT_PARENT is concerned

Show diffs side-by-side

added added

removed removed

Lines of Context:
230
230
        irrelevant.
231
231
 
232
232
        """
233
 
        new_roots = [k for k, v in self._new_parent.iteritems() if v is
 
233
        new_roots = [k for k, v in self._new_parent.iteritems() if v ==
234
234
                     ROOT_PARENT]
235
235
        if len(new_roots) < 1:
236
236
            return
626
626
        for trans_id in self._new_parent:
627
627
            seen = set()
628
628
            parent_id = trans_id
629
 
            while parent_id is not ROOT_PARENT:
 
629
            while parent_id != ROOT_PARENT:
630
630
                seen.add(parent_id)
631
631
                try:
632
632
                    parent_id = self.final_parent(parent_id)
642
642
        """If parent directories are versioned, children must be versioned."""
643
643
        conflicts = []
644
644
        for parent_id, children in by_parent.iteritems():
645
 
            if parent_id is ROOT_PARENT:
 
645
            if parent_id == ROOT_PARENT:
646
646
                continue
647
647
            if self.final_file_id(parent_id) is not None:
648
648
                continue
741
741
        """Children must have a directory parent"""
742
742
        conflicts = []
743
743
        for parent_id, children in by_parent.iteritems():
744
 
            if parent_id is ROOT_PARENT:
 
744
            if parent_id == ROOT_PARENT:
745
745
                continue
746
746
            no_children = True
747
747
            for child_id in children: