~bzr/bzr/375898-missing-merged-root

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Vincent Ladeuil
  • Date: 2010-03-29 16:54:16 UTC
  • Revision ID: v.ladeuil+lp@free.fr-20100329165416-vbfnx484ff736gze
Commit for jam.

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
            self._new_root = self.trans_id_tree_file_id(root_id)
124
124
        else:
125
125
            self._new_root = None
126
 
        # Indictor of whether the transform has been applied
 
126
        # Indicator of whether the transform has been applied
127
127
        self._done = False
128
128
        # A progress bar
129
129
        self._pb = pb
215
215
        """
216
216
        new_roots = [k for k, v in self._new_parent.iteritems() if v is
217
217
                     ROOT_PARENT]
 
218
#        import pdb; pdb.set_trace()
218
219
        if len(new_roots) < 1:
219
220
            return
220
221
        if len(new_roots) != 1:
289
290
                self._tree.iter_entries_by_dir([file_id]).next()
290
291
            except StopIteration:
291
292
                if file_id in self._non_present_ids:
292
 
                    return self._non_present_ids[file_id]
 
293
                    trans_id = self._non_present_ids[file_id]
 
294
                    print 'file_id: %s/%s in _non_present_ids' % (
 
295
                        file_id, trans_id)
293
296
                else:
294
297
                    trans_id = self._assign_id()
 
298
#                    import pdb; pdb.set_trace()
295
299
                    self._non_present_ids[file_id] = trans_id
296
 
                    return trans_id
 
300
                    print 'file_id: %s/%s added to _non_present_ids' % (
 
301
                        file_id, trans_id)
 
302
                return trans_id
297
303
            else:
298
304
                return self.trans_id_tree_file_id(file_id)
299
305
 
462
468
            try:
463
469
                return os.path.basename(self._tree_id_paths[trans_id])
464
470
            except KeyError:
 
471
#                import pdb; pdb.set_trace()
465
472
                raise NoFinalPath(trans_id, self)
466
473
 
467
474
    def by_parent(self):
2824
2831
                        # special-case the other tree root (move its
2825
2832
                        # children to current root)
2826
2833
                        if entry.parent_id is None:
2827
 
                            create=False
 
2834
                            create = False
2828
2835
                            moved = _reparent_transform_children(
2829
2836
                                tt, trans_id, tt.root)
2830
2837
                            for child in moved: