~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/serializer/v4.py

  • Committer: Martin Pool
  • Date: 2008-06-05 09:22:59 UTC
  • mto: This revision was merged to the branch mainline in revision 3479.
  • Revision ID: mbp@sourcefrog.net-20080605092259-keruhi6qrgf9ikax
CountedLock now handles and tests lock tokens

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
from cStringIO import StringIO
18
18
import bz2
22
22
    diff,
23
23
    errors,
24
24
    iterablefile,
25
 
    lru_cache,
26
25
    multiparent,
27
26
    osutils,
28
27
    pack,
29
28
    revision as _mod_revision,
30
 
    serializer,
31
29
    trace,
32
 
    ui,
 
30
    xml_serializer,
33
31
    )
34
 
from bzrlib.bundle import bundle_data, serializer as bundle_serializer
35
 
from bzrlib import bencode
 
32
from bzrlib.bundle import bundle_data, serializer
 
33
from bzrlib.util import bencode
36
34
 
37
35
 
38
36
class BundleWriter(object):
56
54
 
57
55
    def begin(self):
58
56
        """Start writing the bundle"""
59
 
        self._fileobj.write(bundle_serializer._get_bundle_header(
60
 
            bundle_serializer.v4_string))
 
57
        self._fileobj.write(serializer._get_bundle_header(
 
58
            serializer.v4_string))
61
59
        self._fileobj.write('#\n')
62
60
        self._container.begin()
63
61
 
220
218
            yield (bytes, metadata) + self.decode_name(names[0][0])
221
219
 
222
220
 
223
 
class BundleSerializerV4(bundle_serializer.BundleSerializer):
 
221
class BundleSerializerV4(serializer.BundleSerializer):
224
222
    """Implement the high-level bundle interface"""
225
223
 
226
224
    def write(self, repository, revision_ids, forced_bases, fileobj):
252
250
    @staticmethod
253
251
    def get_source_serializer(info):
254
252
        """Retrieve the serializer for a given info object"""
255
 
        return serializer.format_registry.get(info['serializer'])
 
253
        return xml_serializer.format_registry.get(info['serializer'])
256
254
 
257
255
 
258
256
class BundleWriteOperation(object):
272
270
        self.repository = repository
273
271
        bundle = BundleWriter(fileobj)
274
272
        self.bundle = bundle
 
273
        self.base_ancestry = set(repository.get_ancestry(base,
 
274
                                                         topo_sorted=False))
275
275
        if revision_ids is not None:
276
276
            self.revision_ids = revision_ids
277
277
        else:
278
 
            graph = repository.get_graph()
279
 
            revision_ids = graph.find_unique_ancestors(target, [base])
280
 
            # Strip ghosts
281
 
            parents = graph.get_parent_map(revision_ids)
282
 
            self.revision_ids = [r for r in revision_ids if r in parents]
283
 
        self.revision_keys = set([(revid,) for revid in self.revision_ids])
 
278
            revision_ids = set(repository.get_ancestry(target,
 
279
                                                       topo_sorted=False))
 
280
            self.revision_ids = revision_ids.difference(self.base_ancestry)
284
281
 
285
282
    def do_write(self):
286
283
        """Write all data to the bundle"""
287
 
        trace.note('Bundling %d revision(s).', len(self.revision_ids))
288
 
        self.repository.lock_read()
289
 
        try:
290
 
            self.bundle.begin()
291
 
            self.write_info()
292
 
            self.write_files()
293
 
            self.write_revisions()
294
 
            self.bundle.end()
295
 
        finally:
296
 
            self.repository.unlock()
 
284
        self.bundle.begin()
 
285
        self.write_info()
 
286
        self.write_files()
 
287
        self.write_revisions()
 
288
        self.bundle.end()
297
289
        return self.revision_ids
298
290
 
299
291
    def write_info(self):
304
296
        self.bundle.add_info_record(serializer=serializer_format,
305
297
                                    supports_rich_root=supports_rich_root)
306
298
 
 
299
    def iter_file_revisions(self):
 
300
        """Iterate through all relevant revisions of all files.
 
301
 
 
302
        This is the correct implementation, but is not compatible with bzr.dev,
 
303
        because certain old revisions were not converted correctly, and have
 
304
        the wrong "revision" marker in inventories.
 
305
        """
 
