/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: Andrew Bennetts
  • Date: 2009-08-14 00:55:42 UTC
  • mto: This revision was merged to the branch mainline in revision 4608.
  • Revision ID: andrew.bennetts@canonical.com-20090814005542-eijja5p5nby2g44s
Mention another bug fix in NEWS, and update verb name, comments, and NEWS additions for landing on 1.19 rather than 1.18.

Show diffs side-by-side

added added

removed removed

Lines of Context:
426
426
    def _should_fake_unknown(self):
427
427
        """Return True if we should return UnknownMethod to the client.
428
428
        
429
 
        This is a workaround for bugs in pre-1.18 clients that claim to
430
 
        support receiving streams of CHK repositories.  The pre-1.18 client
 
429
        This is a workaround for bugs in pre-1.19 clients that claim to
 
430
        support receiving streams of CHK repositories.  The pre-1.19 client
431
431
        expects inventory records to be serialized in the format defined by
432
 
        to_network_name, but in pre-1.18 (at least) that format definition
 
432
        to_network_name, but in pre-1.19 (at least) that format definition
433
433
        tries to use the xml5 serializer, which does not correctly handle
434
 
        rich-roots.  After 1.18 the client can also accept inventory-deltas
 
434
        rich-roots.  After 1.19 the client can also accept inventory-deltas
435
435
        (which avoids this issue), and those clients will use the
436
 
        Repository.get_stream_1.18 verb instead of this one.
 
436
        Repository.get_stream_1.19 verb instead of this one.
437
437
        So: if this repository is CHK, and the to_format doesn't match,
438
438
        we should just fake an UnknownSmartMethod error so that the client
439
439
        will fallback to VFS, rather than sending it a stream we know it
489
489
            repository.unlock()
490
490
 
491
491
 
492
 
class SmartServerRepositoryGetStream_1_18(SmartServerRepositoryGetStream):
 
492
class SmartServerRepositoryGetStream_1_19(SmartServerRepositoryGetStream):
493
493
 
494
494
    def _should_fake_unknown(self):
495
 
        """Returns False; we don't need to workaround bugs in 1.18+ clients."""
 
495
        """Returns False; we don't need to workaround bugs in 1.19+ clients."""
496
496
        return False
497
497
 
498
498
 
697
697
            return SuccessfulSmartServerResponse(('ok', ))
698
698
 
699
699
 
700
 
class SmartServerRepositoryInsertStream_1_18(SmartServerRepositoryInsertStreamLocked):
 
700
class SmartServerRepositoryInsertStream_1_19(SmartServerRepositoryInsertStreamLocked):
701
701
    """Insert a record stream from a RemoteSink into a repository.
702
702
 
703
703
    Same as SmartServerRepositoryInsertStreamLocked, except:
705
705
     - servers that implement this verb accept 'inventory-delta' records in the
706
706
       stream.
707
707
 
708
 
    New in 1.18.
 
708
    New in 1.19.
709
709
    """
710
710
 
711
711
    def do_repository_request(self, repository, resume_tokens, lock_token=None):