/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: Martin Pool
  • Date: 2011-06-19 02:24:39 UTC
  • mfrom: (5985 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110619022439-u68683yb2bw302x0
resolve conflicts against trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
        if (self.tree_file_id(self._new_root) is not None and
253
253
            self._new_root not in self._removed_id):
254
254
            self.unversion_file(self._new_root)
255
 
        self.version_file(file_id, self._new_root)
 
255
        if file_id is not None:
 
256
            self.version_file(file_id, self._new_root)
256
257
 
257
258
        # Now move children of new root into old root directory.
258
259
        # Ensure all children are registered with the transaction, but don't
1826
1827
        tree_paths.sort(reverse=True)
1827
1828
        child_pb = ui.ui_factory.nested_progress_bar()
1828
1829
        try:
1829
 
            for num, data in enumerate(tree_paths):
1830
 
                path, trans_id = data
 
1830
            for num, (path, trans_id) in enumerate(tree_paths):
 
1831
                # do not attempt to move root into a subdirectory of itself.
 
1832
                if path == '':
 
1833
                    continue
1831
1834
                child_pb.update('removing file', num, len(tree_paths))
1832
1835
                full_path = self._tree.abspath(path)
1833
1836
                if trans_id in self._removed_contents: