/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/smart/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2010-01-20 23:26:31 UTC
  • mto: This revision was merged to the branch mainline in revision 4977.
  • Revision ID: jelmer@samba.org-20100120232631-b9mz0z55712eaxfa
Cope with ghosts in 'bzr diff'

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 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
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
 
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)
675
683
            temp.close()
676
684
 
677
685
    def _tarball_of_dir(self, dirname, compression, ofile):
678
 
        import tarfile
679
686
        filename = os.path.basename(ofile.name)
680
687
        tarball = tarfile.open(fileobj=ofile, name=filename,
681
688
            mode='w|' + compression)