~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Aaron Bentley
  • Date: 2005-12-25 00:38:48 UTC
  • mto: (1185.67.11 bzr.revision-storage)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: aaron.bentley@utoronto.ca-20051225003848-111ac71170cb2605
Renamed Branch.storage to Branch.repository

Show diffs side-by-side

added added

removed removed

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