306
        transaction = self.repository.get_transaction()
 
307
        altered = self.repository.fileids_altered_by_revision_ids(
 
308
            self.revision_ids)
 
309
        for file_id, file_revision_ids in altered.iteritems():
 
310
            vf = self.repository.weave_store.get_weave(file_id, transaction)
 
311
            yield vf, file_id, file_revision_ids
 
312
 
 
313
    def iter_file_revisions_aggressive(self):
 
314
        """Iterate through all relevant revisions of all files.
 
315
 
 
316
        This uses the standard iter_file_revisions to determine what revisions
 
317
        are referred to by inventories, but then uses the versionedfile to
 
318
        determine what the build-dependencies of each required revision.
 
319
 
 
320
        All build dependencies which are not ancestors of the base revision
 
321
        are emitted.
 
322
        """
 
323
        for vf, file_id, file_revision_ids in self.iter_file_revisions():
 
324
            new_revision_ids = set()
 
325
            pending = list(file_revision_ids)
 
326
            while len(pending) > 0:
 
327
                revision_id = pending.pop()
 
328
                if revision_id in new_revision_ids:
 
329
                    continue
 
330
                if revision_id in self.base_ancestry:
 
331
                    continue
 
332
                new_revision_ids.add(revision_id)
 
333
                pending.extend(vf.get_parent_map([revision_id])[revision_id])
 
334
            yield vf, file_id, new_revision_ids
 
335
 
307
336
    def write_files(self):
308
337
        """Write bundle records for all revisions of all files"""
309
 
        text_keys = []
310
 
        altered_fileids = self.repository.fileids_altered_by_revision_ids(
311
 
                self.revision_ids)
312
 
        for file_id, revision_ids in altered_fileids.iteritems():
313
 
            for revision_id in revision_ids:
314
 
                text_keys.append((file_id, revision_id))
315
 
        self._add_mp_records_keys('file', self.repository.texts, text_keys)
 
338
        for vf, file_id, revision_ids in self.iter_file_revisions():
 
339
            self.add_mp_records('file', file_id, vf, revision_ids)
316
340
 
317
341
    def write_revisions(self):
318
342
        """Write bundle records for all revisions and signatures"""
319
 
        inv_vf = self.repository.inventories
320
 
        topological_order = [key[-1] for key in multiparent.topo_iter_keys(
321
 
                                inv_vf, self.revision_keys)]
322
 
        revision_order = topological_order
 
343
        inv_vf = self.repository.get_inventory_weave()
 
344
        revision_order = list(multiparent.topo_iter(inv_vf, self.revision_ids))
323
345
        if self.target is not None and self.target in self.revision_ids:
324
 
            # Make sure the target revision is always the last entry
325
 
            revision_order = list(topological_order)
326
346
            revision_order.remove(self.target)
327
347
            revision_order.append(self.target)
328
 
        if self.repository._serializer.support_altered_by_hack:
329
 
            # Repositories that support_altered_by_hack means that
330
 
            # inventories.make_mpdiffs() contains all the data about the tree
331
 
            # shape. Formats without support_altered_by_hack require
332
 
            # chk_bytes/etc, so we use a different code path.
333
 
            self._add_mp_records_keys('inventory', inv_vf,
334
 
                                      [(revid,) for revid in topological_order])
335
 
        else:
336
 
            # Inventories should always be added in pure-topological order, so
337
 
            # that we can apply the mpdiff for the child to the parent texts.
338
 
            self._add_inventory_mpdiffs_from_serializer(topological_order)
339
 
        self._add_revision_texts(revision_order)
340
 
 
341
 
    def _add_inventory_mpdiffs_from_serializer(self, revision_order):
342
 
        """Generate mpdiffs by serializing inventories.
343
 
 
344
 
        The current repository only has part of the tree shape information in
345
 
        the 'inventories' vf. So we use serializer.write_inventory_to_string to
346
 
        get a 'full' representation of the tree shape, and then generate
347
 
        mpdiffs on that data stream. This stream can then be reconstructed on
348
 
        the other side.
349
 
        """
350
 
        inventory_key_order = [(r,) for r in revision_order]
351
 
        parent_map = self.repository.inventories.get_parent_map(
352
 
                            inventory_key_order)
