~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

first cut at merge from integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
        if message is None:
224
224
            raise BzrError("The message keyword parameter is required for commit().")
225
225
 
226
 
        self.weave_store = self.branch.weave_store
 
226
        self.weave_store = self.branch.repository.weave_store
227
227
        self.rev_id = rev_id
228
228
        self.specific_files = specific_files
229
229
        self.allow_pointless = allow_pointless
315
315
        """Store the inventory for the new revision."""
316
316
        inv_text = serializer_v5.write_inventory_to_string(self.new_inv)
317
317
        self.inv_sha1 = sha_string(inv_text)
318
 
        s = self.branch.control_weaves
 
318
        s = self.branch.repository.control_weaves
319
319
        s.add_text('inventory', self.rev_id,
320
320
                   split_lines(inv_text), self.present_parents,
321
321
                   self.branch.get_transaction())
344
344
            self.parents.append(precursor_id)
345
345
        self.parents += pending_merges
346
346
        for revision in self.parents:
347
 
            if self.branch.has_revision(revision):
348
 
                self.parent_invs.append(self.branch.get_inventory(revision))
 
347
            if self.branch.repository.has_revision(revision):
 
348
                inventory = self.branch.repository.get_inventory(revision)
 
349
                self.parent_invs.append(inventory)
349
350
                self.present_parents.append(revision)
350
351
 
351
352
    def _check_parents_present(self):
352
353
        for parent_id in self.parents:
353
354
            mutter('commit parent revision {%s}', parent_id)
354
 
            if not self.branch.has_revision(parent_id):
 
355
            if not self.branch.repository.has_revision(parent_id):
355
356
                if parent_id == self.branch.last_revision():
356
357
                    warning("parent is missing %r", parent_id)
357
358
                    raise HistoryMissing(self.branch, 'revision', parent_id)
373
374
        rev_tmp.seek(0)
374
375
        if self.config.signature_needed():
375
376
            plaintext = Testament(self.rev, self.new_inv).as_short_text()
376
 
            self.branch.store_revision_signature(gpg.GPGStrategy(self.config),
377
 
                                                 plaintext, self.rev_id)
378
 
        self.branch.revision_store.add(rev_tmp, self.rev_id)
 
377
            self.branch.repository.store_revision_signature(
 
378
                gpg.GPGStrategy(self.config), plaintext, self.rev_id)
 
379
        self.branch.repository.revision_store.add(rev_tmp, self.rev_id)
379
380
        mutter('new revision_id is {%s}', self.rev_id)
380
381
 
381
382
    def _remove_deleted(self):