/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/repofmt/weaverepo.py

  • Committer: Martin Pool
  • Date: 2007-10-10 00:21:57 UTC
  • mfrom: (2900 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2901.
  • Revision ID: mbp@sourcefrog.net-20071010002157-utci0x44m2w47wgd
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
                           timezone=None, committer=None, revprops=None,
121
121
                           revision_id=None):
122
122
        self._check_ascii_revisionid(revision_id, self.get_commit_builder)
123
 
        revision_id = osutils.safe_revision_id(revision_id)
124
123
        result = WeaveCommitBuilder(self, parents, config, timestamp, timezone,
125
124
                              committer, revprops, revision_id)
126
125
        self.start_write_group()
156
155
        # special case NULL_REVISION
157
156
        if revision_id == _mod_revision.NULL_REVISION:
158
157
            return {}
159
 
        revision_id = osutils.safe_revision_id(revision_id)
160
158
        a_weave = self.get_inventory_weave()
161
159
        all_revisions = self._eliminate_revisions_not_present(
162
160
                                a_weave.versions())
248
246
                           timezone=None, committer=None, revprops=None,
249
247
                           revision_id=None):
250
248
        self._check_ascii_revisionid(revision_id, self.get_commit_builder)
251
 
        revision_id = osutils.safe_revision_id(revision_id)
252
249
        result = WeaveCommitBuilder(self, parents, config, timestamp, timezone,
253
250
                              committer, revprops, revision_id)
254
251
        self.start_write_group()
258
255
    def get_revision(self, revision_id):
259
256
        """Return the Revision object for a named revision"""
260
257
        # TODO: jam 20070210 get_revision_reconcile should do this for us
261
 
        revision_id = osutils.safe_revision_id(revision_id)
262
258
        r = self.get_revision_reconcile(revision_id)
263
259
        # weave corruption can lead to absent revision markers that should be
264
260
        # present.
286
282
        # special case NULL_REVISION
287
283
        if revision_id == _mod_revision.NULL_REVISION:
288
284
            return {}
289
 
        revision_id = osutils.safe_revision_id(revision_id)
290
285
        a_weave = self.get_inventory_weave()
291
286
        all_revisions = self._eliminate_revisions_not_present(
292
287
                                a_weave.versions())
599
594
class WeaveCommitBuilder(CommitBuilder):
600
595
    """A builder for weave based repos that don't support ghosts."""
601
596
 
602
 
    def _add_text_to_weave(self, file_id, new_lines, parents):
 
597
    def _add_text_to_weave(self, file_id, new_lines, parents, nostore_sha):
603
598
        versionedfile = self.repository.weave_store.get_weave_or_empty(
604
599
            file_id, self.repository.get_transaction())
605
600
        result = versionedfile.add_lines(
606
 
            self._new_revision_id, parents, new_lines)[0:2]
 
601
            self._new_revision_id, parents, new_lines,
 
602
            nostore_sha=nostore_sha)[0:2]
607
603
        versionedfile.clear_cache()
608
604
        return result
609
605