353
 
        missing_keys = set(inventory_key_order).difference(parent_map)
354
 
        if missing_keys:
355
 
            raise errors.RevisionNotPresent(list(missing_keys)[0],
356
 
                                            self.repository.inventories)
357
 
        inv_to_str = self.repository._serializer.write_inventory_to_string
358
 
        # Make sure that we grab the parent texts first
359
 
        just_parents = set()
360
 
        map(just_parents.update, parent_map.itervalues())
361
 
        just_parents.difference_update(parent_map)
362
 
        # Ignore ghost parents
363
 
        present_parents = self.repository.inventories.get_parent_map(
364
 
                            just_parents)
365
 
        ghost_keys = just_parents.difference(present_parents)
366
 
        needed_inventories = list(present_parents) + inventory_key_order
367
 
        needed_inventories = [k[-1] for k in needed_inventories]
368
 
        all_lines = {}
369
 
        for inv in self.repository.iter_inventories(needed_inventories):
370
 
            revision_id = inv.revision_id
371
 
            key = (revision_id,)
372
 
            as_bytes = inv_to_str(inv)
373
 
            # The sha1 is validated as the xml/textual form, not as the
374
 
            # form-in-the-repository
375
 
            sha1 = osutils.sha_string(as_bytes)
376
 
            as_lines = osutils.split_lines(as_bytes)
377
 
            del as_bytes
378
 
            all_lines[key] = as_lines
379
 
            if key in just_parents:
380
 
                # We don't transmit those entries
381
 
                continue
382
 
            # Create an mpdiff for this text, and add it to the output
383
 
            parent_keys = parent_map[key]
384
 
            # See the comment in VF.make_mpdiffs about how this effects
385
 
            # ordering when there are ghosts present. I think we have a latent
386
 
            # bug
387
 
            parent_lines = [all_lines[p_key] for p_key in parent_keys
388
 
                            if p_key not in ghost_keys]
389
 
            diff = multiparent.MultiParent.from_lines(
390
 
                as_lines, parent_lines)
391
 
            text = ''.join(diff.to_patch())
392
 
            parent_ids = [k[-1] for k in parent_keys]
393
 
            self.bundle.add_multiparent_record(text, sha1, parent_ids,
394
 
                                               'inventory', revision_id, None)
395
 
 
396
 
    def _add_revision_texts(self, revision_order):
 
348
        self.add_mp_records('inventory', None, inv_vf, revision_order)
397
349
        parent_map = self.repository.get_parent_map(revision_order)
398
 
        revision_to_str = self.repository._serializer.write_revision_to_string
399
 
        revisions = self.repository.get_revisions(revision_order)
400
 
        for revision in revisions:
401
 
            revision_id = revision.revision_id
 
350
        for revision_id in revision_order:
402
351
            parents = parent_map.get(revision_id, None)
403
 
            revision_text = revision_to_str(revision)
 
352
            revision_text = self.repository.get_revision_xml(revision_id)
404
353
            self.bundle.add_fulltext_record(revision_text, parents,
405
354
                                       'revision', revision_id)
406
355
            try:
425
374
                base = parents[0]
426
375
        return base, target
427
376
 
428
 
    def _add_mp_records_keys(self, repo_kind, vf, keys):
 
377
    def add_mp_records(self, repo_kind, file_id, vf, revision_ids):
429
378
        """Add multi-parent diff records to a bundle"""
430
 
        ordered_keys = list(multiparent.topo_iter_keys(vf, keys))
431
 
        mpdiffs = vf.make_mpdiffs(ordered_keys)
432
 
        sha1s = vf.get_sha1s(ordered_keys)
433
 
        parent_map = vf.get_parent_map(ordered_keys)
434
 
        for mpdiff, item_key, in zip(mpdiffs, ordered_keys):
435
 
            sha1 = sha1s[item_key]
436
 
            parents = [key[-1] for key in parent_map[item_key]]
 
379
        revision_ids = list(multiparent.topo_iter(vf, revision_ids))
 
380
        mpdiffs = vf.make_mpdiffs(revision_ids)
 
381
        sha1s = vf.get_sha1s(revision_ids)
 
382
        parent_map = vf.get_parent_map(revision_ids)
 
