/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/commit.py

Refactored out ControlFiles and RevisionStore from _Branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
        mutter('preparing to commit')
201
201
 
202
202
        self.branch = branch
203
 
        self.weave_store = branch.weave_store
 
203
        self.weave_store = branch.storage.weave_store
204
204
        self.rev_id = rev_id
205
205
        self.specific_files = specific_files
206
206
        self.allow_pointless = allow_pointless
286
286
        """Store the inventory for the new revision."""
287
287
        inv_text = serializer_v5.write_inventory_to_string(self.new_inv)
288
288
        self.inv_sha1 = sha_string(inv_text)
289
 
        s = self.branch.control_weaves
 
289
        s = self.branch.storage.control_weaves
290
290
        s.add_text('inventory', self.rev_id,
291
291
                   split_lines(inv_text), self.present_parents,
292
292
                   self.branch.get_transaction())
321
321
            self.parents.append(precursor_id)
322
322
        self.parents += pending_merges
323
323
        for revision in self.parents:
324
 
            if self.branch.has_revision(revision):
325
 
                self.parent_invs.append(self.branch.get_inventory(revision))
 
324
            if self.branch.storage.has_revision(revision):
 
325
                inventory = self.branch.storage.get_inventory(revision)
 
326
                self.parent_invs.append(inventory)
326
327
                self.present_parents.append(revision)
327
328
 
328
329
    def _check_parents_present(self):
329
330
        for parent_id in self.parents:
330
331
            mutter('commit parent revision {%s}', parent_id)
331
 
            if not self.branch.has_revision(parent_id):
 
332
            if not self.branch.storage.has_revision(parent_id):
332
333
                if parent_id == self.branch.last_revision():
333
334
                    warning("parent is missing %r", parent_id)
334
335
                    raise HistoryMissing(self.branch, 'revision', parent_id)
350
351
        rev_tmp.seek(0)
351
352
        if self.config.signature_needed():
352
353
            plaintext = Testament(self.rev, self.new_inv).as_short_text()
353
 
            self.branch.store_revision_signature(gpg.GPGStrategy(self.config),
354
 
                                                 plaintext, self.rev_id)
355
 
        self.branch.revision_store.add(rev_tmp, self.rev_id)
 
354
            self.branch.storage.store_revision_signature(
 
355
                gpg.GPGStrategy(self.config), plaintext, self.rev_id)
 
356
        self.branch.storage.revision_store.add(rev_tmp, self.rev_id)
356
357
        mutter('new revision_id is {%s}', self.rev_id)
357
358
 
358
359
    def _remove_deleted(self):