/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: Canonical.com Patch Queue Manager
  • Date: 2011-06-28 15:58:20 UTC
  • mfrom: (5993.2.4 merge-inner-rootless)
  • Revision ID: pqm@pqm.ubuntu.com-20110628155820-g1hpzbqc5573rts5
(jelmer) Re-introduce root when merge result is empty tree. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
226
226
        This means that the old root trans-id becomes obsolete, so it is
227
227
        recommended only to invoke this after the root trans-id has become
228
228
        irrelevant.
 
229
 
229
230
        """
230
231
        new_roots = [k for k, v in self._new_parent.iteritems() if v is
231
232
                     ROOT_PARENT]
232
233
        if len(new_roots) < 1:
 
234
            if self.final_kind(self.root) is None:
 
235
                self.cancel_deletion(self.root)
 
236
            if self.final_file_id(self.root) is None:
 
237
                self.version_file(self.tree_file_id(self.root),
 
238
                                     self.root)
233
239
            return
234
240
        if len(new_roots) != 1:
235
241
            raise ValueError('A tree cannot have two roots!')