383
        for mpdiff, revision_id, sha1, in zip(mpdiffs, revision_ids, sha1s):
 
384
            parents = parent_map[revision_id]
437
385
            text = ''.join(mpdiff.to_patch())
438
 
            # Infer file id records as appropriate.
439
 
            if len(item_key) == 2:
440
 
                file_id = item_key[0]
441
 
            else:
442
 
                file_id = None
443
386
            self.bundle.add_multiparent_record(text, sha1, parents, repo_kind,
444
 
                                               item_key[-1], file_id)
 
387
                                               revision_id, file_id)
445
388
 
446
389
 
447
390
class BundleInfoV4(object):
531
474
 
532
475
    def install(self):
533
476
        """Perform the installation.
534
 
 
 
477
        
535
478
        Must be called with the Repository locked.
536
479
        """
537
480
        self._repository.start_write_group()
557
500
                if self._info is not None:
558
501
                    raise AssertionError()
559
502
                self._handle_info(metadata)
560
 
            if (pending_file_records and
561
 
                (repo_kind, file_id) != ('file', current_file)):
562
 
                # Flush the data for a single file - prevents memory
563
 
                # spiking due to buffering all files in memory.
564
 
                self._install_mp_records_keys(self._repository.texts,
565
 
                    pending_file_records)
 
503
            if (repo_kind, file_id) != ('file', current_file):
 
504
                if len(pending_file_records) > 0:
 
505
                    self._install_mp_records(current_versionedfile,
 
506
                                             pending_file_records)
566
507
                current_file = None
567
 
                del pending_file_records[:]
 
508
                current_versionedfile = None
 
509
                pending_file_records = []
568
510
            if len(pending_inventory_records) > 0 and repo_kind != 'inventory':
569
 
                self._install_inventory_records(pending_inventory_records)
 
511
                self._install_inventory_records(inventory_vf,
 
512
                                                pending_inventory_records)
570
513
                pending_inventory_records = []
571
514
            if repo_kind == 'inventory':
572
 
                pending_inventory_records.append(((revision_id,), metadata, bytes))
 
515
                if inventory_vf is None:
 
516
                    inventory_vf = self._repository.get_inventory_weave()
 
517
                if revision_id not in inventory_vf:
 
518
                    pending_inventory_records.append((revision_id, metadata,
 
519
                                                      bytes))
573
520
            if repo_kind == 'revision':
574
521
                target_revision = revision_id
575
522
                self._install_revision(revision_id, metadata, bytes)
577
524
                self._install_signature(revision_id, metadata, bytes)
578
525
            if repo_kind == 'file':
579
526
                current_file = file_id
580
 
                pending_file_records.append(((file_id, revision_id), metadata, bytes))
581
 
        self._install_mp_records_keys(self._repository.texts, pending_file_records)
 
527
                if current_versionedfile is None:
 
528
                    current_versionedfile = \
 
529
                        self._repository.weave_store.get_weave_or_empty(
 
530
                        file_id, self._repository.get_transaction())
 
531
                    pending_file_records = []
 
532
                if revision_id in current_versionedfile:
 
533
                    continue
 
534
                pending_file_records.append((revision_id, metadata, bytes))
 
535
        self._install_mp_records(current_versionedfile, pending_file_records)
582
536
        return target_revision
583
537
 
584
538
    def _handle_info(self, info):
599
553
                      records if r not in versionedfile]
600
554
        versionedfile.add_mpdiffs(vf_records)
601
555
 
602
 
    def _install_mp_records_keys(self, versionedfile, records):
603
 
        d_func = multiparent.MultiParent.from_patch
604
 
        vf_records = []
605
 
        for key, meta, text in records:
606
 
            # Adapt to tuple interface: A length two key is a file_id,
607
 
            # revision_id pair, a length 1 key is a
608
 
            # revision/signature/inventory. We need to do this because
609
 
            # the metadata extraction from the bundle has not yet been updated
610
 
            # to use the consistent tuple interface itself.
611
 
            if len(key) == 2:
612
 
                prefix = key[:1]
613
 
            else:
614
 
                prefix = ()
615
 
            parents = [prefix + (parent,) for parent in meta['parents']]
616
 
            vf_records.append((key, parents, meta['sha1'], d_func(text)))
