~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/repository.py

  • Committer: Martin Pool
  • Date: 2010-01-15 07:00:49 UTC
  • mfrom: (4634.119.8 2.0)
  • mto: This revision was merged to the branch mainline in revision 4966.
  • Revision ID: mbp@sourcefrog.net-20100115070049-0cb4bi4lsrul2szs
Merge warning about cross-format fetch from 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
30
30
    graph,
31
31
    osutils,
32
32
    pack,
 
33
    ui,
33
34
    versionedfile,
34
35
    )
35
36
from bzrlib.bzrdir import BzrDir
502
503
    yield pack_writer.begin()
503
504
    yield pack_writer.bytes_record(src_format.network_name(), '')
504
505
    for substream_type, substream in stream:
 
506
        if substream_type == 'inventory-deltas':
 
507
            # This doesn't feel like the ideal place to issue this warning;
 
508
            # however we don't want to do it in the Repository that's
 
509
            # generating the stream, because that might be on the server.
 
510
            # Instead we try to observe it as the stream goes by.
 
511
            ui.ui_factory.warn_cross_format_fetch(src_format,
 
512
                '(remote)')
505
513
        for record in substream:
506
514
            if record.storage_kind in ('chunked', 'fulltext'):
507
515
                serialised = record_to_fulltext_bytes(record)