~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/repository.py

  • Committer: Andrew Bennetts
  • Date: 2010-01-13 23:16:20 UTC
  • mfrom: (4957 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4960.
  • Revision ID: andrew.bennetts@canonical.com-20100113231620-n6in2yjib2v6z03g
MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006, 2007 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
20
20
import os
21
21
import Queue
22
22
import sys
 
23
import tarfile
23
24
import tempfile
24
25
import threading
25
26
 
29
30
    graph,
30
31
    osutils,
31
32
    pack,
32
 
    ui,
33
33
    versionedfile,
34
34
    )
35
35
from bzrlib.bzrdir import BzrDir
502
502
    yield pack_writer.begin()
503
503
    yield pack_writer.bytes_record(src_format.network_name(), '')
504
504
    for substream_type, substream in stream:
505
 
        if substream_type == 'inventory-deltas':
506
 
            # This doesn't feel like the ideal place to issue this warning;
507
 
            # however we don't want to do it in the Repository that's
508
 
            # generating the stream, because that might be on the server.
509
 
            # Instead we try to observe it as the stream goes by.
510
 
            ui.ui_factory.warn_cross_format_fetch(src_format,
511
 
                '(remote)')
512
505
        for record in substream:
513
506
            if record.storage_kind in ('chunked', 'fulltext'):
514
507
                serialised = record_to_fulltext_bytes(record)
682
675
            temp.close()
683
676
 
684
677
    def _tarball_of_dir(self, dirname, compression, ofile):
685
 
        import tarfile
686
678
        filename = os.path.basename(ofile.name)
687
679
        tarball = tarfile.open(fileobj=ofile, name=filename,
688
680
            mode='w|' + compression)