617
 
        versionedfile.add_mpdiffs(vf_records)
618
 
 
619
 
    def _get_parent_inventory_texts(self, inventory_text_cache,
620
 
                                    inventory_cache, parent_ids):
621
 
        cached_parent_texts = {}
622
 
        remaining_parent_ids = []
623
 
        for parent_id in parent_ids:
624
 
            p_text = inventory_text_cache.get(parent_id, None)
625
 
            if p_text is None:
626
 
                remaining_parent_ids.append(parent_id)
627
 
            else:
628
 
                cached_parent_texts[parent_id] = p_text
629
 
        ghosts = ()
630
 
        # TODO: Use inventory_cache to grab inventories we already have in
631
 
        #       memory
632
 
        if remaining_parent_ids:
633
 
            # first determine what keys are actually present in the local
634
 
            # inventories object (don't use revisions as they haven't been
635
 
            # installed yet.)
636
 
            parent_keys = [(r,) for r in remaining_parent_ids]
637
 
            present_parent_map = self._repository.inventories.get_parent_map(
638
 
                                        parent_keys)
639
 
            present_parent_ids = []
640
 
            ghosts = set()
641
 
            for p_id in remaining_parent_ids:
642
 
                if (p_id,) in present_parent_map:
643
 
                    present_parent_ids.append(p_id)
644
 
                else:
645
 
                    ghosts.add(p_id)
646
 
            to_string = self._source_serializer.write_inventory_to_string
647
 
            for parent_inv in self._repository.iter_inventories(
648
 
                                    present_parent_ids):
649
 
                p_text = to_string(parent_inv)
650
 
                inventory_cache[parent_inv.revision_id] = parent_inv
651
 
                cached_parent_texts[parent_inv.revision_id] = p_text
652
 
                inventory_text_cache[parent_inv.revision_id] = p_text
653
 
 
654
 
        parent_texts = [cached_parent_texts[parent_id]
655
 
                        for parent_id in parent_ids
656
 
                         if parent_id not in ghosts]
657
 
        return parent_texts
658
 
 
659
 
    def _install_inventory_records(self, records):
660
 
        if (self._info['serializer'] == self._repository._serializer.format_num
661
 
            and self._repository._serializer.support_altered_by_hack):
662
 
            return self._install_mp_records_keys(self._repository.inventories,
663
 
                records)
664
 
        # Use a 10MB text cache, since these are string xml inventories. Note
665
 
        # that 10MB is fairly small for large projects (a single inventory can
666
 
        # be >5MB). Another possibility is to cache 10-20 inventory texts
667
 
        # instead
668
 
        inventory_text_cache = lru_cache.LRUSizeCache(10*1024*1024)
669
 
        # Also cache the in-memory representation. This allows us to create
670
 
        # inventory deltas to apply rather than calling add_inventory from
671
 
        # scratch each time.
672
 
        inventory_cache = lru_cache.LRUCache(10)
673
 
        pb = ui.ui_factory.nested_progress_bar()
674
 
        try:
675
 
            num_records = len(records)
676
 
            for idx, (key, metadata, bytes) in enumerate(records):
677
 
                pb.update('installing inventory', idx, num_records)
678
 
                revision_id = key[-1]
679
 
                parent_ids = metadata['parents']
680
 
                # Note: This assumes the local ghosts are identical to the
681
 
                #       ghosts in the source, as the Bundle serialization
682
 
                #       format doesn't record ghosts.
683
 
                p_texts = self._get_parent_inventory_texts(inventory_text_cache,
684
 
                                                           inventory_cache,
685
 
                                                           parent_ids)
686
 
                # Why does to_lines() take strings as the source, it seems that
687
 
                # it would have to cast to a list of lines, which we get back
688
 
                # as lines and then cast back to a string.
689
 
                target_lines = multiparent.MultiParent.from_patch(bytes
690
 
                            ).to_lines(p_texts)
691
 
                inv_text = ''.join(target_lines)
692
 
                del target_lines
693
 
                sha1 = osutils.sha_string(inv_text)
694
 
                if sha1 != metadata['sha1']:
695
 
                    raise errors.BadBundle("Can't convert to target format")
696
 
                # Add this to the cache so we don't have to extract it again.
697
 
                inventory_text_cache[revision_id] = inv_text
698
 
                target_inv = self._source_serializer.read_inventory_from_string(
699
 
                    inv_text)
700
 
                self._handle_root(target_inv, parent_ids)
701
 
                parent_inv = None
702
 
                if parent_ids:
703
 
                    parent_inv = inventory_cache.get(parent_ids[0], None)
704
 
                try:
705
 
                    if parent_inv is None:
706
 
                        self._repository.add_inventory(revision_id, target_inv,
707
 
                                                       parent_ids)
708
 
                    else:
709
 
                        delta = target_inv._make_delta(parent_inv)
710
 
                        self._repository.add_inventory_by_delta(parent_ids[0],
711
 
                            delta, revision_id, parent_ids)
712
 
                except errors.UnsupportedInventoryKind:
713
 
                    raise errors.IncompatibleRevision(repr(self._repository))
714
 
                inventory_cache[revision_id] = target_inv
715
 
        finally:
716
 
            pb.finished()
 
556
    def _install_inventory_records(self, vf, records):
 
557
        if self._info['serializer'] == self._repository._serializer.format_num:
 
558
            return self._install_mp_records(vf, records)
 
559
        for revision_id, metadata, bytes in records:
 
560
            parent_ids = metadata['parents']
 
561
            parents = [self._repository.get_inventory(p)
 
562
                       for p in parent_ids]
 
563
            p_texts = [self._source_serializer.write_inventory_to_string(p)
 
564
                       for p in parents]
 
565
            target_lines = multiparent.MultiParent.from_patch(bytes).to_lines(
 
566
                p_texts)
 
567
            sha1 = osutils.sha_strings(target_lines)
 
568
            if sha1 != metadata['sha1']:
 
569
                raise errors.BadBundle("Can't convert to target format")
 
570
            target_inv = self._source_serializer.read_inventory_from_string(
 
571
                ''.join(target_lines))
 
572
            self._handle_root(target_inv, parent_ids)
 
573
            try:
 
574
                self._repository.add_inventory(revision_id, target_inv,
 
575
                                               parent_ids)
 
576
            except errors.UnsupportedInventoryKind:
 
577
                raise errors.IncompatibleRevision(repr(self._repository))
717
578
 
718
579
    def _handle_root(self, target_inv, parent_ids):
719
580
        revision_id = target_inv.revision_id
720
581
        if self.update_root:
721
 
            text_key = (target_inv.root.file_id, revision_id)
722
 
            parent_keys = [(target_inv.root.file_id, parent) for
723
 
                parent in parent_ids]
724
 
            self._repository.texts.add_lines(text_key, parent_keys, [])
 
582
            target_inv.root.revision = revision_id
 
583
            store = self._repository.weave_store
 
584
            transaction = self._repository.get_transaction()
 
585
            vf = store.get_weave_or_empty(target_inv.root.file_id, transaction)
 
586
            vf.add_lines(revision_id, parent_ids, [])
725
587
        elif not self._repository.supports_rich_root():
726
588
            if target_inv.root.revision != revision_id:
727
589
                raise errors.IncompatibleRevision(repr(self._repository))
728
590
 
 
591
 
729
592
    def _install_revision(self, revision_id, metadata, text):
730
593
        if self._repository.has_revision(revision_id):
731
594
            return
732
 
        revision = self._source_serializer.read_revision_from_string(text)
733
 
        self._repository.add_revision(revision.revision_id, revision)
 
595
        if self._info['serializer'] == self._repository._serializer.format_num:
 
596
            self._repository._add_revision_text(revision_id, text)
 
597
        else:
 
598
            revision = self._source_serializer.read_revision_from_string(text)
 
599
            self._repository.add_revision(revision.revision_id, revision)
734
600
 
735
601
    def _install_signature(self, revision_id, metadata, text):
736
602
        transaction = self._repository.get_transaction()
737
 
        if self._repository.has_signature_for_revision_id(revision_id):
 
603
        if self._repository._revision_store.has_signature(revision_id,
 
604
                                                          transaction):
738
605
            return
739
 
        self._repository.add_signature_text(revision_id, text)
 
606
        self._repository._revision_store.add_revision_signature_text(
 
607
            revision_id, text, transaction)